Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTRODUCTION TO MICROPROCESSOR Engr. Ammar Anwar Khan.

Similar presentations


Presentation on theme: "INTRODUCTION TO MICROPROCESSOR Engr. Ammar Anwar Khan."— Presentation transcript:

1 INTRODUCTION TO MICROPROCESSOR Engr. Ammar Anwar Khan

2 TUTORIAL # 1 EE-353 Review of basic topics to warm up !!!!! 2

3 NUMBER SYSTEM 3  The most commonly used number systems are:  BinaryBase: 2  OctalBase: 8  DecimalBase: 10  HexadecimalBase: 16

4 NUMBER SYSTEM 4 SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20, 1NoYes Octal80, 1, … 7No Hexadecimal160, 1, … 9, A, B, … F No

5 NUMBER SYSTEM 5 DecimalBinaryOctal Hexa- decimal 0000 1111 21022 31133 410044 510155 611066 711177

6 NUMBER SYSTEM 6 DecimalBinaryOctal Hexa- decimal 81000108 91001119 10101012A 11101113B 12110014C 13110115D 14111016E 15111117F

7 NUMBER SYSTEM CONVERSIONS 7 The possibilities: Hexadecimal DecimalOctal Binary 25 10 = 11001 2 = 31 8 = 19 16 Base

8 BINARY TO DECIMAL 8 Hexadecimal DecimalOctal Binary

9 9 Example 101011 2 => 1 x 2 0 = 1 1 x 2 1 = 2 0 x 2 2 = 0 1 x 2 3 = 8 0 x 2 4 = 0 1 x 2 5 = 32 43 10 Bit “0” (LSB)

10 OCTAL TO DECIMAL 10 Hexadecimal DecimalOctal Binary

11 11 Example 724 8 => 4 x 8 0 = 4 2 x 8 1 = 16 7 x 8 2 = 448 468 10

12 HEXADECIMAL TO DECIMAL 12 Hexadecimal DecimalOctal Binary

13 13 Example ABC 16 =>C x 16 0 = 12 x 1 = 12 B x 16 1 = 11 x 16 = 176 A x 16 2 = 10 x 256 = 2560 2748 10

14 DECIMAL TO BINARY 14 Hexadecimal DecimalOctal Binary

15 15 Example 125 10 = ? 2 2 125 62 1 2 31 0 2 15 1 2 7 1 2 3 1 2 1 1 2 0 1 125 10 = 1111101 2

16 OCTAL TO BINARY 16 Hexadecimal DecimalOctal Binary

17 17 Example 705 8 = ? 2 7 0 5 111 000 101 705 8 = 111000101 2

18 HEXADECIMAL TO BINARY 18 Hexadecimal DecimalOctal Binary

19 19 Example 10AF 16 = ? 2 1 0 A F 0001 0000 1010 1111 10AF 16 = 0001000010101111 2

20 DECIMAL TO OCTAL 20 Hexadecimal DecimalOctal Binary

21 21 Example 1234 10 = ? 8 8 1234 154 2 8 19 2 8 2 3 8 1234 10 = 2322 8

22 DECIMAL TO HEXADECIMAL 22 Hexadecimal DecimalOctal Binary

23 23 Example 1234 10 = ? 16 1234 10 = 4D2 16 16 1234 77 2 16 4 13 = D 16 0 4

24 BINARY TO OCTAL 24 Hexadecimal DecimalOctal Binary

25 25 Example 1011010111 2 = ? 8 1 011 010 111 1 3 2 7 1011010111 2 = 1327 8

26 BINARY TO HEXADECIMAL 26 Hexadecimal DecimalOctal Binary

27 27 Example 1010111011 2 = ? 16 10 1011 1011 2 B B 1010111011 2 = 2BB 16

28 OCTAL TO HEXADECIMAL 28 Hexadecimal DecimalOctal Binary

29 29 Example 1076 8 = ? 16 1 0 7 6 001 000 111 110 2 3 E 1076 8 = 23E 16

30 HEXADECIMAL TO OCTAL 30 Hexadecimal DecimalOctal Binary

31 31 Example 1F0C 16 = ? 8 1 F 0 C 0001 1111 0000 1100 1 7 4 1 4 1F0C 16 = 17414 8

32 COMMON POWERS 32 Base 2 PowerPrefaceSymbol 2 10 kilok 2 20 megaM 2 30 GigaG Value 1024 1048576 1073741824

33 33 Example 1.84 * 2 30 1. Double click on My Computer 2. Right click on C: 3. Click on Properties

34 BINARY ARITHMETIC OPERATIONS 34 Addition Complements Subtraction

35 BINARY ADDITION 35 0 + 0 0 + 1 1 + 0 1 + 1 1 0 Carry Bit (a) (b) (c)(d)

36 BINARY COMPLEMENT – 1’S COMPLEMENT 36 Example 1 1 0 0 1 0 1 1 0 0 0 1 1 0 1 0 0 1 1 0 0 1

37 2’S COMPLEMENT 37 1001110 0110001 + 1 0110010 One’s Complement Two’s Complement

38 BINARY SUBTRACTION 38 Example 1101 -1001 +0111 10100 If there is a carry then it is ignored. Thus, the answer is 0100. Two’s complement of 1001

39 End 39


Download ppt "INTRODUCTION TO MICROPROCESSOR Engr. Ammar Anwar Khan."

Similar presentations


Ads by Google