Professional Documents
Culture Documents
Digital Fundamental PPT Module 1
Digital Fundamental PPT Module 1
Digital Fundamental PPT Module 1
Digital Fundamentals
Module 1:
Fundamentals of Digital
Systems and Logic families
A’
A
(A’B’)’ = (A+B)
B
B’
OR using NAND
A’
A
(A’+B’)’ = AB
B
B’
AND using NOR
``
A B C A+B+C
0 0 0 0 1 1 1 1 1
0 0 1 1 0 1 1 0 0
0 1 0 1 0 1 0 1 0
0 1 1 1 0 1 0 0 0
1 0 0 1 0 0 1 1 0
1 0 1 1 0 0 1 0 0
1 1 0 1 0 0 0 1 0
1 1 1 1 0 0 0 0 0
From truth table, it is clearly visible that L.H.S. = R.H.S. Hence, the complement
of a sum of variables is equal to the product of their individual complements.
Introduction: Digital Fundamentals 16 Darshan Institute of Engineering & Technology
L.H.S. R.H.S.
A B C ABC
0 0 0 0 1 1 1 1 1
0 0 1 0 1 1 1 0 1
0 1 0 0 1 1 0 1 1
0 1 1 0 1 1 0 0 1
1 0 0 0 1 0 1 1 1
1 0 1 0 1 0 1 0 1
1 1 0 0 1 0 0 1 1
1 1 1 1 0 0 0 0 0
From truth table, it is clearly visible that L.H.S. = R.H.S. Hence, the complement
of a product of variables is equal to the sum of their individual complements.
Introduction: Digital Fundamentals 17 Darshan Institute of Engineering & Technology
Reducing Boolean Expression
▪
(Distributive law)
(Distributive law)
(A.A = A)
(1 + A = 1)
(DeMorgan’s law)
(DeMorgan’s law)
(Distributive law)
(Distributive law)
(A.A’ = 0)
(Distributive law)
(A.A’ = 0)
Unit – 1: Binary Systems & Logic Circuits Darshan Institute of Engineering & Technology
Common Number Systems
System Base Symbols Used by Used in
Humans? Computers?
Decimal 10 0, 1, … 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, … 7 No No
Hexa- 16 0, 1, … 9, No No
decimal A, B, … F
Decimal Octal
Binary Hexadecimal
▪ Example
▪ Technique
• Divide by two, keep track of the remainder
• First remainder is bit 0 (LSB, least-significant bit)
• Second remainder is bit 1 and so on
12510 = ?2 2 125 1
2 62 0
2 31 1
2 15 1
2 7 1
2 3 1
2 1 1
0
12510 = 11111012
0.687510 = ?2
integer fraction
0.6875 x 2 = 1.3750 1 + 0.3750
0.3750 x 2 = 0.7500 0 + 0.7500
0.7500 x 2 = 1.5000 1 + 0.5000
0.5000 x 2 = 1.0000 1 + 0.0000
0.687510 = 0.10112
▪ Technique
• Multiply each bit by 2n, where n is the “weight” of the bit
• The weight is the position of the bit, starting from 0 on the right
• Add the results
101011
1 x 25 + 0 x 24 + 1 x 23 + 0 x 22 + 1 x 21 + 1 x 20
32 + 0 + 8 + 0 + 2 + 1
4310
1010112 = 4310
11. 11
1 x 21 + 1 x 20 + 1 x 2-1 + 1 x 2-2
2 + 1 + 0.5 + 0.25
3.7510
11.112 = 3.7510
▪ Technique
• Divide by eight
• Keep track of the remainder
12510 = ?8 8 125 5
8 15 7
8 1 1
0
12510 = 1758
0.687510 = ?8
integer fraction
0.6875 x 8 = 5.5000 5 + 0.5000
0.5000 x 8 = 4.0000 4 + 0.0000
0.687510 = 0.548
▪ Technique
• Multiply each bit by 8n, where n is the “weight” of the bit
• The weight is the position of the bit, starting from 0 on the right
• Add the results
724
7 x 82 + 2 x 81 + 4 x 80
448 + 16 + 4
46810
7248 = 46810
43. 25
4 x 81 + 3 x 80 + 2 x 8-1 + 5 x 8-2
32 + 3 + 0.25 + 0.0781
35.328110
43.258 = 35.328110
▪ Technique
• Divide by 16
• Keep track of the remainder
123410 = 4D216
▪ Technique
• Multiply each bit by 16n, where n is the “weight” of the bit
• The weight is the position of the bit, starting from 0 on the right
• Add the results
ABC
▪ Technique
• Convert each octal digit to a 3-bit equivalent binary representation
7058 = ?2
7 0 5
7058 = 1110001012
▪ Technique
• Group bits in threes, starting on right
• Convert to octal digits
10110101112 = ?8
1 3 2 7
10110101112 = 13278
▪ Technique
• Convert each hexadecimal digit to a 4-bit equivalent binary representation
10AF16 = ?2
1 0 A F
10AF16 = 10000101011112
▪ Technique
• Group bits in fours, starting on right
• Convert to hexadecimal digits
10110101112 = ?16
2 D 7
10110101112 = 2D716
▪ Technique
• Convert Octal to Binary
• Regroup bits in fours from right
• Convert Binary to Hexa-Decimal
10768 = ?16
1 0 7 6
2 3 E
10768 = 23E16
Introduction: Digital Fundamentals 62 Darshan Institute of Engineering & Technology
Exercise
▪ (463)8 = ( )16
▪ (2056)8 = ( )16
▪ (2057.64)8 = ( )16
▪ (6543.04)8 = ( )16
▪ (7476.47)8 = ( )16
▪ Technique
• Convert Hexa-Decimal to Binary
• Regroup bits in three from right
• Convert Binary to Octal
1F0C16 = ?8
1 F 0 C
0 1 7 4 1 4
1F0C16 = 174148
Introduction: Digital Fundamentals 65 Darshan Institute of Engineering & Technology
Exercise
▪ (FA8)16 = ( )8
▪ (9AC3)16 = ( )8
▪ (1A74D)16 = ( )8
▪ (1AC.9A)16 = ( )8
▪ (ABC.5AC)16 = ( )8
1 1 1 1 1 1 1 . 1 1
- 1 1 0 1 - 1 0 1 . 0 1
0 0 1 0 0 1 0 . 1 0
(1’s complement of 1101) (1’s complement of 101.01)
1 1 1 1 1 1 1 . 1 1
- 1 1 0 0 - 1 0 1 . 0 1
0 0 1 1 0 1 0 . 1 0
+ 1 + 1
0 1 0 0 0 1 0 . 1 1
(2’s complement of 1100) (2’s complement of 101.01)
Introduction: Digital Fundamentals 69 Darshan Institute of Engineering & Technology
Representation of negative number in 2’s
complement form
▪ Express -65.5 in 12 bit 2’s complement form.
2 65 1 0.5 x 2 = 1.0
2 32 0 So, result in 12-bit binary is as follows:
65.510 = 01000001.10002
2 16 0
For negative number, we have to
2 8 0 convert this into 2’s complement form
2 4 0
-65.510 =10111110.10002
2 2 0
2 1 1
0
9 9 9 9 9 9 9 . 9 9
- 3 4 6 5 - 7 8 2 . 5 4
6 5 3 4 2 1 7 . 4 5
(9’s complement of 3465) (9’s complement of 782.54)
9 9 9 9 9 9 9 . 9 9
- 3 4 6 5 - 7 8 2 . 5 4
6 5 3 4 2 1 7 . 4 5
+ 1 + 1
6 5 3 5 2 1 7 . 4 6
(10’s complement of 3465) (10’s complement of 782.54)
Introduction: Digital Fundamentals 75 Darshan Institute of Engineering & Technology
Subtraction using 9’s complement
▪ Obtain 9’s complement of subtrahend
▪ Add the result to minuend and call it intermediate result
▪ If carry is generated then answer is positive and add the carry to
Least Significant Digit (LSD)
▪ If there is no carry then answer is negative and take 9’s
complement of intermediate result and place negative sign to the
result.
4 3 6 . 6 2 4 3 6 . 6 2
9’s complement
- 7 4 5 . 8 1 + 2 5 4 . 1 8
- 3 0 9 . 1 9 6 9 0 . 8 0
9’s complement
- 3 0 9 . 1 9
As carry is not generated, so take 9’s
complement of the intermediate
result and add ‘ – ‘ sign to the result
4 3 6 . 6 2 4 3 6 . 6 2
10’s complement
- 7 4 5 . 8 1 + 2 5 4 . 1 9
- 3 0 9 . 1 9 6 9 0 . 8 1
10’s complement
- 3 0 9 . 1 9
As carry is not generated, so take
10’s complement of the intermediate
result and add ‘ – ‘ sign to the result
0 01 01 11 0. 1 0 0 0
As carry is not generated, so take 1’s
complement of the intermediate
result and add ‘ – ‘ sign to the result
0 01 01 11 0. 1 0 0 0
As carry is not generated, so take 2’s
complement of the intermediate
result and add ‘ – ‘ sign to the result
Unit – 1: Binary Systems & Logic Circuits Darshan Institute of Engineering & Technology
8421 BCD Code (Natural BCD Code)
▪ Each decimal digit, 0 through 9, is coded by 4-bit binary number
▪ 8, 4, 2 and 1 weights are attached to each bit
▪ BCD code is weighted code
▪ 1010, 1011, 1100, 1101, 1110 and 1111 are illegal codes
▪ Less efficient than pure binary
▪ Arithmetic operations are more complex than in pure binary
▪ Example
Decimal 1 4
2 5 0 0 1 0 0 1 0 1
+ 1 3 + 0 0 0 1 0 0 1 1
3 8 0 0 1 1 1 0 0 0
No carry, no illegal code. So, this is
the correct sum.
+1 +1 +1 +1
0001 0010 0001 0110 .0100 Corrected Sum
3 8 0 0 1 1 1 0 0 0
- 1 5 - 0 0 0 1 0 1 0 1
2 3 0 0 1 0 0 0 1 1
No borrow. So, this is the correct
difference.
Decimal 1 4
3 7 0 1 1 0 1 0 1 0
+ 2 8 + 0 1 0 1 1 0 1 1
6 5 1 0 1 1 10 1 0 1
Propagate carry to next group +1
• Add 0011 to group 1 1 0 0 0 1 0 1
which generated carry
• Subtract 0011 to group - 0 0 1 1+ 0 0 1 1
which do not generated
carry 1 0 0 1 1 0 0 0
• Add 0011 to
+1 +1 Propagate carry
Binary 1 0 0 1
Gray 1 1 0 1
Gray 1 1 0 1
Binary 1 0 0 1
Parity Column