INTRODUCTION TO MICROPROCESSOR Engr. Ammar Anwar Khan
TUTORIAL # 1 EE-353 Review of basic topics to warm up !!!!! 2
NUMBER SYSTEM 3 The most commonly used number systems are: BinaryBase: 2 OctalBase: 8 DecimalBase: 10 HexadecimalBase: 16
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
NUMBER SYSTEM 5 DecimalBinaryOctal Hexa- decimal
NUMBER SYSTEM 6 DecimalBinaryOctal Hexa- decimal A B C D E F
NUMBER SYSTEM CONVERSIONS 7 The possibilities: Hexadecimal DecimalOctal Binary = = 31 8 = Base
BINARY TO DECIMAL 8 Hexadecimal DecimalOctal Binary
9 Example => 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 = Bit “0” (LSB)
OCTAL TO DECIMAL 10 Hexadecimal DecimalOctal Binary
11 Example => 4 x 8 0 = 4 2 x 8 1 = 16 7 x 8 2 =
HEXADECIMAL TO DECIMAL 12 Hexadecimal DecimalOctal Binary
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 =
DECIMAL TO BINARY 14 Hexadecimal DecimalOctal Binary
15 Example = ? =
OCTAL TO BINARY 16 Hexadecimal DecimalOctal Binary
17 Example = ? =
HEXADECIMAL TO BINARY 18 Hexadecimal DecimalOctal Binary
19 Example 10AF 16 = ? A F AF 16 =
DECIMAL TO OCTAL 20 Hexadecimal DecimalOctal Binary
21 Example = ? =
DECIMAL TO HEXADECIMAL 22 Hexadecimal DecimalOctal Binary
23 Example = ? = 4D = D
BINARY TO OCTAL 24 Hexadecimal DecimalOctal Binary
25 Example = ? =
BINARY TO HEXADECIMAL 26 Hexadecimal DecimalOctal Binary
27 Example = ? B B = 2BB 16
OCTAL TO HEXADECIMAL 28 Hexadecimal DecimalOctal Binary
29 Example = ? E = 23E 16
HEXADECIMAL TO OCTAL 30 Hexadecimal DecimalOctal Binary
31 Example 1F0C 16 = ? 8 1 F 0 C F0C 16 =
COMMON POWERS 32 Base 2 PowerPrefaceSymbol 2 10 kilok 2 20 megaM 2 30 GigaG Value
33 Example 1.84 * Double click on My Computer 2. Right click on C: 3. Click on Properties
BINARY ARITHMETIC OPERATIONS 34 Addition Complements Subtraction
BINARY ADDITION Carry Bit (a) (b) (c)(d)
BINARY COMPLEMENT – 1’S COMPLEMENT 36 Example
2’S COMPLEMENT One’s Complement Two’s Complement
BINARY SUBTRACTION 38 Example If there is a carry then it is ignored. Thus, the answer is Two’s complement of 1001
End 39