Date post: | 31-Dec-2015 |
Category: |
Documents |
Upload: | rafe-copeland |
View: | 230 times |
Download: | 8 times |
NUMBER SYSTEM
Number System
• Number Base B => B symbols –Base 16(Hexa):0, 1,……9, A ,…, E, F–Base 10 (Decimal): 0, 1, 2,……, 7, 8, 9–Base 8(Octal): 0, 1, 2, 3, 4, 5, 6, 7–Base 2 (Binary): 0, 1
Number System (cont)
• Number representation: • d31d30 ... d2d1d0 is a 32 digit number• value = d31x B31 + d30 x B30 + ... + d2 x B2 + d1 x
B1 + d0 x B0
Decimal Numbers: Base 10
• Base or Radix is 10• Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
• Example:41210 = 4x102 + 1x101 + 2x100
= 400 + 10 +2 = 412
Binary Numbers: Base 2
• Base or Radix is 2
• Digits: 0, 1
• Example:1012 = 1x22 + 0x21 + 1x20
= 4 + 0 +1 = 5
Octal Numbers: Base 8
• Base or Radix is 8
• Digits: 0, 1, 2, 3, 4, 5, 6, 7
• Example:1238 = 1x82 + 2x81 + 3x80
= 64 + 16 +3 = 83
Hexadecimal Numbers: Base 16
• Digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F:–A 10–B 11–C 12–D 13–E 14–F 15
• Example:1216 = 1x161 + 2x160
= 16 +2 = 18
Conversions
Decimal to Base N Base N to Decimal
Successive Division by N(Remainder Method)
Multiplication with power of N
Decimal to Binary
Conversion of 2510 to Binary
2 252 12 -12 6 - 02 3 - 0 1 - 1
2510=110012
• Binary to decimal conversion
11001 1X20 = 1 0X21 = 0 0X22 = 0 1X23 = 8 1X24 = 16
2510
Decimal to Octal
Conversion of 12510 to Octal
8 1258 15 - 5 1 - 7
12510=1758
• Octal to decimal conversion
175 5X80 = 5 7X81 = 56 1X82 = 64
125
1758 = 12510
Conversion of 8410 to Octal
8 848 10 - 4 1 - 2
8410=1248
• Octal to decimal conversion
124 4X80 = 4 2X81 = 16 1X82 = 64
84
1248 = 8410
Decimal to Hexa
Conversion of 45010 to Hexadecimal
16 45016 28 - 2 1 - 12
45010=1C216
• Hexa to decimal conversion
1C2 2X160 = 2 12X161 = 192 1X162 = 256
450
1C216 = 45010
Conversion of 38510 to Hexadecimal
16 38516 24 - 1 1 - 8
38510=18116
• Hexa to decimal conversion
181 1X160 = 1 8X161 = 128 1X162 = 256
385
18116 = 38510
Other Conversions
• BINARYOCTAL• BINARYHEXA• OCTALHEXA etc,.
• BINARYOCTAL• OCTAL – BASE 8 = 23
• 3 DIGIT BINARY NUMBERExample:110012 OCTAL
11 001
011 001 3 1 110012=318
Example:11100112 OCTAL
1 110 011
001 110 011 1 6 3
11100112=1638
• BINARYHEXA• HEXA – BASE 16 = 24
• 4 DIGIT BINARY NUMBERExample:110012 HEXA
1 1001
0001 1001 1 9 110012=1916
Example:11100112 OCTAL
1 110 011
001 110 011 1 6 3
11100112=1638
• OCTALHEXA• OCTALBINARYHEXAExample:318 HEXA
3 1 011 001
0001 1001 1 9318=1916
• HEXA OCTAL• Example: 1BD OCTAL
1 B D0001 1011 1101
000 110 111 101 0 6 7 5
1BD = 6758
Conversion of 25.12510 to Binary
2 252 12 -12 6 - 02 3 - 0 1 - 1
2510=110012
0.125 X 2 = 0.2500.250 X 2 = 0.5 0.5 X 2 = 1.0
25.12510 = 11001.0012
• Binary to decimal conversion11001.001
1X2-3 = 0.125 0X2-2 = 0 0X2-1 = 0 1X20 = 1 0X21 = 0 0X22 = 0 1X23 = 8 1X24 = 16
25.12510
Conversion of 84.25010 to Octal
8 848 10 - 4 1 - 2
8410=1248
0.250 X 8 = 2.000
25.12310 = 124.28
• Octal to decimal conversion
124.2
2X8-1 = 0.25 4X80 = 1 2X81 = 0 1X82 = 0 25.25010
ASSIGNMENT
DECIMAL TO BINARY
• 43• 79• 107• 241• 476
DECIMAL TO OCTAL
• 39• 152• 284• 758• 2534
DECIMAL TO HEXA
• 75• 826• 3128• 7359• 4756
DECIMAL TO OTHER
• 63 BASE4• 279 BASE6• 161 BASE7
BINARY OCTAL,HEXA
• 1010101• 11010101011• 111010110111• 1011110111• 101000101
OCTAL HEXA
• 473• 1235• 724• 5774• 4625
• 75.12510 BASE2
• 356.52310 OCTAL
• 527.4210 HEXA