EC Lab4 (202211028)
EC Lab4 (202211028)
EC Lab4 (202211028)
1
Certificate
2
List of Experiments
3
Experiment 1
Basic familiarity with logic gate. Verify the truth table of given
74-series IC.
(i) AND
(ii) NAND
(iii) NOT
(iv) NOR
(v) OR
(vi) Xor
Components Required:-
• Breadboard
• IC
• LED
• Wires
• Voltage source (+5V)
4
Theory:-
AND Gate:-
NAND Gate:-
A NAND gate (“not AND gate”) is a logic gate that
produces a low output (0) only if all its inputs are true,
and high output (1) otherwise. Hence the NAND gate
is the inverse of an AND gate, and its circuit is
produced by connecting an AND gate to a NOT gate.
5
NOT Gate:-
A NOT gate, often called an inverter, is a nice digital
logic gate to start with because it has only a single
input with simple behavior. A NOT gate performs
logical negation on its input. In other words, if the
input is true, then the output will be false. Similarly, a
false input results in a true output.
NOR Gate:-
A NOR gate (“not OR gate”) is a logic gate that
produces a high output (1) only if all its inputs are
false, and low output (0) otherwise. Hence the NOR
gate is the inverse of an OR gate, and its circuit is
produced by connecting an OR gate to a NOT gate.
OR Gate:-
An OR gate is a logic gate that performs logical OR
operation. A logical OR operation has a high output
(1) if one or both the inputs to the gate are high (1). If
neither input is high, a low output (0) results.
6
XOR Gate:-
Observation:-
Nand Gate:-
Truth table:
A B NAND
0 0 1
0 1 1
1 0 1
1 1 0
7
NOT Gate:-
Truth table:
A NOT
0 1
1 0
AND Gate:-
Truth table:
A B AND
0 0 0
0 1 0
1 0 0
1 1 1
8
XOR Gate:-
Truth table:
A B XOR
0 0 0
0 1 1
1 0 1
1 1 0
OR Gate:-
Truth table:
A B OR
0 0 1
0 1 1
1 0 1
1 1 0
9
NOR Gate:-
Truth table:
A B NOR
0 0 1
0 1 0
1 0 0
1 1 0
10
Conclusion:-
11
Experiment 2
Components Required:-
• Breadboard
• IC
• LED
• Wires
• Voltage source (+5V)
• NAND GATE (7400)
• NOR GATE (7402)
Software :-
• Logisim
12
Theory:-
Universal Gates:-
13
Half Adder Circuit :-
14
Characteristics Equations of Half adder :-
Truth Table:-
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
15
Half Subtractor Circuit :-
16
Characteristics Equations of Half subtractor :-
Truth Table:-
A B Difference Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
17
Observations:-
18
19
20
Conclusion:-
We have verified the truth table of all gates using universal
gates. We have also verified the truth table of half adder and
half subtractor circuit using universal gates.
*-*-*-*-*
21
Experiment 3
Components Required:-
• Breadboard
• IC
• LED
• Wires
• Voltage source (+5V)
• AND GATE (7408)
• OR GATE (7432)
• XOR GATE (7486)
Software :-
• Logisim
22
Theory:-
Full Adder:-
23
Characteristic Equations of Full Adder
Truth Table:-
A B C Sum Carry
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
24
Full Subtractor:-
25
Characteristic Equations of Full Subtractor
Difference, d=A⊕B⊕bin
d=A′B′bin+AB′b′in+A′Bb′in+ABbin
Borrow, b=A′B+(A⊕B)′bin
Truth Table:-
A B C Difference Borrow
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
26
Binary to Grey Code Convertor
Formula:-
𝐺𝑛−1 = 𝐵𝑛 ⊕𝐵𝑛−1
Formula:-
𝐵𝑛−1 = 𝐵𝑛 ⊕𝐺𝑛−1
27
2 Bit Adder Circuit :-
Truth Table:-
28
Observation:-
29
30
Conclusion:-
*-*-*-*-*
31
Experiment 4
Components Required:-
• Breadboard
• IC
• LED
• Wires
• Voltage source (+5V)
• AND GATE (7408)
• OR GATE (7432)
• XOR GATE (7486)
• NOT GATE (7402)
Software :-
• Logisim
32
Theory:-
2-Bit Comparator
33
Characteristic Equation
• A > B : A1B1’ + A0B1’B0’ + A1A0B0’
• A < B : A1’B1 + A0’B1B0 + A1’A0’B0
• A = B : A1’A0’B1’B0’ + A1’A0B1’B0 + A1A0B1B0 +
A1A0’B1B0’
• A = B : A1’B1’ (A0’B0’ + A0B0) + A1B1 (A0B0 +
A0’B0’)
• A = B : (A0B0 + A0’B0’) (A1B1 + A1’B1’)
• A = B : (A0 Ex-Nor B0) (A1 Ex-Nor B1)
Truth Table
34
2x1 Multiplexer
In 2×1 multiplexer, there are only two inputs, i.e., A0 and A1,
1 selection line, i.e., S0 and single outputs, i.e., Y. On the basis
of the combination of inputs which are present at the selection
line S0, one of these 2 inputs will be connected to the output.
Logical Expression
• Y=S0'A0+S0A
Truth Table:
35
4x1 Multiplexer
Logical Expression
• Y=S1' S0' A0+S1' S0 A1+S1 S0' A2+S1 S0 A3
36
Truth Table
37
4x2 Encoder
Let 4 to 2 Encoder has four inputs Y3, Y2, Y1 & Y0 and two
outputs A1 & A0. At any time, only one of these 4 inputs can be
‘1’ in order to get the respective binary code at the output.
38
Logical Expression
• A1=Y3+Y2
• A0=Y3+Y1
Truth Table:
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
39
2x4 Decoder
Let 2 to 4 Decoder has two inputs A1 & A0 and four outputs Y3,
Y2, Y1 & Y0. One of these four outputs will be ‘1’ for each
combination of inputs when enable, E is ‘1’.
Logical Expression
• Y3=E.A1.A0
• Y2=E.A1.A0′
• Y1=E.A1′.A0
• Y0=E.A1′.A0′
40
Truth Table:
E A1 A0 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
41
Observations :-
42
43
Conclusion:-
We have verified the truth table of 2-bit comparator. We have
also verified the truth table of 4*1 Mux using 2*1 Mux. we also
made 4x2 encoder and 2x4 decoder.
*-*-*-*-*
44