Professional Documents
Culture Documents
CH 5 - Number System
CH 5 - Number System
Chapter 1 3
Decimal numbers
• Radix = 10
Binary Decimal
(1101)2 = (?)10
1101 = 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20
3210
=1x8+1x4+0x2+1x1
=8+4+0+1
(1101)2 = (13)10
(1101.11)2 = (13.75)10
Decimal Binary
(13.75)10 = (?)2
2 13 1 LSB
2 6 0
2 3 1
2 1 1 MSB
0
(13)10 = (1101)2
Decimal Binary
.75*2 1.5 1
.5*2 1.0 1
0
(.75)10 = (.11)2
(13.75)10 = (1101.11)2
Octal Decimal
• Octal numbers{0, 1, 2, 3, 4, 5, 6, 7}
• (137)8 = (?)10
137 = 1 x 82 + 3 x 81 + 7 x 80
= 1 x 64 + 3 x 8 + 7 x 1
= 64 + 24 + 7
(137)8 = (95)10
(95)10 = (137)8
• Example 4: Convert (0.513)10 to octal.
Solution:
0.513 × 8 = 4 .104 =4
0.104 × 8 = 0.832 =0
0.832 × 8 = 6.656 =6
0.656 × 8 = 5.248 =5
0.248 × 8 = 1.984 =1
0.984 × 8 = 7.872 =7
Result= .406517.... = ~ .406517
Hex Decimal
(BAD)16 = (?)10
(BAD)16 = 11 x 162 + 10 x 161 + 13 x 160
= 11 x 256 + 10 x 16 + 13 x 1
= 2816 + 160 + 13
(BAD)16 = (2989)10
(2989)10 = (BAD)16
• 16*1=16
• 16*16=256
• 16*16*16=4096
• 16*16*16*16=65536
• Convert the hexdecimal number (3B.F) 16 to
decimal
3 B . F
=(3 *161 ) + (11 *160 ) + (15 *16-1 )
= 48 + 11 + 0.9375
= 59.9375
(3B.F)16=(59.9375)10
Binary-Octal and Binary-Hex
• Ease of use and conversion
• Three bits make one octal digit
111 010 110 101
7 2 6 5 => 7265 in octal
• Hexadecimal numbers
(B65F)16 = 11 x 163 + 6 x 162 + 5 x 161 + 15 x 160 = (46,687)10