DF Practicals 1 To 10
DF Practicals 1 To 10
Apparatus: IC 7408, 7432, 7404, 7400, 7402, 7486, Trainer kit, connecting wires
Theory: Logic gates are the fundamental building blocks of digital systems. The name
logic gate is derived from the ability of such a device to make decisions, in the
sense that it produces one output level when some combination of input levels
are present, and a different output level when other combination of input levels
are present. There are three basic types of logic gates AND, OR and NOT.
Inputs and outputs of logic gates can occur only in two levels. These two levels
are termed HIGH and LOW or TRUE and FALSE or ON and OFF or simply 1 and 0.
A table, which lists all the possible combination of input variables and the
corresponding outputs is called a truth table, logic 1 corresponds to +5V and
logic 0 presents 0V.
The AND Gate:
The AND gate has two or more inputs but only one output. The output assumes
the logic 1 state when each one of its input is at logic 1 state. The output assumes
the logic 0 state even if one of its inputs is at logic 0 state. The AND gate may,
therefore, be defined as a device whose output is 1, if and only if all its input are
1.
The logic symbol and truth table of two input AND gates is shown in fig. Note that
the output is 1 only when all the inputs are 1. The symbol for the AND operation
is “.”.
Truth Table
A A B X
X 0 0 0
0 1 0
B 1 0 0
1 1 1
A O/p
Discrete AND gate may be realized using diodes as shown in fig. The two inputs
A and B to the gates may be either 0 or 1.
In the diode AND gate, when A = +5V and B = +5V, both the diodes D1 and D2 are
off. So current flows through R and therefore No voltage drop occur across
resistor R. Hence the output X =5V. When A=0V or B=0V, the corresponding diode
D1 and D2 is ON or both diodes are on and act as a short circuit, therefore the
output X = 0V.
The OR gate: -
Like an AND gate, OR gate have two or more inputs but only one output. The
output assumes the logic 1 state, if one of its inputs is in logic 1 state. Its output
assumes the logic 0 state, only when each one of its inputs is in logic 0 state.
The logic symbol and truth table of two input OR gate is shown in fig. The symbol
for the OR operation is “+”
Truth Table
A A B X
X 0 0 0
0 1 1
B 1 0 1
1 1 1
1k D1
o/p
A o/p
1k D2
B
1kR
In the Diode OR gate, when A = 0V and B = 0V, both diodes D1 and D2 are OFF,
No current flows through and so no voltage drop across R. Hence the output
voltage X = 0V. When A = +5V and B = +5V, the corresponding diode D1 and D2
are ON and act as a short circuit therefore output X = +5V.
The logic symbol for the NOT gate is “−” (Bar). The discrete NOT gate can be
realized by using the transistor is as shown in fig. When input A = 0V, transistor
T is reverse biased and remain OFF. Hence the output voltage X = 5V. When the
input A = +5V, T is ON and therefore X = 0V.
The NAND and NOR gate are said to be universal gates because any Boolean
function or Digital system can be implemented with it. To show that any Boolean
function can be implemented with NAND and NOR gates, we need only show that
the logic operations AND, OR and NOT can be implemented with NAND and NOR
gates.
Logic gates IC Pin diagrams:
Conclusion
Review Questions
1. What are the two voltage levels normally used to represent binary digits 0 & 1?
2. What do you mean by a logic gate? name the basic gates.
3. What do you mean by a positive logic system & negative logic system?
4. Give IC number of the following TTL gates: - AND, OR, NOT, XOR, NOR & NAND
5. Justify the sentence, “A positive logic AND gate is negative logic OR gate and vice versa.
6. What is truth table?
7. Which logic gate is called (a) any or all gate (b) all or nothing gate (c) inverter?
8. Name the Universal gates? Define the functions performed by them.
9. Which gates can be used as inverter in addition to NOT gate and how?
10. Draw the two equivalent symbols for the two input NAND gate & NOR gate.
11. How can we convert the Ex- OR gate into the NOT gate?
12. Design Ex – OR gate by using the NAND & NOR gate.
Experiment: 2
Aim : Implement the following Boolean expression using NAND gates only.
[1] F1=ABC+A’B’C+A’BC+ABC’+A’B’C’
[2] F2=(A+C+D)(A+C+D’)(A+C’+D)(A+B’)
[3] F3=(BC’+A’D)(AB’+CD’)
[4] F4=(AB)(A+B)’+(CD)’
[5] F5=ABC+AB’(A’C’)’
[6] F6=AC+ABC+A’C+A’B’C+BC
[7] F7=AB’(A+C)+AC(A’+C’)
[8] F8=(A(AB)’)’(B(AB)’)’
Theory : Boolean algebra is a system of mathematical logic, which uses capital or small
letters of English alphabet to represent variables or a function of the variables.
In Boolean algebra, there is no subtraction and division. Only logical addition
and logical Multiplication are performed. There are no fractions or negative
numbers in Boolean algebra.
ASSOCIATIVE LOW : A + (B+C) = ( A + B ) + C ;
(A.B) C = A (B.C)
DISTRIBUTIVE LAW : A ( B + C ) = AB + AC ;
A + BC = (A + B) ( A + C)
IDEMPOTNCE LAW : A.A = A ; A + A = A
IDENTITY LAW : A. 1 = A ; A + 1 = 1
NULL LAWS : A. 0 = 0 ; A + 0 = A
ABSORPTION LAWS : A + AB = A ; A (A + B) = A
[1] F1=ABC+A’B’C+A’BC+ABC’+A’B’C’
=BC (A+A’) +A’B’ (C+C’) +ABC’
=BC + A’B’ + ABC’
=A’B’ + B (C+AC’)
=A’B’ + B (A+C)
=A’B’+AB+BC
U1A
Key = A
74LS00N
Key = B
U4A
U2A
Key = A 74LS10N
74LS00N
Key = B
U3A
Key = B
74LS00N
Key = C
Key = A U2A
74LS00N
U4A
Key = B 74LS00N
Key = C 74LS10N
Key = D
Key = D
74LS00N
74LS00N
Key = B
[6] F6=AC+ABC+A’C+A’B’C+BC
=AC (1+B) +A’C (1+B’) +BC
=C (A+A’) +BC
=C (1+B)
=C
Key = A
74LS00D 74LS00D
Key = B
74LS00N
Key = B
Conclusion
Review Questions
1. Simplify each of the following function and implement them with NAND gate.
Aim: Simplifying the given Boolean function using K-map & implement it using NAND
gate only.
i. F(A,B,C,D)=∑(1,3,5,6,7,8,9,10,11,13,14,15)
ii. F(A,B,C,D)=∑(1,2,8,9,10,12,13,14)
iii. F(A,B,C,D)=∑(1,7,10,11,13) + ∑ 𝑑(5,8,15)
Simplifying the given Boolean function using K-map & implement it using NAND gate only
(i) F(A, B, C, D)=∑(1,3,5,6,7,8,9,10,11,13,14,15)
CD
AB 00 01 11 10
00 1 1
01 1 1 1
11 1 1 1
10 1 1 1 1
F=D+AB’+BC
Key = A
74LS00D
Key = B
U4A
Key = B
74LS00D 74LS10N
Key = C
Key = D
74LS00D
(ii) F(A,B,C,D)=∑(1,2,8,9,10,12,13,14)
CD
AB 00 01 11 10
00 1 1
01
11 1 1 1
10 1 1 1
F=AC’+AD’+B’C’D+B’CD’
(iii) F(A,B,C,D)=∑(1,7,10,11,13) + ∑ 𝑑(5,8,15)
CD
AB 00 01 11 10
00 1
01 X 1
11 1 X
10 X 1 1
F=BD+A’C’D+AB’C
Key = B
74LS00D
Key = D
Key = A
Key = C
74LS10N 74LS10N
Key = D
Key = A
Key = B
74LS10N
Key = C
a) A + B’C’
b) ABC + AB + DC + D’
c) A’ + B + CA
5. Convert to maxterms:
a) A (B’+ C)
b) (A’ + B’) (A + D)
a) xy + x’y’z’ + x’yz’
b) A’B + BC’ + B’C’
c) a’b’ + bc + a’bc’
d) xy’z + xyz’ + x’yz + xyz
Aim: (a) Implement half adder and full adder using digital ICs.
(b)Study 4-bit full adder and implement 8-bit adder using two 4-bit full adders.
Apparatus: IC 7486, 7408, 7432,7483 Analog and Digital Trainer kit, connecting wires.
Theory:
Half Adder: This circuit needs two binary inputs and two binary outputs. The input variables
designate the augend and addend bits; the output variables produce the sum and carry. It is
necessary to specify two output variables because the result may consist of two binary digits. We
arbitrarily assign symbols X and Y to the two inputs and S (for sum) and C (for carry) to the
outputs.
X Y C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
S=X’Y + XY’
C=XY
Logic Diagram:
Full Adder: A full-adder is a combinational circuit that forms the arithmetic sum of three input
bits. It consists of three inputs and two outputs. Two of the input variables, denoted by X and Y,
represent the two significant bits to be added. The third input Z represents the carry from the
previous lower significant position. The carry from the previous lower significant position. Two
outputs are necessary because the Arithmetic sum of three binary digits ranges in value from 0 to
3, and binary 2 or 3 needs two digits. The two outputs are designated by the symbols S for sum
and C for carry.
X Y Z C S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
S = X’Y’Z + X’YZ’ + XY’Z’ +XYZ
= Z (X’Y’ + XY) + Z’ (X’Y + XY’)
= Z (X ⊕ Y)’ + Z’ (X ⊕ Y)
S = Z ⊕ (X ⊕ Y)
Logic Diagram:
Conclusion:
Review Questions
(b) Design a 2 to 4 line Decoder with enable input using NAND gate only.
Apparatus: Analog and Digital Trainer Kit, IC 74LS138, 7408, 7410, 7400, Connecting wires.
Theory: A decoder is a combinational circuit that converts binary information from n input
lines to a maximum of 2n unique output lines. If the n-bit decoded information has unused or don’t
care combinations, the decoder output will have less than 2n outputs.
The decoders presented here are called n-to-m line decoders where m≤ 2n. Their
purpose is to generate the 2n (or less) min-terms of n inputs variables. The three inputs are
decoded into eight outputs, each output representing one of the min-terms of 3 input variables.
The three inverters provide the complement of the inputs, and each one of the eight AND gates
generates one of the min-terms. A particular application of this decoder would be a binary-to-
octal conversion.
Truth table of a 3-to-8 line decoder
Inputs Outputs
x y z D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
a) F1(A,B,C) = ∑(1,2,4,7)
F2(A,B,C) = ∑(3,5,6,7)
Logic Diagram:
b) 2 to 4 line Decoder with enable input using NAND gate
E A B D0 D1 D2 D3
1 X X 1 1 1 1
0 0 0 0 1 1 1
0 0 1 1 0 1 1
0 1 0 1 1 0 1
0 1 1 1 1 1 0
D0 = A’B’E’
D1 = A’BE’
D2 = AB’E’
D3 = ABE’
Logic Diagram:
Conclusion:
Review Questions
F1 = x’y’z’ + xz
F2 = xy’z’ + x’y
F3 = x’y’z + xy
Design a circuit with decoder and external gates.
Aim: (a) Implement priority encoder using digital ICs and verify its truth table.
(b)Design a 4-input priority encoder using basic gates & verify its performance.
Apparatus: Analog and Digital Trainer Kit, IC 74LS148, 7408, 7432, 7404, Connecting wires.
Theory: (A)
An encoder is a digital function that produces a reverse operation from that of a decoder.
An Encoder has 2n (or less) input lines and n out lines. the output lines generate the binary codes
for the 2n input variables. The type of encoder available in IC form is called a priority encoder.
These encoders establish an input priority to ensure that only the highest-priority input line is
encoded. if priority is given to an input with a higher subscript number over one with a lower
subscript number, then if both D2 and D5 are logic-1 simultaneously, the output will be 101
because D5 has a higher priority over D2.
Inputs Output
EN D3 D2 D1 D0 A1 A0 V
0 1 X X X 1 1 1
0 0 1 X X 1 0 1
0 0 0 1 X 0 1 1
0 0 0 0 1 0 0 1
1 X X X X X X 0
A1
D1 D0 00 01 11 10
D3 D2
00 0 0 0 0
01 1 1 1 1
11 1 1 1 1
10 1 1 1 1
A1=D3+D2
A0
D1 D0 00 01 11 10
D3 D2
00 0 0 1 1
01 0 0 0 0
11 1 1 1 1
10 1 1 1 1
A0=D3+ D2’D1
V= D3+D2+D1+D0
Logic Diagram:
Conclusion:
Review Questions
Aim: (a) Design a 2-to-1 line multiplexer using basic logic gates.
(b) Verify the truth table of IC 74153.
(C)Implement the following function using 4×1 MUX:
F (A, B, C) = ∑ (0, 3, 6, 7)
Apparatus: Analog and Digital Trainer kit, IC 74153, 7404, 7408, 7432, Connecting Wires.
Theory:
To multiplex means combining many into
one. We have seen multiplex cinemas
which have many auditoriums in the same
building. Likewise, multiplexer is a device
has many inputs but a single output. It is a
kind of rotary switch which connects
several inputs to the same output line. A
key idea is that only one of the many
inputs can be connected to the output at
any point of time. The selection of any
input is controlled by a set of selection
lines i.e. depending on state of selection
lines; different inputs can drive the
output. The block diagram of multiplexer
(often abbreviated as MUX) is shown in the figure. It should be noted that n selection lines are
capable of distinguishing 2n input channels. Such type of MUX is known as 2n×1 MUX. Depending
on various values of n, we can have 2×1 MUX, 4×1 MUX, 8×1 MUX and so on.
(b) IC 74153
IC 74153 is a dual 4 line-to-1 line multiplexer. Thus, it contains two on-chip multiplexers which
act independently from each other. However, they both share the same select lines.
S1 S0
A B C F
0 0 0 1
C
0 0 1 0
0 1 0 0
C
0 1 1 1
1 0 0 0
0
1 0 1 0
1 1 0 1
1
1 1 1 1
As shown, variables A and B are used as selection lines which can take four combinations. We can
confer following points after observing the truth table:
1. When AB = 00, C can take value of either 0 or 1. But for these two instances output F is
complement of C. Hence I0 must be connected to C .
2. When AB = 01, function F takes the same value as variable C. Hence, I1 must be connected
to C.
3. When AB = 10, function F maintains logic 0 independent of values of variable C. Hence I2
must be connected to logic 0.
4. When AB = 11, function F maintains logic 1 independent of values of variable C. Hence I3
must be connected to logic 1.
Based on above points, we can implement the specified Boolean function using 4×1 MUX as shown
in logic diagram below:
Conclusion:
Review Questions
1. A multiplexer with 128 input lines requires ___________ selection lines.
2. A multiplexer with three selection lines is known as _____________.
3. Design an 8×1 multiplexer using 4×1 multiplexers.
4. Implement following Boolean function using 8×1 MUX and 4×1 MUX:
F = m ( 0,1, 2, 7,9,12,14,15 )
Experiment: 8
Theory:
Gray Code system is a binary number system in which every successive pair of numbers differs in
only one bit.
Let b0, b1, b2, b3 be the bits representing the binary numbers, where b0 is the LSB and b3 is the MSB,
and Let g0, g1, g2, g3 be the bits representing the gray code of the binary numbers, where g0 is the
LSB and g3 is the MSB.
The truth table for the conversion is-
Corresponding minimized boolean expressions for gray code bits –
Conclusion:
Review Questions
Fig 1: Design of JK FF
Characteristics equation: D = JQ’ + K’Q
J K Q D Q (t+1)
0 0 0 0 0
0 0 1 1 1
0 1 0 0 0
0 1 1 0 0
1 0 0 1 1
1 0 1 1 1
1 1 0 1 1
1 1 1 0 0
• Design of RS Flip Flop using D Flip Flop (7474) is shown in figure2.
Its Characteristics table is shown in Table 2.
Characteristics equation: D = R’Q + S
Table 2: Characteristics Table
R S Q D Q (t+1)
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 1 1
1 0 0 0 0
1 0 1 0 0
1 1 0
1 1 1
Logic Diagram:
Fig 2 : design of RS FF
• Design of T Flip Flop using D Flip Flop (7473) is shown in figure3.
Its Characteristics table is shown in Table 3.
Characteristics equation: D = T’Q + TQ’
Logic Diagram:
Fig 3: design of T FF
(b) 3- bit ripple up down counter using negative triggered JK Flip-flop.(7473)
Ripple Counter
A synchronous counters are also called ripple counters. The ripple counter is the simplest
type of counter, the easiest to design and requires the least amount of hardware. In ripple
counters the FFs within the counter are not made to change the states at exactly the same time.
This is because the FFs are not triggered simultaneously. The clock does not directly control the
time at which every stage changes state. An asynchronous counter uses T FFs to perform a
counting function. The actual hardware used is usually J-K FFs connected in toggle mode,i.e. with
Js and Ks connected to logic 1. Even D FFs may be used here.
The asynchronous counter has a disadvantage, insofar as the unwanted spikes are
concerned. This limitation is overcome in parallel, counters. The asynchronous counter is called
ripple counter because when the counter, for example, goes from 1111 to 0000, the first stage
causes the second to flip, the second causes the third to flip, and the third cause the fourth to flip,
and so on. In other words, the transition of the first stage ripples through to the last stage. In doing
so, many intermediate stages are briefly entered. If there is a gate that will AND during any state,
a brief spike will be seen at the gate output every time the counter goes from 1111 to 0000. Ripple
counters are also called serial or series counters. Synchronous counters are clocked such that
each FF in the counter is triggered at the same time. This is accomplished by connecting the clock
line to each stage of the counter. Synchronous counters are faster than asynchronous counters,
because the propagation delay involved is less.
Logic Diagram:
3-bit ripple up/down counter
Conclusion:
Review Questions
Aim: (a) Design a 3-bit Synchronous up/down counter using negative edge Trigged JK Flip Flop.
(b) Design a 3-bit counter which counts as 0, 1, 3, 5, 7, 0,…. Continue Negative edge trigged
JK flip flop.
Apparatus: Analog and Digital Trainer kit, IC 7408, 7486, 7473, 7432, connecting Wires.
Theory:
Synchronous Counter
A Synchronous counters are serial counters. They are slow because each FF can change
state only if all the preceding FFs have changed their state. The propagation delay thus gates
accumulated, and so causes problems. If the clock frequency is very high, the asynchronous
counter may skip some of the states and, therefore, malfunction. This problem is overcome in
synchronous or parallel counters. Synchronous counters are counters in which all the FFs are
triggered simultaneously (in parallel) by the clock input pulses. Whether a FF toggles or not
depends on the FFs inputs (J, K or T, or S, R).
Since all the FFs change state simultaneously in synchronization with the clock pulse, the
propagation delays of FFs do not add together (as in ripple counters) to produce the overall delay.
In fact, the propagation delay of a synchronous counter is equal to the propagation delay of just
one FF plus the propagation delay of the gates involved. So, the synchronous counters can operate
at much higher frequencies than those that can be used in asynchronous counters.
Synchronous counters have the advantages of high speed and less severe decoding
problems, but the disadvantages of having more circuitry than that of asynchronous counters.
Many synchronous (parallel) counters that are available as ICs are designed to be presettable, i.e.
they can be preset to any desired starting count either asynchronously or synchronously. This
presetting operation is also referred to us loading the counter.
(a) Design a 3-bit Synchronous up/down counter using negative edge Trigged JK Flip- Flop is
shown figure 1. Its Excitation Table is shown in table 1.
Logic Diagram:
Conclusion:
.
Review Questions