Professional Documents
Culture Documents
Laboratory Manual
(ECE211)
Dr. Pradyut Kumar Sanki
Assistant Professor
Dept. of ECE
SRM University AP, Amaravati.
3 | 55
Contents
Contents
Index 3
1 FAMILIARIZATION OF LOGIC GATES & DIGITAL ICS . . . . . . . . . 6
2 DESIGN OF CODE CONVERTERS . . . . . . . . . . . . . . . . . . . . . . 12
2.1 Design of 4-bit Binary to Gray Code Converter . . . . . . . . . . 12
2.2 To design and set up the circuits of a 4-bit Gray to Binary Code
Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3 DESIGN OF COMBINATIONAL LOGIC CIRCUITS . . . . . . . . . . . . 17
3.1 Design of Adder . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2 Design of Subtractor . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3 Parallel Adder/Subtractor . . . . . . . . . . . . . . . . . . . . . . . 19
4 DESIGN OF LOGIC CIRCUITS USING MULTIPLEXER & DEMULTI-
PLEXER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.1 Design & Verification of Multiplexer . . . . . . . . . . . . . . . . . 22
4.2 Design of Half Adder/subtractor using Multiplexer . . . . . . . 25
4.3 Design of Full Adder/subtractor using Multiplexer . . . . . . . . 26
4.4 Design & verification of De- Multiplexer . . . . . . . . . . . . . . 26
4.5 Data Transfer through Multiplexer/De-multiplexer . . . . . . . . 27
5 DESIGN OF ARITHMETIC LOGIC UNIT (ALU) . . . . . . . . . . . . . . 29
5.1 Design of programmable ALU . . . . . . . . . . . . . . . . . . . . 29
5.2 Realization of 4-bit ALU . . . . . . . . . . . . . . . . . . . . . . . . 31
6 DESIGN OF ENCODER AND DECODER . . . . . . . . . . . . . . . . . . 33
6.1 To design and set up the circuits of Encoder & Decoder . . . . . 33
6.2 To design set up the connections & verify the Encoder & Decoder
ICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.3 Design of BCD to SSD . . . . . . . . . . . . . . . . . . . . . . . . . 37
7 DESIGN OF MAGNITUDE COMPARATOR . . . . . . . . . . . . . . . . 39
7.1 Design of Magnitude comparator using logic gates . . . . . . . . 39
7.2 Design of magnitude comparator using IC . . . . . . . . . . . . . 42
8 DESIGN OF LATCHES & FLIP-FLOPS . . . . . . . . . . . . . . . . . . . 43
8.1 Design & verification of SR, JK, D, T & Master-Slave JK Flip-flops 43
9 DESIGN OF ASYNCHRONOUS COUNTER . . . . . . . . . . . . . . . . 45
10 DESIGN SYNCHRONOUS COUNTER . . . . . . . . . . . . . . . . . . . 47
10.1 Design of MOD16 Synchronous Counter . . . . . . . . . . . . . . 47
10.2 Design of MOD8 Synchronous Counter . . . . . . . . . . . . . . . 48
11 DESIGN OF SHIFT REGISTER . . . . . . . . . . . . . . . . . . . . . . . . 50
12 DESIGN OF MEMORY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
13 FSM BASED DESIGN PROJECT . . . . . . . . . . . . . . . . . . . . . . . 53
5 | 55
Contents
AIM: To familiarize with logic gate IC packages and to verify the truth tables of the
logic gates. Also to familiarize with the Digital Test Kit.
Theory:
Digital Test Kit: As digital circuits are required to handle just two levels of voltage
to represent the two possible values of any binary variable, functional testing of simple
digital circuits can be conveniently carried out by applying each input (binary) variable
through a switch and observing each output (binary) variable on a simple LED display.
Note the number of Input Switches and the number of LED Displays provided in the
kit you are using. Each Input Pin is either at LOW (Ground = 0V) level or at a HIGH
(VCC = 5V.) level depending on whether the corresponding switch is OFF or ON. Note
how the LED glows when the corresponding Display Input Pin is at a HIGH level and
when it is at a LOW level.
All circuits we will study in this course will need a 5V DC power supply, and this has
been provided in the Digital Test Kit. The Clock Generator provides different choices
of the frequency of a continuously running clock. The circuit to be studied will have
to be assembled on the breadboard. Figure 1 shows the schematic of the breadboard.
It has 128 vertical strips, 64 on each side of the horizontal divider in the middle, each
strip consisting of 5 spring-loaded tie-points internally connected to one another. Each
connection among the circuit components is made with the help of tie-points connected
together on the same strip. The breadboard also has 8 horizontal strips, four on the
top side and 4 on the bottom side, each having 25 tie-points. These strips are generally
used for making power supply connections.
6 | 55
Contents
Logic Gates & Logic Families: Logic gates: In digital electronics, a gate is logic
circuits with one output and one or inputs. Logic gates are available as integrated
circuits. AND gate: the AND gate performs logical multiplication, more commonly
known as And operation. The AND gate output will be in high state only when all
the inputs are in high state. 7408 is a Quad 2 input AND gate. OR gate: It performs
logical addition. Its output become high if any of the inputs is in logic high. 7432
is a Quad 2 input OR gate. NOT gate: It performs basic logic function for inversion
or complementation. The purpose of the inverter is to change one logic level to the
opposite level. IC 7404 is a Hex inverter. NAND gate: A NOT gate following an And
gate is called NOT-AND or NAND gate.Its output will be low if all the inputs are in
high state. 7400 IC is Quad two input NAND gate. NOR gate: A NOT gate following
an OR gate is called NOT-OR or NOR gate. Its output will be in low state if any of its
input is in high state. 7402 is a Quad two input NOR gate. EXOR gate: Its output will
be high if and only if one input is in high state. 7486 is a Quad two input EXOR gate.
Two families of digital ICs are commonly used: the TTL 74LSxx series and the CMOS
CD 40xx series. Many of these ICs have 14 pins, and some have 16 or more. Two pins
are used for power supply connections. Thus 12 pins are available in a 14-pin IC for
gate inputs and outputs. A 2-input gate requires three pins per gate (two for inputs and
one output), and so ICs that implement 2-input logic functions generally have 4 gates
per IC. TTL ICs require a fixed DC power supply voltage VCC having the nominal
value of 5V and a tolerance of 5%, i.e. 4.75V ≤ VCC ≤ 5.25V; a voltage outside this
range can damage the IC. Most CMOS ICs can work with 3V ≤ VCC ≤ 15V.
7 | 55
Contents
8 | 55
Contents
9 | 55
Contents
Results: All the gates are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
Identification
HD 54 LS 10
SN 74 HCT 2G 04 N
Package Designation
Device Number
Gates Count
Technology Indicator
Specs/Temp Indicator
Manufacturer Prefix
CMOS: C - CMOS
AC / ACT - Advanced CMOS (T version for TTL-compatible inputs)
HC / HCT - High-speed CMOS, similar to LS (T version for TTL-compatible inputs)
AHC / AHCT - Advanced high-speed CMOS (T version for TTL-compatible inputs)
LV / LVC’ - Low-Voltage CMOS
Device Number:
10 | 55
Contents
11 | 55
Contents
AIM: To design and set up the circuits of a 4-bit Binary to Gray Code Converter
Step 1: The MSB in the Gray code is the same as the corresponding bit in a binary
number.
Step 2: Going from left to right, add each adjacent pair of binary digits to get the next
Gray code digit. Disregard carries. As the first step to design a binary to Gray
Code Converter, write the truth table ?? with binary numbers B8B4B2B1 and
corresponding gray code numbers G3G2G1G0. Set up a circuit realizing the
simplified logic expressions obtained using K-Maps for G0, G1, G2 and G3 as the
functions of B8, B4, B2 and B1.
12 | 55
Contents
G3 = B8 G2 = B8 ⊕ B4 (1)
B2 B1 B2 B1
00 01 11 10 00 01 11 10
00 0 0 0 0 00 0 0 0 0
01 0 0 0 0 01 1 1 1 1
B8 B4 B8 B4
11 1 1 1 1 11 0 0 0 0
10 1 1 1 1 10 1 1 1 1
G1 = B4 ⊕ B2 G0 = B2 ⊕ B1 (2)
B2 B1 B2 B1
00 01 11 10 00 01 11 10
00 0 0 1 1 00 0 1 0 1
01 1 1 0 0 01 0 1 0 1
B8 B4 B8 B4
11 1 1 0 0 11 0 1 0 1
10 0 0 1 1 10 0 1 0 1
Circuit diagram:
13 | 55
Contents
Figure 4: Circuit diagram for Binary to Gray and Gray to Binary converter
14 | 55
Contents
THEORY: To convert from Gray code to binary, the following rules are applied.
Step 1: The most significant digit in the binary number is the same as the corresponding
digit in the Gray code.
Step 2: Add each binary digit generated to the Gray code digit in the next adjacent
position. Disregard carries.
To design the Gray to Binary code converter, write the truth table and get simplified
expressions using K-Maps for each binary bits as a function of Gray code bits. Each
Gray code number differs from the preceding number by a single bit.
B8 = G3 B4 = G3 ⊕ G2 (3)
15 | 55
Contents
X1 X0 X1 X0
00 01 11 10 00 01 11 10
00 0 0 0 0 00 0 0 0 0
01 0 0 0 0 01 1 1 1 1
X3 X2 X3 X2
11 1 1 1 1 11 0 0 0 0
10 1 1 1 1 10 1 1 1 1
B2 = G3 ⊕ G2 ⊕ G1 B1 = G3 ⊕ G2 ⊕ G1 ⊕ G0 (4)
X1 X0 X1 X0
00 01 11 10 00 01 11 10
00 0 0 1 1 00 0 1 0 1
01 1 1 0 0 01 1 0 1 0
X3 X2 X3 X2
11 0 0 1 1 11 0 1 0 1
10 1 1 0 0 10 1 0 1 0
Results: Both the circuits have verified with the truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
16 | 55
Contents
AIM: To design and set up the circuits of a Half Adder (HA) & Full Adder (FA).
Components Required: Digital Test Kit, ICs - 7486, 7432, 7408, 7400, Connecting
patch chords.
Theory: A binary Full Adder adds two bits A and B along with a carry in C to
generate sum (Sout) and carry (Cout) bits as output. The first step to achieve this is to
make a binary Half Adder, which adds two binary inputs A and B to give a sum S1
and a carry C1 according to the following Boolean expressions for the outputs S1 and
C1.
S1 = A · B + A · B = A ⊕ B (5)
Another Half Adder is then used to generate the final Sout by adding the third
binary input C to the S1 bit generated by the first Half Adder (HA1).
Sout = S1 ⊕ C (6)
C2 = S1 · C (7)
Write down the complete truth table of a Full Adder, including columns for the
intermediate outputs S1, C1 and C2. Find out the logic for generating the final Cout
output from C1 and C2. As XOR and AND gates are going to be used for the Half
Adders, try to obtain a logic for Cout using the same type of gates, so that the complete
realisation of the Full Adder is possible without necessitating a third IC. Set up the
circuit of a Half Adder using an XOR gate and an AND gate. Apply the inputs A and
B from two input switches and observe the outputs S1 and C1 on two LED displays
for all combinations of the inputs. Tabulate these values and verify the operation of
the Half Adder. Set up another Half Adder using another XOR and another AND
gate out of the same ICs used in step 1, and connect the C input and the S1 output
generated by the first Half Adder as its inputs to generate the final Sout output and
the C2 output. Generate the final Cout from the intermediate carry outputs C1 and
C2, using the unused gates in the XOR and AND ICs deployed so far. Verify the truth
table experimentally by applying the inputs A, B and C through three input switches
and displaying the S1, C1, C2, Sout and Cout outputs.
Circuit diagram:
Results: All the gates are verified with their truth table.
17 | 55
Contents
Inputs Outputs
Dec
A B S1 C1
0 0 0 0 0
1 0 1 1 0
2 1 0 1 0
3 1 1 0 1
Outputs
Inputs
Dec HA1 HA2
Cout
A B Cin S1 C1 Sout C2
0 0 0 0 0 0 0 0 0
1 0 0 1 0 0 1 0 0
2 0 1 0 1 0 1 0 0
3 0 1 1 1 0 0 1 1
4 1 0 0 1 0 1 0 0
5 1 0 1 1 0 0 1 1
6 1 1 0 0 1 0 0 1
7 1 1 1 0 1 1 0 1
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
AIM: To design and set up the circuits of a Half Subtractor (HS) & Full Subtractor
(FS).
Components Required: Digital Test Kit, ICs - 7486, 7432, 7408, 7400, Connecting
patch chords.
Theory: A binary Full Subtractor subtracts the Subtrahend bit Y and a Borrow-
in bit Z from the Minuend bit X to generate Borrow (Bout) and Difference (Dout) bits
as output. Obtain the logic for performing subtraction and modify the Full Adder
circuit appropriately for performing subtraction. Verify the truth table experimentally
by applying the inputs X, Y and Z through three input switches and displaying the
Bout and Dout output bits.
Circuit diagram:
18 | 55
Contents
Figure 5: Circuit diagram of (a) Half Adder & (b) Full Adder
Inputs Outputs
Dec
A B D1 B1
0 0 0 0 0
1 0 1 1 1
2 1 0 1 0
3 1 1 0 0
Results: All the gates are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
AIM: To design and set up the circuit of a 4-bit Binary Adder/Subtractor using
IC 7483
Theory: 7483 is a TTL IC with 4 full adders in it by which we can add two 4
bit numbers. In a 4 bit adder A3A2A1A0 and B3B2B1B0 are the inputs and Cout and
S3S2S1S0 are the outputs. CARRYIN pin is grounded for 4 bit adder. This is also called
a nibble adder.
4 bit add/subtract circuit:: The circuit is setup as shown in Fig. 9. To add the
nibbles, SUB is to be made 0. To subtract B3B2B1B0 from A3A2A1A0 Sub is to made 1.
XOR gates function as controlled invertors. When SUB=1, B3B2B1B0 is complemented
.Now A3A2A1A0, complemented version of B3B2B1B0 and 1 at Cin pin are added
19 | 55
Contents
Outputs
Inputs
Dec HS1 HS2
Bout
X Y Z D1 B1 Dout B2
0 0 0 0 0 0 0 0 0
1 0 0 1 0 0 1 1 1
2 0 1 0 1 1 1 0 1
3 0 1 1 1 1 0 0 1
4 1 0 0 1 0 1 0 0
5 1 0 1 1 0 0 0 0
6 1 1 0 0 0 0 0 0
7 1 1 1 0 0 1 1 1
6 1 1 0 0 1 0 0 1
7 1 1 1 0 1 1 0 1
Figure 6: Circuit diagram of (a) Half Subtractor & (b) Full Subtractor
together. Cout is ignored. Thus the 2’s complement of subtractend is added with the
minuend. It minuend is less than subtractend; the obtained output will be the 2’s
complement of difference. In this part, we will study the performance of the Four-bit
Adder 74LS83 capable of adding two 4-bit operands with Carry. This is an IC chip
having a combinational function more complex than simple logic gates integrated on
a single chip at the Medium Scale Integration (MSI) level. The operation of the 4-bit
adder is straightforward: the two 4-bit inputs A4A3A2A1 and B4B3B2B1 (A1, B1 are
the least significant bits and A4, B4 are the most significant bits) are added, along with
the carry input C0 (coming from the lower significant set of bits, if any), according to
binary arithmetic ∑ 1 − ∑ 4 is the 4-bit sum output and C4 is the carry output, if any.
Apply at least 16 different sets of inputs to the 4-bit Adder, using the input switches
for providing the necessary inputs, with a fixed (0/1) input to the carry input CYI by
connecting it to Gnd/VCC, and observe the five outputs on the LED displays. Tabulate
your observations and verify the results by calculating the sum and carry outputs.
Circuit Diagram:
20 | 55
Contents
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
21 | 55
Contents
Components Required: Digital Test Kit, ICs 7400, 7410, 74153, 74151, 74148 &
Connecting patch chords.
22 | 55
Contents
S1 S1 S0 Y
0 0 0 D0
S1 S0 Y 0 0 1 D1
S Y 0 0 I0 0 1 0 D2
0 I0 0 1 I1 0 1 1 D3
1 I1 1 0 I2 1 0 0 D4
1 1 I3 1 0 1 D5
1 1 0 D6
1 1 1 D7
Table 10: Truth Table for 2:1, 4:1 & 8:1 Muxes
A four-to-one-line multiplexer is shown in Fig. 11. Each of the four inputs,I0 through
I3 , is applied to one input of an AND gate. Selection lines S1 and S0 are decoded to
select a particular AND gate. The outputs of the AND gates are applied to a single OR
gate that provides the one-line output. The function table lists the input that is passed
to the output for each combination of the binary selection values. To demonstrate the
operation of the circuit, consider the case when S1 S0 = 10. The AND gate associated
with input I2 has two of its inputs equal to 1 and the third input connected to I2 . The
other three AND gates have at least one input equal to 0, which makes their outputs
equal to 0. The output of the OR gate is now equal to the value of I2 , providing a path
from the selected input to the output.It is also called Data Selector. Various multiplexer
IC’s are available with 2, 4, & 8 inputs and 1 output. They have control inputs to carry
out this operation. 74148 – It is a 2 line to 1 line multiplexer. It has one select inputs
and an active low strobe input. The data inputs are designated as D0 & D2. One bit
binary number at the data select inputs S select the data input to be directed to the
output. The strobe input is used to activate or deactivate the chip. 74153 – It is a 4
line to 1 line multiplexer. It has 2 select inputs and an active low strobe input. The
data inputs are designated as D0 through D3 .Two bit binary number at the data select
inputs S0 & S1 select the data input to be directed to the output. The strobe input is
used to activate or deactivate the chip. 74151 – It is a 8 line to 1 line multiplexer. It
has 3 select inputs and an active low strobe input. The data inputs are designated as
D0 through D7 .Three bit binary number at the data select inputs S0 , S1 & S2 select
the data input to be directed to the output. The strobe input is used to activate or
deactivate the chip.
Y = S2 .S1 .S0 .D0 + S2 .S1 .S0 .D1 + S2 .S1 .S0 .D2 + S2 .S1 .S0 .D3 + S2 .S1 .S0 .D4 +
(10)
S2 .S1 .S0 .D5 + S2 .S1 .S0 .D6 + S2 .S1 .S0 .D7 .
Pin diagram:
23 | 55
Contents
(a) (b)
24 | 55
Contents
Circuit diagram:
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
AIM: To design and set up the circuits of Half Adder/subtractor using Mux
Components Required: Digital Test Kit, ICs 74153, 7404 & Connecting patch
chords.
Theory:
Figure 12: Circuit diagram for Half Adder & Half Subtractor using 4:1 Mux
Circuit diagram:
Results: All the gates are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
25 | 55
Contents
AIM: To design and set up the circuits of a Full Adder/subtractor using Mux
Components Required: Digital Test Kit, ICs 74153, 7404& Connecting patch
chords.
Theory:
Figure 13: Circuit diagram for Full Adder & Full Subtractor using 4:1 MUX
Circuit diagram:
Results: All the gates are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
AIM: To design and set up the circuits of an 4:1 De-multiplexer using logic gates
Components Required: Digital Test Kit, ICs 7404, 7408 & Connecting patch
chords.
26 | 55
Contents
Theory: A demultiplexer (or demux) is a device that takes a single input line
and routes it to one of several digital output lines. A demultiplexer of 2n̂ outputs has
n select lines, which are used to select which output line to send the input.
Circuit diagram:
Results: All the gates are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
Components Required: Digital Test Kit, ICs 74153, 74139 & Connecting patch
chords.
Theory: Communication between Mux & Dmux is set up to study the serial
transfer of data.
Circuit diagram:
Results: All the gates are verified with their truth table.
27 | 55
Contents
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
28 | 55
Contents
Components Required: Digital Test Kit, ICs 7860, 7404, 74157, 74151 & Con-
necting patch chords.
Step 1: The final ALU output bits Y0 and Y1 will be generated by the two 8-input multi-
plexers – referred to as MUX0 and MUX1 respectively. The required data, select
and output enable inputs of MUX0 and MUX1 are shown in Fig. 20. Note
that MUX0 is always enabled, while MUX1 is enabled only when F2 = 1, i.e.
for Arithmetic functions only. This is because Y1 is required only to provide
the CARRY/BORROW output for Arithmetic functions. Verify theoretically that
MUX0 and MUX1 do generate the outputs Y0 and Y1 as required by Table 11
Step 2: Note that though the two 8-input multiplexers MUX0 and MUX1 require 16
inputs, they involve only 6 distinct Boolean functions of A, B, C – A · B, A · B,
A + B, A + B, A ⊕ B and A ⊕ B ⊕ C. The first four terms are realised by four
2-input multiplexers as shown in Fig. ??. This implementation requires only
one chip, whereas any implementation using gates would need more, as a single
gate chip contains only one kind of gate (AND/OR/NAND/NOR). Assemble
the circuit given in Fig. ?? and verify its operation by actual tabulation of the
observed outputs for all combinations of values of A and B applied from two
Input Switches.
29 | 55
Contents
Step 3: Connect the same A and B inputs to the inputs of one of the gates in the XOR
chip to generate A ⊕ B. Generate ( A ⊕ B) ⊕ C by applying ( A ⊕ B) and C to a
second XOR gate. Verify the logic of these two outputs for all combinations of
values of A, B and C.
Step 4: Assemble the complete circuit by adding two 74LS151 chips, used as MUX0 and
MUX1, to the circuit assembled so far, making connections to all the inputs of
MUX0 and MUX1 according to Fig. 17. Use a third gate from the XOR chip to
generate F2(= F2 ⊕ 1), providing the Enable input for MUX1.
Step 5: Apply all the combinations of the Function select inputs F2 F1 F0 one by one and
tabulate the observed outputs Y0 and Y1 for as many combinations of the data
inputs A, B, C as possible. Verify that the tabulated results conform to the ALU
functions given in Table 11.
F2 F1 F0 ALU Function Y1 Y0
000 0 (Zero) - 0
001 A OR B - A+B
010 A AND B - A·B
011 A EXOR B - A⊕B
100 A PLUS B Carry Sum
101 A MINUS B Borrow Difference
110 A PLUS B PLUS C Carry Sum
111 A MINUS B MINUS C Borrow Difference
Truth Table:
Pin diagram:
Circuit diagram:
Results: All the gates are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
30 | 55
Contents
Components Required: Digital Test Kit, ICs 74181 & Connecting patch chords.
Theory: The Arithmetic Logic Unit (ALU) is the kernel block of a central
processing unit (CPU). The ALU can perform various arithmetic operations such as
parallel addition and subtraction. You have already learned the adder structure in
Experiment 4. The adder introduced in Experiment 4 is a one-bit adder. However, data
to be handled and processed in the ALU are often represented by several bits (usually
the width of a CPU word). Using the adder in Experiment 4 to process one bit at a
time would be too slow. Therefore the ALU is normally required to have the ability to
perform parallel addition and subtraction, so that addition and subtraction of several
bits can be performed simultaneously. Apart from speed, the ALU is also required to
have flexibility. The function of the ALU can be controlled or programmed to carry out
different arithmetic functions.
The ALU device used in this experiment is 74181 and its pin assignment is shown
in Fig.??. 74181 consists of four parallel full adder/subtractor circuits. Data applied
on the inputs Ai’s and Bi’s are processed and the sum or difference is available at the
31 | 55
Contents
output in a parallel format. Selection of the desired ALU function is controlled by five
control lines, S0–S3, and mode, M in Fig. 19.
Pin diagram:
Results: All the gates are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
32 | 55
Contents
AIM: To design & verify the operation of 8 to 3-line Encoder using logic gates
Components Required: Digital Test Kit, IC 7432, 7404, 7408 & Connecting patch
chords.
Theory:
33 | 55
Contents
z = D1 + D3 + D5 + D7.
y = D2 + D3 + D6 + D7. (11)
x = D4 + D5 + D6 + D7.
34 | 55
Contents
Inputs Outputs
D0 D1 D2 D3 D4 D5 D6 D7 x y z
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
one for each element of the code. The operation of the decoder may be clarified by the
truth table listed in Table 13.
For each possible input combination, there are seven outputs that are equal to 0
and only one that is equal to 1. The output whose value is equal to 1 represents the
minterm equivalent of the binary number currently available in the input lines.
Circuit diagram:
35 | 55
Contents
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
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
Theory: An encoder has 2n̂ input lines and n output lines. The output lines
generate the binary code corresponding to the input value. The IC74148 is the 8:3
encoder which contains 8 inputs and 3 outputs. Decoder is a combinational circuit
which contains n input lines to 2n̂ output lines. The IC74138 is the 3:8 decoder which
contains three inputs and 8 outputs and also three enables out of them two are active
low and one is active high. Here, we are verifying the encoder decoder together using
the circuit diagram in Fig. 23.
Circuit diagram:
36 | 55
Contents
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
AIM: To study the use of a Decoder Chip (IC 7447) to drive a LED Display
Components Required: Digital Test Kit, IC7447, RESISTOR 47Ω, SSD &
Connecting patch chords.
37 | 55
Contents
significant. The four-bit BCD digit is converted to a seven-segment code with outputs a
through g . The outputs of the 7447 are applied to the inputs of the 7730 (or equivalent)
seven-segment display. This IC contains the seven light-emitting diode (LED) segments
on top of the package. The input at pin 14 is the common anode ( CA ) for all the LEDs.
A 47Ω resistor toVC C is needed in order to supply the proper current to the selected
LED segments. Other equivalent seven-segment display ICs may have additional anode
terminals and may require different resistor values.
Circuit diagram:
Results: All the decimal values are noted and verified with the truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
38 | 55
Contents
Components Required: IC 7404, 7408, 7432, 7486 & Digital Test Kit.
Truth Table:
39 | 55
Contents
B1 B0 B1 B0
00 01 11 10 00 01 11 10
00 0 1 1 1 00 0 0 0 0
01 0 0 1 1 01 1 0 0 0
A1 A0 A1 A0
11 0 0 0 0 11 1 1 0 1
10 0 0 1 0 10 1 1 0 0
f ( A < B) = A1 .B1 + A0 .B1 .B0 + A1 .A0 .B0 . f ( A > B) = A1 .B1 + A0 .B1 .B0 + A1 .A0 .B0 .
(12)
40 | 55
Contents
B1 B0
00 01 11 10
00 1 0 0 0
01 0 1 0 0
A1 A0
11 0 0 1 0
10 0 0 0 1
f ( A = B) = A1 .A0 .B1 .B0 + A1 .A0 .B1 .B0 + A1 .A0 .B1 .B0 + A1 .A0 .B1 .B0
= A1 .B1 ( A0 .B0 + A0 .B0 ) + A1 .B1 ( A0 .B0 + A0 .B0 )
(13)
= ( A0 .B0 + A0 .B0 )( A1 .B1 + A1 .B1 )
= ( A0 B0 )( A1 B1 ).
Circuit diagram:
Results: All the gates are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
41 | 55
Contents
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
Pin diagram:
Circuit diagram:
Results: All the outputs are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
42 | 55
Contents
S R Q(t+1)
0 0 Q(t)
0 1 0
1 0 1
1 1 Invalid
Table 15: Truth Table of SR F/F
AIM: To set up and test the following flipflops using ICs 7400 and 7410. (1) SR
FF(2) JK FF(3)D FF (4) T FF(5) MS JK FF
Components Required: ICs 7400, 7410, bread board, power supply, connecting
wires, Digital Test Kit.
43 | 55
Contents
J K Q(t+1)
0 0 Q(t)
0 1 0
1 0 1
1 1 Q(t)
Table 17: Truth Table of JK F/F
T Q(t+1)
0 Q(t)
1 Q(t)
D Q(t+1)
0 0
1 1
Table 20: Truth Table of D F/F
44 | 55
Contents
Circuit diagram:
Results: All the gates are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
AIM: To set up the following counters using JK FF (1) 4 bit binary up counter (mod16)
(2) 4 bit binary down counter (3) Decade counter. (4) 3 bit up/down counter using
mod control
45 | 55
Contents
CLK Q3 Q2 Q1 Q0 CLK Q3 Q2 Q1 Q0
0 0 0 0 0 0 1 1 1 1
1 0 0 0 1 1 1 1 1 0
2 0 0 1 0 2 1 1 0 1
3 0 0 1 1 3 1 1 0 0
4 0 1 0 0 4 1 0 1 1
5 0 1 0 1 5 1 0 1 0
6 0 1 1 0 6 1 0 0 1
7 0 1 1 1 7 1 0 0 0
8 1 0 0 0 8 0 1 1 1
9 1 0 0 1 9 0 1 1 0
10 1 0 1 0 10 0 1 0 1
11 1 0 1 1 11 0 1 0 0
12 1 1 0 0 12 0 0 1 1
13 1 1 0 1 13 0 0 1 0
14 1 1 1 0 14 0 0 0 1
15 1 1 1 1 15 0 0 0 0
Table 22: 4-bit Binay Up Counter Table 23: 4-bit Binay Down Counter
the Q output of the proceeding FF. The outputs are taken from the Q outputs. Initially
all Q outputs are set. At the 16th clock pulse all Q outputs become reset and cycle
repeats. (3) Decade counter: The circuit of the decade counter is similar to the 4 bit
ripple counter ,but with the aid of a logic circuit the count is limited to 9.As soon as the
count 1010 takes place, a NAND gate clears the flip flops and counting restarts from 0.
(4) 3 bit up/down counter: The direction of counting sequence is made dependant on
a mode control input. A logic circuit connected between the flip flop does a mere job of
connecting either if the Q or Q .When mode control is 1 Q outputs are connected to the
clock inputs of the succeeding flip flops .If mode control is 0, Q outputs are connected
to the clock inputs.
Circuit diagram:
Results: All the gates are verified with their truth table.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table?
46 | 55
Contents
CLK Q3 Q2 Q1 Q0
0 0 0 0 0 M Q2 Q1 Q0 M Q2 Q1 Q0
1 0 0 0 1 1 0 0 0 0 1 1 1
2 0 0 1 0 1 0 0 1 0 1 1 0
3 0 0 1 1 1 0 1 0 0 1 0 1
4 0 1 0 0 1 0 1 1 0 1 0 0
5 0 1 0 1 1 1 0 0 0 0 1 1
6 0 1 1 0 1 1 0 1 0 0 1 0
7 0 1 1 1 1 1 1 0 0 0 0 1
8 1 0 0 0 1 1 1 1 0 0 0 0
9 1 0 0 1 Table 25: 3-bit Binay Up-Down Counter
Table 24: Decade Counter
Components Required: Digital Test Kit, IC7474, 7486, 7408 & patch chords.
Step 1: Find the number of flip flops using the relation M = 2 N where M is the modulus
47 | 55
Contents
of the counter and N is the minimum number of flip flops required =N = log2 M.
Step 3: Determine the flip-flops inputs which must be present for the desired next state
using excitation table of flip-flops.
Step 4: Prepare Karnaugh maps for each FF input in terms of FF outputs as the input
variables. Obtain the minimized expressions from K-maps.
Circuit diagram:
Components Required: Digital Test Kit, IC7474, 7486, 7408 & patch chords.
48 | 55
Contents
Step 3: Determine the flip-flops inputs which must be present for the desired next state
using excitation table of flip-flops.
Step 4: Prepare Karnaugh maps for each FF input in terms of FF outputs as the input
variables. Obtain the minimized expressions from K-maps.
49 | 55
Contents
Circuit diagram:
Results:
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
table or excitation table? Maecenas non massa. Vestibulum pharetra nulla at lorem.
Duis quis quam id lacus dapibus interdum. Nulla lorem. Donec ut ante quis dolor
bibendum condimentum. Etiam egestas tortor vitae lacus. Praesent cursus. Mauris
bibendum pede at elit. Morbi et felis a lectus interdum facilisis. Sed suscipit gravida
turpis. Nulla at lectus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices
posuere cubilia Curae; Praesent nonummy luctus nibh. Proin turpis nunc, congue eu,
egestas ut, fringilla at, tellus. In hac habitasse platea dictumst.
AIM: To set up and verify the performance of a serial in parallel out shift register
and Serial/parallel input shift register using mode control using JK and D flip flops.
Theory: A register is a group of flip flops that can be used to store a binary number.
A shift register is nothing but a register which access a binary number and shifts it. The
data can be entered to the shift register either in serial or parallel. Similarly, the output
can be taken from it either serial or in parallel. Since there are Two ways to shift data
into a register and similarly two ways to shift data out of register, four basic register
50 | 55
Contents
types can be constructed viz., Serial in Serial out (SISO), serial in parallel out (SIPO),
parallel in serial out(PISO), parallel in parallel out(PIPO). Serial input Shift register:
As its name suggests , serial input shift register allows the data to enter serially. The
output data can be available in parallel or serial. Serial/parallel shift register using
mode control: In this type of shift register data can be fed in serial or parallel using the
mode control pin. Output can be taken serial or in parallel. Serial input is fed through
pin number 2 of 4 × 1 MUX and parallel input I3 I2 I1 I0 is fed through pin number 3 of
4 × 1 MUX. Serial output is taken from A3 and parallel output from A3 A2 A1 A0 .
Circuit diagram:
12 DESIGN OF MEMORY
Components Required: Digital Test Kit, IC7489, 74193 & patch chords.
Theory: IC7489 is a 16×4 RAM. The pin assignments to the inputs and outputs are
shown in Fig.36a. The four address inputs select 1 of 16 words in the memory. The least
significant bit of the address is A and the most significant is A3. The Memory Enable
(ME) input must be equal to 0 to enable the memory. If ME is equal to 1, the memory
is disabled and all four outputs are in a high-impedance state. The write enable (
WE ) input determines the type of operation, as indicated in the function table. The
write operation is performed when WE = 0. This operation is a transfer of the binary
number from the data inputs into the selected word in memory. The read operation is
51 | 55
Contents
Function Table
ME WE Operation Data outputs
0 0 Write High impedance
0 1 Read Complement of selected word
1 X Disable High impedance
Circuit diagram:
Results: Tabulate the value you have written & read while doing the write & read
operations.
Conclusions: What is problem faced by the you while performing the lab. How
problems are rectified? Is the execution done by first attempt? If not write reason.
Finally, is the lab successfully executed or the inputs/outputs verified from the truth
52 | 55
Contents
(a) Pin diagram of IC 7489 (b) Circuit diagram for Read & Write operation of RAM
53 | 55
Bibliography
Bibliography
[1] Digital Design: With an Introduction to the Verilog HDL by M. Moris Mano,
Michael D. Ciletti, 5th Edition, Pearson, 2013.
55 | 55