Number System
Number System
will discuss…
• Number System
• Decimal
• Binary
• Octal
• Hexadecimal
• Conversion in Number System
Number System
Number System
5 7
Binary Octal 4 2 1 4 2 1
(101111)2 (57)8 1 0 1 1 1 1
2 F
Hexadecimal 8 4 2 1 8 4 2 1
0 0 1 0 1 1 1 1
(2F)16
Conversion (Octal to all others)
2 5 2 7
Octal Binary 2 2 - 1 2 3 - 1
101
Hexadecimal 2 5 2 7
8 4 2 1 8 4 2 1
2 2 - 1 2 3 - 1
(2F)16 1 - 0 1 - 1 0 0 1 0 1 1 1 1
2 F
Conversion (Hexadecimal to all
others)
5 7
Digital Logic Design
will discuss…
• Conversion in Number System
(Fraction Conversion)
Conversion (Decimal to all
others)
2 47
0.13 * 2 = 0 .26
2 23 - 1
Binary 2 11 - 1
0.26 * 2 = 0 .52
0.52 * 2 = 1 .04
2 5 -1
0.04 * 2 = 0 .08
(101111.0010)2 2 2 -1
1 -0
. 0 + 0 + 0.125 + 0
47 .13
Conversion (Binary to Octal)
Binary Octal
(101111.0011)2 (57.14)8
. 0 × 22 +0 × 21+ 1× 20 1 × 2 2+ 0 × 21 + 0× 20
. 0 × 4 +0 × 2+1× 11 × 4+ 0 × 2+ 0 × 1
. 0 +0 + 1 4 + 0 + 0
5 7 . 1 4
Conversion (Binary to
Hexadecimal)
Binary Hexadecimal
(11101.101101)2 (1D. B4)16
. 1 × 23 + 0 × 22 +1 × 21 +1 × 2 0 0 × 23 +1 × 22 + 0 × 21 +0 × 20
.8 + 0 + 2 + 1 0 + 4 + 0 + 0
1 D . B 4
Conversion (Octal to Decimal)
Octal Decimal
(57.1024)8 (47.13)10
47 .13
Conversion (Octal to Binary)
Octal Binary
(53.1064)8 (101011.001000110100)2
2 6
2 5 2 3 2 1 2 0 2 4
2 3 - 0
2 2 - 1 1 - 1 2 2 - 0
1 - 1
1 - 0 1 - 0
1 0 1 0 1 1 0 0 1 0 0 0 1 1 0 1 0 0
Conversion (Octal to
Hexadecimal)
Octal Hexadecimal
(53.107)8 (2B.238)16
2 7
2 5 2 3 2 1 2 0
2 3 - 1
2 2 - 1 1 - 1
1 - 1
1 - 0
1 0 1 0 1 1 0 0 1 0 0 0 1 1 1
0 0 1 0 1 0 1 1 . 0 0 1 0 0 0 1 1 1 0 0 0
8 4 2 1 8 4 2 1 . 8 4 2 1 8 4 2 1 8 4 2 1
0 0 1 0 1 0 1 1 . 0 0 1 0 0 0 1 1 1 0 0 0
2 B . 2 3 8
Conversion (Hexadecimal to
Decimal)
Hexadecimal Decimal
(2F.2147)16 (47.13)10
2*161 + F*160 . 2*16-1 + 1*16-2 + 4*16-3 + 7*16-4
2 15
2 2 2 2
2 7 - 1 2 1 2 4 2 7
1 - 0 1-0
2 3 - 1 2 2 - 0 2 3 - 1
1- 1 1 - 0 1 - 1
0 0 1 0 1 1 1 1 0 0 1 0 0 0 0 1 0 1 0 0 0 1 1 1
Conversion (Hexadecimal to
Octal)
Hexadecimal Octal
(2F.2147)16 (57.102434)8
2 15
2 2 2 2
2 7 - 1 2 1 2 4 2 7
1 - 0 1-0
2 3 - 1 2 2 - 0 2 3 - 1
1- 1 1 - 0 1 - 1
0 0 1 0 1 1 1 1 0 0 1 0 0 0 0 1 0 1 0 0 0 1 1 1
0 0 0 1 0 1 1 1 1 . 0 0 1 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0
4 2 1 4 2 1 4 2 1 . 4 2 1 4 2 1 4 2 1 4 2 1 4 2 1 4 2 1
0 0 0 1 0 1 1 1 1 . 0 0 1 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0
0 5 7 . 1 0 2 4 3 4
Complements
will discuss…
• Binary
• 1’s Complement
• 2’s Complement
• Decimal
• 9’s Complement
• 10’s Complement
• Octal
• 7’s Complement
• 8’s Complement
• Hexadecimal
• 15’s Complement
• 16’s Complement
Complements
10110000
1’s Complement 2’s Complement
10110000 10110000
01001111 01001111
+ 1
01010000
Complements
48295671
9’s Complement 10’s Complement
99999999 99999999
48295671 48295671
51704328 51704328
+ 1
51704329
Complements
37265471
7’s Complement 8’s Complement
77777777 77777777
37265471 37265471
40512306 40512306
+ 1
40512307
Complements
3E2A5C8B
15’s Complement 16’s Complement
FFFFFFFF FFFFFFFF
3 E2A5 C8B 3 E2A5 C8B
C1 D5A3 7 4 C1 D5A3 7 4
+ 1
C1 D5A3 7 5
Signed Number
will discuss…
• Signed Number
• Subtraction using complements
Signed
Number
Subtraction using complements
(Decimal)
534679
Using 9’s Complement Using 10’s Complement
- 123456
534679 123456 -------------------------------
- 534679 123456
- 123456 - 534679 411223 - 123456 - 534679
----------------------- ----------------------- ----------------------- -----------------------
will discuss…
• Binary Codes for decimal digits
• Gray Code
• Error-Detecting Code
Binary
Codes
Gray Code
Error-Detecting
Code
A parity bit is an extra bit included with a message to make the total number of 1's
either even or odd.