0% found this document useful (0 votes)
14 views30 pages

Number System

The document covers digital logic design focusing on number systems including decimal, binary, octal, and hexadecimal, along with their conversions. It also discusses complements and signed numbers, detailing methods for subtraction using complements in various bases. Additionally, the document touches on binary codes, including Gray code and error-detecting codes like parity bits.

Uploaded by

Aina Idrees
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views30 pages

Number System

The document covers digital logic design focusing on number systems including decimal, binary, octal, and hexadecimal, along with their conversions. It also discusses complements and signed numbers, detailing methods for subtraction using complements in various bases. Additionally, the document touches on binary codes, including Gray code and error-detecting codes like parity bits.

Uploaded by

Aina Idrees
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Digital Logic Design

will discuss…
• Number System
• Decimal
• Binary
• Octal
• Hexadecimal
• Conversion in Number System
Number System

Number System

Decimal Binary Octal Hexadecimal


( )10 ( )2 ( )8 ( )16

0,1,2,3,4,5,6,7,8,9 0,1 0,1,2,3,4,5,6,7 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F


Conversion (Decimal to all
others)
2 47
2 23 - 1
Binary 2 11 - 1
2 5 -1
(101111)2 2 2 -1
1 -0
Decimal
Octal 8 47
(47)10 5 - 7
(57)8
Hexadecimal 16 47
2 - 15
(2F)16
Conversion (Binary to all others)
47
Decimal
32 16 8 4 2 1
(47)10 1 0 1 1 1 1

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)

Decimal 5*81 + 7*80


47
(47)10 40 + 7

2 5 2 7
Octal Binary 2 2 - 1 2 3 - 1
101

(57)8 (101111)2 1 - 0 1 - 1 111

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)

Decimal 2*161 + F*160


47
(47)10 32 + 15
2 15
Hexadecimal Binary 2 2
2 7 - 1 10
1 - 0 1111
2 3 - 1
(2F)16 (101111)2 1 - 1
2 15
Octal 2 2
2 7 - 1 4 2 1 4 2 1
1 - 0
2 3 - 1 1 0 1 1 1 1
(57)8 1 - 1

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

Decimal 0.13 * 8 = 1 .04


Octal 8 47
0.04 * 8 = 0 .32
(47.13)10 5 - 7
0.32 * 8 = 2 .56
(57.1024)8 0.56 * 8 = 4 .48
0.13 * 16 = 2 .08
Hexadecimal 16 47 0.08 * 16 = 1 .28
2 - 15 0.28 * 16 = 4 .48
(2F. 2147AE)16 0.48 * 16 = 7 .68
0.68 * 16 = 10 .88
0.88 * 16 = 14 .08
Conversion (Binary to Decimal)
Binary Decimal
(101111.0010)2 (47.13)10

. 0 × 2−1 +0 × 2−2 +1 × 2− 3 +0 × 2−4

. 0 × 0.5+ 0 ×0.25+ 1× 0.125+ 0 ×0.05625

. 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

5*81 + 7*80 . 1*8 -1 + 0*8-2 + 2*8-3 + 4*8-4

40 + 7 . 0.125 + 0 + 0.0039 + 0.000977

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

32 + 15 . 0.125 + 0.0039 + 0.000977 + 0.0001068


47 .13
Conversion (Hexadecimal to
Binary)
Hexadecimal Binary
(2F.2147)16 (101111. 0010000101000111)2

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
----------------------- ----------------------- ----------------------- -----------------------

534679 123456 534679 123456


+ 876543 + 465320 + 876544 + 465321
----------------------- ----------------------- ----------------------- -----------------------

1 411222 588776 1 411223 588777


+1
----------------------- ----------------------- ----------------------- -----------------------

411223 - 411223 411223 - 411223


Subtraction using complements
(Binary)
110011
Using 1’s Complement Using 2’s Complement
- 101010
110011 101010 -------------------------------
- 110011 101010
- 101010 - 110011 001001 - 101010 - 110011
----------------------- ----------------------- ----------------------- -----------------------

110011 101010 110011 101010


+ 010101 + 001100 + 010110 + 001101
----------------------- ----------------------- ----------------------- -----------------------

1 001000 110110 1 001001 110111


+1
----------------------- ----------------------- ----------------------- -----------------------

001001 - 001001 001001 - 001001


Binary Codes

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.

You might also like