Digital Logics Fundamental
Digital Logics Fundamental
INSTITUTE OF ENGINEERING
THAPATHALI CAMPUS
13 1101 15 D
14 1110 16 E
15 1111 17 F
Table: NumberPrepared
System By: Er. Ganesh Kumal 8
Number Conversion System
1. Decimal to Other Base System
i. Divide the decimal number to be converted by the value
of the new base.
ii. Get the remainder from step (i) as the rightmost digit
(least significant digit) of new base number.
iii. Divide the quotient by the base.
iv. Record the remainder from step (iii) as the next digit (to
the left) of the new base.
Repeat step (iii) and (iv) getting remainders from right
to left until the quotient becomes zero in step (iii).
The last remainder obtained will be the MSD of the
new base.
(25.692)10 = (11001.1011)2
0.513 X 8 = 4.104 4
7 0.104 X 8 = 0.832 0
0. 832 X 8 = 6.656 6
0. 656 X 8 = 5.248 5
0.248 X 8 = 1.984 1
Read down
(239.513)10 = (357.40651)8
(3479.342)10 = (D97.578D)16
• Subtracting smaller
number from larger one,
the method is as follows:
– Determine 1’s complement
of the smaller one.
– Add 1’s complement of the
smaller one to the larger
one.
– Remove the carry and add When subtracting larger number from
it to the result. The carry is smaller one, there is no carry and the
called end around carry. result is in 1’s complement form and
opposite sign (negative).
0 0000 0000
1 0001 0001
2 0010 0010
3 0011 0011
4 0100 0100 Valid in Binary
5 0101 0101
6 0110 0110
7 0111 0111
8 1000 1000
9 1001 1001
10 1010 0001 0000
11 1011 0001 0001
12 1100 Invalid in BCD 0001 0010 Invalid in Binary
13 1101 0001 0011
14 1110 0001 0100
Prepared By: Er. Ganesh Kumal 33
15 1111 0001 0101
BCD Addition
Y= A Y=A’
Y=A.B Y= A + B Y= A B
+ve logic AND gate = -ve OR gate +ve logic OR gate = -ve logic AND gate
Prepared By: Er. Ganesh Kumal 47
74XX series IC for digital logic
Number Description
7400 Quad two-input NAND gate (four NAND
gates)
A.(B + C)= AB + AC
0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 1 1 0 0 1 0 0 1 0 0
1 0 0 0 1 1 0 1 0 0 0 1 0 0
1 1 1 1 1 1 0 1 1 0 0 1 0 0
1 0 0 0 0 0 0 0
1 0 1 0 1 0 0 0
1 1 0 1 0 0 0 0
1 1 1 1 1 1 1 1
B
Prepared By: Er. Ganesh Kumal
B 56
AND Gate Realized by NAND
• Implementing AND Using only NAND Gates: The AND is replaced by a
NAND gate with its output complemented by a NAND gate inverter.
X.Y X.Y
Implementing NOR Using only NAND Gates: The NOR gate is replaced by a NAND
gate by complemented output of NOR gate implemented by NAND gates.
Y = AB + BC + CA
Product terms ( ANDing of variables)
The procedure to be followed for writing the standard POS expression is as under:
1) first, we consider only those combinations of inputs which correspond to Y = 0
2) Then we write the Maxterms for each such combination.
3) Lastly, we AND all these Maxterms to get the standard POS form.
1 0 1 1
1 1 0 0
1 1 1 1
Table 3.2: Truth table of 3-bit standard min-terms and max-terms
Prepared By: Er. Ganesh Kumal 66
Standard SOP Form
• Standard SOP expression means all the
variables appear in each product term.
F = ABCD + ABCD + ABCD
• Standard SOP expression are important in:
Constructing truth table
The Karnaugh map simplification method
A.A’ = 0
A + BC = (A + B) (A + C)
( A + B + C.C’) (A.A’ + B + C)
Example 5: F = ( AB + C ) ( AB + D)
= AB.AB + ABD + ABC + CD
= AB + ABD + ABC + CD
= AB ( 1 + D + C ) + CD
= AB + CD Ans.
Prepared By: Er. Ganesh Kumal 73
Simplify the following Boolean
Expression
a) F = (A’ + B) (A + B)
b) F = A’B’C’ +A’B’C +AB’C’ + AB’C
c) F = AC’ + ABC + A(C + AC’)
d) F = 1 + [A’B + (CD)’ + (BC)” ]’
e) F = AC’ + ABC + A(C +AC’)
f) F = ( AB + A + AB )
Adjacent Cells
Non-adjacent cell
Prepared By: Er. Ganesh Kumal 76
3- Variables
3 variable K-map =Total 8 cells
Pair
Quad
F = m (0, 1, 2, 3, 6, 7) Cell
F= x’y’ + xy’
F= x’y’ + xy’
XY’
F = C ‘+ A F = XY’ + X’Z
Prepared By: Er. Ganesh Kumal 85
F (A, B, C) = A’B + BC’ + AC’
Solution:
Expressing the given function as a min-terms ( standard SOP).
F = A’B + BC’ + AC’
= A’B (C + C’) + BC’(A + A’) + AC’ (B + B’)
= A’BC + A’BC’ + ABC’ + A’BC’ +ABC’ + AB’C’
= A’BC + A’BC’ + ABC’ + AB’C’
Figure : Block diagram, truth table and circuit diagram of half adder.
Prepared By: Er. Ganesh Kumal 99
Full-Adder
• A combinational circuit that performs the addition of three bits (two
significant bits and a previous carry) is called a full adder.
• Two of the inputs, denoted by A and B, represent the two bits to be added
and third input Cin represent the carry from the previous lower significant
position.
( A B)C + AB
Sn-1 S1 S0
Prepared By: Er. Ganesh Kumal 107
4:1 Multiplexer
(a) (b)
N selection lines
Prepared By: Er. Ganesh Kumal 112
1 : 4 De-multiplexer
• There are four possible outputs Y0, Y1, Y2, Y3 and a single input D.
• The single data input is sent to one of the four outputs as per the selection
line input.
Y1 = DS’1S0
Y2 = DS1S’0
Y3 = DS1S0
Inputs Outputs
Y3 Y2 Y1 Y0 A1 A0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
(a) (b)
0 0 1 0 0 0 0 0 1 0 1
0 1 0 0 0 0 0 0 1 1 0
1 0 0 0 0 0 0 0 1 1 1
A3 = Y8 + Y9
A2 = Y4 + Y5 + Y6 + Y7 We made use of the fact that only
A1 = Y2 + Y3 +Y6 + Y7 one input can be ‘ 1’ at one time.
A0 = Y1 + Y3 + Y5 + Y7 + Y9
Circuit diagram for decimal to BCD encoder
Encoder and Decoder
Decoder
• A combinational circuit that converts binary information from
n input lines to maximum of 2n unique output lines.
• One of these outputs will be selected based on the
combination of input present, when the decoder is enabled.
• If the n-bit coded information has unused combinations, the
decoder may have fewer than 2n outputs.
Example
• 2 to 4 Line Decoder
• 3 to 8 Line (Binary to Octal) Decoder
• 4 to 16 Line Decoder Figure: Block of Decoder
• BCD to Decimal (4 to 10 line) Decoder
E A B Y3 Y2 Y1 Y0
0 X X 0 0 0 0
1 0 0 0 0 0 1
1 0 1 0 0 1 0
1 1 0 0 1 0 0
1 1 1 1 0 0 0
(a) ( b)
When,
S=0, R=0 ; No change state
S=0, R=1 ; Reset
S=1, R=0 ; Set
Figure 6.2: NOR Latch S=1, R=1; Invalid
Edge Triggering
Level Triggering
Prepared By: Er. Ganesh Kumal 144
Flip-Flop
• Sequential circuit.
• Single bit memory element (storage device).
• Bi-stable device (either ‘1’ or ‘0’).
• Example: S-R flip-flop, D-flip-flop, J-K flip-flop,
T-flip-flop.
CP S R Q Q’
CP
X 0 0 No change
1 0 1 0 1
(a) Block diagram
1 1 0 1 0
1 1 1 Invalid
Indeterminate
Indeterminate
CP J K Q Q’
X 0 0 No change
CP 1 0 1 0 1
1 1 0 1 0
1 1 1 Toggle
(a) Logic diagram (b) Truth table
Figure 6.7: J- K Flip - Flop
Prepared By: Er. Ganesh Kumal 153
J-K Flip-Flop
01 11
Q1(MSB)
10
CLK Q1 Q0
Initially 0 0 CLR=0
0 1 CLR=1
1 0 CLR=1
1 1 CLR=1
Operation:
1. The initial state of each flip-flop in the
absence of clock signal is Q2Q1Q0=000.
2. This is incremented by 1 at every clock
pulse and reached to maximum(111) at
7th clock pulse and repeats when further
clock pulse is applied.
3. Q0 toggle every positive edge of clock
pulse.
4. Q1 toggle for every Q0 that goes from 1
to 0.
5. Q2 toggle when Q0 and Q1 (both) goes
from 1 to 0.
Figure:
(M=0) (M=1)
(b) waveform
From the above excitation table, we can derive the equation of each
FFs input using K-map.
After Simplification we get:
J0 = K0= 1 J1 = K1= Q0 J2=K2= Q0.Q1
From these equations we have to draw circuit diagram.
Prepared By: Er. Ganesh Kumal 174
Prepared By: Er. Ganesh Kumal 175
4-Bit Synchronous Counter
CLK Q3 Q2 Q1 Q0
Initially 0 0 0 0
1 1 0 0 0
Serial In Complete
2 0 1 0 0
3 1 0 1 0
4 0 1 0 1
5 0 0 1 0
Serial out Complete
6 0 0 0 1
7 0 0 0 0
Thank You!!