Digital Practicals 1 To 6
Digital Practicals 1 To 6
Digital Practicals 1 To 6
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.
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
A
o/p
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.
Truth Table
A X
A X 0 1
1 0
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. The figure below shows the implementation.
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.
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+B+C)(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
Key = A
U1A
U3A
Key = C 74LS00N
U2A
74LS00N
Key = A
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
(a) (A + B) (C + D)
(b) (A + C) (ABC + ACD )
(c) (A + B’C) D
(a) X + Y + XY
(b) XY’ + X + (X+Y)’
3. 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
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