Addc Lab Manual (Ec322i2e)
Addc Lab Manual (Ec322i2e)
Addc Lab Manual (Ec322i2e)
NAME
USN
BATCH
SECTION
STAFF DETAILS
EVALUATION
WEEKLY
EVALUATION*
LAB CIE
TOTAL
*OBE Sheet Evaluation
Signature of the Faculty
MISSION
M1: Creating an academic ambience to impart holistic education focusing on individual
growth, integrity, ethical values and social responsibility.
M3: Fostering innovation and creativity through competitive environment with state of-
the-art infrastructure.
MISSION
M1: Inculcating a distinctive teaching learning process to provide extensive knowledge of
principles and solutions to challenges in the relevant domain.
M2: Nurturing the growth of every individual through inventive, dynamic and conductive
learning environment using modern education techniques and industry-oriented pedagogy.
M3: Imparting leadership qualities with ethical values among students to cater societal and
environmental needs.
EC322I2E Design shift registers & Synchronous counters using flip-flops. CL3
Develop Mealy/Moore FSM models and state diagrams for the given
EC322I2E CL3
sequential circuits.
CO-PO-PSO Mapping
POs
COs 1 2 3 4 5 6 7 8 9 10 11 12 PSO1 PSO2 PSO3
EC322I2E 3 3 2 2 2 2 2 2 2
EC322I2E 3 2 2 2 2 2 2 2 2
EC322I2E 3 2 2 2 2 2 2 2 2
EC322I2E 3 2 2 2 2 2 2 2 2
EC322I2E 3 2 2 2 2 2 2 2 2
Implementation of
3 (i) Parallel Adder/Subtractor using IC 7483. 19-25
(ii)BCD to Excess-3 code conversion and vice-versa.
4 Demonstrate the conversion of Binary to Gray code and vice versa 26-32
Realize
10 I. Ring Counter using IC7476 58-62
ii. Jhonson counter using IC7476
1.1 Objectives:
Simplification, realization of Boolean expressions using logic gates & universal gates.
1.4 Introduction:
Logic gates are electronic circuits that operate on one or more input signals to produce an
output signal. The gates are blocks of hardware that produces the equivalent of logic 1 or
logic 0 output signals if input logic requirements are satisfied. Gate INPUTS are driven by
voltages having two nominal values, e.g. 0V and 5V representing logic 0 and logic 1
respectively. The OUTPUTS of a gate provide two nominal values of voltage only, e.g. 0V
and 5V representing logic 0 and logic 1 respectively. There is always a time delay between
an input being applied and the output responding. The different types of logic gates are as
follows:
NOT GATE: It has one input and one output. The output is the complement of the input.
OR GATE: The gate has two inputs and one output. The output is logic ‘1’ when either of the
inputs or both the inputs are at logic’1’.
AND GATE: The gate has two inputs and one output. The output is logic ‘1’ only when both
the inputs are high.
NAND GATE: It is an AND gate followed by a NOT gate. It is the complement of AND gate.
The output is logic ‘0’ when both the inputs are at logic ‘1’; else the output is always in the
high state.
NOR GATE: It is an OR gate followed by a NOT gate. It is the complement of OR gate.
The outputis logic ‘1’ when both the inputs are at logic ‘0’; else the output is always in the low state.
EXOR GATE: It is logic gate whose output is in the high state when both the inputs are
not same. When the both the inputs are high and when both are low, the output is low.
EXNOR GATE: It is logic gate whose output is in the high state when the both the inputs
are high and when both are low. The output is low when both the inputs are not same
1.5 Procedure:
1. Check all the components & patch cords, whether they are in good condition.
5.Verify the Truth Table & Observe the output for corresponding combination
1.6 Observations:
0 1
Ā
1 0
2. OR Gate: - [IC7432]
Truth Table
Input Output
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
Input Output
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
A B C
0 0 1
0 1 1
1 0 1
1 1 0
A B Y
0 0 1
0 1 0
1 0 0
1 1 0
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
Truth Table
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
Truth Table
(b) OR GATE
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
0 1
1 0
A B Y
0 0 1
0 1 0
1 0 0
1 1 0
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
A B Y
0 0 1
0 1 0
1 0 0
1 1 1
1.NOR Gate As
(a) AND GATE
Truth Table
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
(b) OR GATE
Truth Table
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
0 1
1 0
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
Truth Table
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
A B Y
0 0 1
0 1 0
1 0 0
1 1 1
1.6 Results:
• What is the primary motivation of using Boolean algebra to simplify logic expression?
• Which of the 2-input logic gate can be used to implement an inverter circuit?
• Which are the logic gates whose all output entries are logic 1 except for one entry there is
logic 0?
• TTL operates from a to volts.
2.1 Objectives:
i) To realize Half adder, Full adder using basic gates and NAND gates.
ii) To realize Half subtractor& Full subtractor using basic gates and NAND gates.
2.3 Pre-Requisite: Operation of basic gates and universal gates, Binary addition and subtraction,
simplification of Boolean expressions, Boolean laws and theorems.
2.4 Introduction:
An adder is a digital circuit that performs addition of numbers. The half adder adds two binary
digits and produces two outputs as sum and carry; XOR is applied to both inputs to produce
sum and AND gate is applied to both inputs to produce carry.
The full adder adds 3 one-bit numbers, where two can be referred to as operands and one can
be referred to as bit carried in. And produces 2-bit output, and these can be referred to as
output carry and sum.
The simplest binary subtractor is called half subtractor. It has two input bits and two output bits.
One output bit is the Difference and the other is borrowed. They are represented by ‘D’ and ‘B’
respectively in logic symbol.
When two input bits and a borrow have to be subtracted the number of input bits equal to three
and the input combinations increases to eight, for this a full subtractor is used.
2.5 Procedure:
1. Check all the components & patch cords, whether they are in good condition.
5. Verify the Truth Table & Observe the output for corresponding combination.
Inputs Output
A B carry sum
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
K-map Simplification
CARRY=AB
K-map Simplification
I. HALF SUBTRACTOR
A B Difference Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
K-Map Simplification
̅̅̅̅ +𝐵𝐴
DIFFERENCE D =𝐴𝐵 ̅̅̅̅
= A+B
BORROW = 𝐴B
A B C Borrow Difference
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 1 0
1 0 0 0 1
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
K-map Simplification
2.6 Results:
• Truth Table of Half adder, Full adder, half subtractor& Full subtractor is realized using
basic gates and NAND gates.
3.1 Objectives:
i) Realization of Parallel adder/subtractor using 7483chip
ii) BCD to EXCESS-3 code conversion and vice versa
3.2 Apparatus Required:
Component Specification Qty
4-Bit Full Adder IC 7483 1
2 I/P NAND Gate IC 7400 1
3 I/P NAND Gate IC 7410 1
XOR Gate IC 7486 2
Patch Cord - 1 set
Digital IC Trainer Kit - 1
3.3 Pre-Requisite: Number Systems, binary addition and subtraction, subtraction using 1’s & 2’s
complement, Number conversion methods.
3.4 Introduction:
Many high-speed adders available in integrated circuit form utilize the look ahead carry or a
similar technique for reducing overall propagation delays. A parallel adder consists of n
number of full adders and look ahead carry circuitry needed for high speed operation. A
parallel subtractor is one where subtraction done by full adder and ahead carry circuitry. For
subtraction Cin is made equal to 1 and A-B format is used.
The Excess-3code for a decimal digit is the binary combination corresponding to the decimal
digit plus 3. For example, the excess-3 code for decimal digit 5 is the binary combination for
5+3=8, which is 1000.
3.5 Procedure:
1. Make the connections as shown.
2. For addition, make Cin=0 and apply the 4 bits as i/p for A and apply another set of 4bits
to B. Observe the o/p at S3, S2 S1 S0 and carry generated at Cout.
Repeat the above steps for different inputs and tabulate the result.
3. For subtraction Cin is made equal to 1 and A-B format is used.
A-First no, B- second no.
By Coring the i/p bits of ‘B’ with 1 complement of ‘B’ is obtained.
Further Cin, which is 1 is added to the LSB of the Cored bits. This generates 2’s
complement of B.
4. Verify the difference and polarity of differences at S0, S1, S2, S3. and Cout.
If Cout is 0, diff is –ve and diff is 2’s complement form.
If Cout is 1, diff is +ve.
5. Repeat the above steps for different inputs. And tabulate the result.
3.6 Observations:
EXAMPLE:
A3 A2 A1 A0 B3 B2 B1 B0 Cout S3 S2 S1 S0
1 0 0 0 0 0 1 0 0 1 0 1 0
0 0 0 1 0 1 1 1 0 1 0 0 0
1 1 1 1 0 0 0 1 1 0 0 0 0
Cin A3 A2 A1 A0 B3 B2 B1 B0 Cout S3 S2 S1 S0
Ex. 1 0 1 0 0 1 1 0 0 1 1 0 0 1 0
Ex. 2 0 0 1 1 1 0 0 0 1 0 1 0 0 0
Ex. 3 1 1 0 0 1 1 0 0 0 1 0 0 0 1
Ex. 4 1 0 0 0 1 0 0 1 1 0 1 1 1 0
(a) SUBTRACTION
1001 Larger
0011 Smaller Take 2’s Complement =1101 & add
i.e. 1 0 0 1
1101
0 1 1 0 Cout = 1
If the end around carry is 1, result is +ve & discard the carry.
0011 Small
1001 Larger 2’s Complement = 0 1 1 1 & add
i.e., 0 0 1 1
0111
1 0 1 0 Cout = 0
If the end carry is 0 the result is –ve & is in 2’s complement form. To obtain the result in true
form take the 2’s Complement of it (i.e.) 1010’s 2’s complement is 0 1 1 1.
Truth table
B3 B2 B1 B0 E3 E2 E1 E0
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
EXCESS -3 to BCD:
Logic diagram:
Truth table
Excess-3 BCD
X4 X3 X2 X1 B4 B3 B2 B1
0 0 1 1 0 0 0 0
0 1 0 0 0 0 0 1
0 1 0 1 0 0 1 0
0 1 1 0 0 0 1 1
0 1 0 1 0 1 0 0
1 0 0 0 0 1 0 1
1 0 0 1 0 1 1 0
1 0 1 0 0 1 1 1
1 0 1 1 1 0 0 0
1 1 0 0 1 0 0 1
3.7 Results:
• Operation of Parallel adder and Parallel Subtractor were studied and checked using IC
7483.
• Operation of BCD – to – Excess3 and vice versa was studied and checked using IC
7483.
• How many full adders are required to construct m bit parallel adder?
• If 2 10-bit numbers have to be added using Parallel adder how many full adders are
required?
EXPERIMENT No.04:
Demonstrate the conversion of Binary to Gray code and vice versa
4.3 THEORY:
The gray code belongs to a class called change code (unit distance code), in which any 1 bit
in the group changes from 1 step to the next. The gray code is an unweighted code meaning thatthe
bit position in the code group do not have specific weight assigned to them. The code is
also known as reflected code characterized by the fact that it is imaged about the center entries
with 1-bit change.
Gray code has application in input-output devices and some types of analog to digitalcontroller.
The gray code is often used in situations where other codes, such as binary might produce
erroneous or ambiguous results during those transitions in which more than 1 bit of code is
changing.
The binary code is weighted code, which means that there are specific weights assigned to each
bit position. The weight of each successive higher position (to the left) in a binary number is
an increasing power of two. The binary representation of a decimal number consists of only
0’s and 1’s.
1. The most significant bit (left most) in a gray code is same as the corresponding bit in the
binary number.
2. Going from left to right, EX-OR each adjacent bit of binary to get the next gray code bit.
Example:
Example:
4.4 PROCEDURE:
1. Draw the truth table for binary to gray code converter and gray to binary code converter.
2. Simplify the output expression using K-Map.
3. Draw the circuit diagram.
4. Check all the IC packages using digital IC trainer.
5. Make connections as shown in the circuit diagram.
6. For different binary data inputs, verify the corresponding gray code outputs according to
the truth tables.
7. And also, for different gray code inputs verify the binary data outputs according to truth
table.
4.5 Observations
BINARY TO GRAY CODE CONVERSION
K-MAP SIMPLIFICATION:
Truth Table:
4.6 Results:
• Truth table for the adder and subtractor is verified using IC 74139
• BCD – to Gray code and vice versa circuit is designed and output is verified for different
combination of input.
5.1 AIM: To design and set up the following circuits using the IC 74153
• Full adder 2. half adder 3. Full subtractor 4. Half subtractor
5.3 THEORY:
Multiplexer is a digital switch. It allows digital information from several sources to be
routed onto a single output line. The 74153 is a dual 4 to 1 multiplexer. It contains two
identical and independent 4 to 1 multiplexer. Each multiplexer has separate enable inputs.
A demultiplexer is a circuit that receives information on single line and transmits this
information on one 2^n possible output lines. The selection of specific output lines is
controlled by the values of n selection lines.
5.4 PROCEDURE:
Design and implementation of a full adder and full subtractor using multiplexer.
• Use data sheets of multiplexer IC 74153 to determine input, output and control pins.
• Draw circuit diagrams of full adder and full subtractor using IC 74153.
• Build and test the circuits.
5.5 Observations
INPUT OUTPUT
S1 S0 Y
0 0 D0
0 1 D1
1 0 D2
1 1 D3
LOGIC DIAGRAM
PIN DIAGRAM
INPUTS OUTPUTS
1G 2𝑮 B A 1Y 2Y
0 0 0 0 1C0 2C0
0 0 0 1 1C1 2C1
0 0 1 0 1C2 2C2
0 0 1 1 1C3 2C3
0 1 0 0 1C0 0
0 1 0 1 1C1 0
0 1 1 0 1C2 0
0 1 1 1 1C3 0
1 0 0 0 0 2C0
1 0 0 1 0 2C1
1 0 1 0 0 2C2
1 0 1 1 0 2C3
1 1 0 0 0 0
1 1 0 1 0 0
1 1 1 0 0 0
1 1 1 1 0 0
HALF ADDER:
INPUT OUTPUT
B A SUM CARRY
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
HALF SUBTRACTOR:
INPUT OUTPUT
B A D B
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
FULL ADDER
TRUTH TABLE
B A SUM CARRY
A B Ci SUM CARRY
0 0 Ci 0
0 0 0 0 0
0 0 1 1 0 0 1 𝐶𝑖 Ci
0 1 0 1 0 1 0 𝐶𝑖 Ci
0 1 1 0 1 1 1 𝐶𝑖 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
FULL SUBTRACTOR
TRUTH TABLE:
5.6 Result: Truth table for the adder and subtractor is verified using IC 74153
6.1 AIM:
1. To construct and verify the truth table of one-bit comparator.
2. To construct and verify the truth table of two-bit comparator.
6.4 PROCEDURE:
1. Draw the truth table for BCD to Excess-3 code converter.
2. Simplify the output expressions using Karnaugh map.
3. Draw the circuit diagram.
6.5 Observations
Truth Table
X(E)Y(D) Z(C)
INPUTS OUTPUTS
A1 A0 B1 B0 A>B A=B A<B
0 0 0 0 0 1 0
0 0 0 1 0 0 1
0 0 1 0 0 0 1
0 0 1 1 0 0 1
0 1 0 0 1 0 0
0 1 0 1 0 1 0
0 1 1 0 0 0 1
0 1 1 1 0 0 1
1 0 0 0 1 0 0
1 0 0 1 1 0 0
1 0 1 0 0 1 0
1 0 1 1 0 0 1
1 1 0 0 1 0 0
1 1 0 1 1 0 0
1 1 1 0 1 0 0
1 1 1 1 0 1 0
K-MAP:
6.6 Results:
• Designed and setup single bit comparator using basic gates and NAND gate and verified
the truth table.
• What is comparator?
7.1 Objectives:
7.3 Pre-Requisite: Basic operations of flip flops like SR, JK, D & T along with its truth table.
7.4 Introduction:
JK FLIP-FLOP: For purpose of counting, the JK flip-flop is the ideal element to use. The
variable J and K are called control I/Ps because they determine what the flip- flop does when
a positive edge arrives.
MASTER SLAVE J K FLIP FLOP: The race around condition of JK FF is rectified in
master save JK FF. Racing is toggling of output more than ones during the positive clock
edge. MSJK FF is created by cascading two JK FF. The clock is fed to the first stage
(Master) and is inverted and fed to the second stage (slave). This ensures that the master is
always followed by the slave and eliminates the chance of racing.
D FLIP –FLOP: This kind of flip flop prevents the value of D from reaching the Q output until
clock pulses occur. When the clock is low, change in D value will not affect the value
Q. On the other hand, when the clock is high, Q is forced to equal the value of D. When
The clock again goes low, Q retains or stores the last value of D. A D flip flop is a stable
circuit.
whose D input is transferred to the output after a clock pulse is received.
T FLIP-FLOP: The T or "toggle" flip-flop changes its output on each clock edge, giving an output
which is half the frequency of the signal to the T input. It is useful for constructing binarycounters,
frequency dividers, and general binary addition devices. It can be made from a J-K flip-flop by
tying both of its inputs high.
7.5 Procedure:
1. Check all the components & patch cords, whether they are in good condition.
2.Insert the appropriate IC into the IC base.
3.Do the connection as shown in the Logic Diagram.
4.Give the supply to the trainer kit.
5.Verify the Truth Table & Observe the output for corresponding combination.
7.6 Observations:
Master-Slave JK
Truth Table
Clock J K Q+ Q+ Comment
1 0 0 Q Q No
Change
1 0 1 0 1 Reset
1 1 0 1 0 Set
1 1 1 Race Around
T Flip Flop:
PRE
~1PR
1J 1Q T
1CLK
1K ~1Q
~1CLR
Truth Table
T 𝑸𝒏+𝟏 Comments
0 𝑄𝑛 No change
1 ̅̅̅̅
𝑄𝑛 Toggle
D Flip Flop:
Truth Table
D Q
0 0
1 1
7.7 Results:
• The Master slave JK flip flop, D, T flip flops were set up using NAND gates and
verified.
8.1 AIM: To design the following 3-bit synchronous counters using IC7476.
8.3 THEORY:
8.4 PROCEDURE:
8.5 Observations
a) 3 BIT UP/DOWN COUNTER:
CIRCUIT:
STATE DIAGRAM: -
When M=0
When M=1
Truth Table
M Q2 Q1 Q0 M Q2 Q1 Q0
1 0 0 0 0 0 0 0
1 0 0 1 0 0 0 1
1 0 1 0 0 0 1 0
1 0 1 1 0 0 1 1
1 1 0 0 0 1 0 0
1 1 0 1 0 1 0 1
1 1 1 0 0 1 1 0
1 1 1 1 0 1 1 1
8.6 Results:
The counter will increment on each rising edge of the clock signal, producing a binary
9.1 Objectives:
9.4 Introduction:
Registers are simply a group of flip flops that can be used to store a binary number. A shift
register is nothing but a register which can accept binary number and shift it. The data can be
entered in the shift register either in serial or in parallel. The output can be taken either in serial
or in parallel. Since there are two ways to shift data in to a register and two ways to shiftdata
out of the register four types of registers can be constructed. A register capable of shiftingits
binary information either to the left or to the right is called a shift register. The
logical configuration of a shift register consists of a chain of flip flops connected in cascade with the
output of one flip flop connected to the input of the next flip flop. All the flip flops receive a common
clock pulse which causes the shift from one stage to the next.
The Q output of a D flip flop is connected to the D input of the flip flop to the left. Each clock pulse
shifts the contents of the register one-bit position to the right. The serial input determines, what goes
into the right most flip flop during the shift. The serial output is taken from the output of the left most
flip flop prior to the application of a pulse. Although this register shifts its contents to its left, if we
turn the page upside down, we find that the register shifts its contents to the right. Thus, a
unidirectional shift register can function either as a shift right or a shift left register.
The binary information (data) in a register can be moved within or into or out of the register upon
application of clock pulses. This type of bit movement or shifting is essential for certain arithmetic
and logic operations used in microprocessors. This gives rise to group of registers called shift
registers. They are very important in applications involving the storage and transfer of data in a
digital system.
9.5 Procedure:
1. Check all the components & patch cords, whether they are in good condition.
5. Verify the Truth Table & Observe the output for corresponding combination.
9.6 Observations:
PIN DIAGRAM OF IC 7474:
Inputs Outputs
Preset Clear Clock D Q Q‟
0 1 X X 1 0
1 0 X X 0 1
0 0 X X 1 1
1 1 1 0 0 1
1 1 1 1 1 0
1 1 0 X No change No change
LOGIC DIAGRAM:
Observation Table
Observation Table
Observation Table:
0 1 1 0 0 1 1 0
TRUTH TABLE:
CLK Load/Shift QA QB QC QD
1 0 1 0 1 0
2 1 X 1 0 1
3 1 X X 1 0
4 1 X X X 1
5 1 X X X X
9.7 Results:
• All shift registers have designed and verified using the specified IC.
10.1 AIM:
To design and set up four-bit Johnson and ring counter using JK FF
10.3 THEORY:
Ring counter:
A ring counter is a type of digital counter circuit that forms a closed-loop or ring structure. In
a ring counter, the output of one flip-flop is connected to the input of the next flip-flop,
forming a circular arrangement. The counter progresses through its states by shifting a '1' bit,
or high signal, around the ring. It's also known as a shift register counter.
Johnson counter:
A Johnson counter, also known as a "twisted ring counter" or "walking ring counter," is a type of
digital counter circuit that provides a 2^n state sequence, where 'n' is the number of flip-flops in
the circuit. The Johnson counter is a modification of the traditional ring counter, and it uses
complemented outputs to achieve the expanded state sequence.
10.4 PROCEDURE:
a) Ring counter:
Make the mode control=0 and apply the clock pulse to CLK-1.
• Observe the outputs on the CRO and verify the truth table.
b) Johnson counter:
10.5 Observations
Ring counter:
Truth Table
Clock QA QB QC QD
pulse
0 1 0 0 0
1 0 1 0 0
2 0 0 1 0
3 0 0 0 1
4 1 0 0 0
5 0 1 0 0
6 0 0 1 0
7 0 0 0 1
8 1 0 0 1
Johnson counter:
Truth Table
Clock QA QB QC QD
pulse
0 1 0 0 0
1 0 1 0 0
2 0 0 1 0
3 0 0 0 1
4 1 0 0 0
5 0 1 0 0
6 0 0 1 0
7 0 0 0 1
8 1 0 0 0
Wave Form
10.6 Results:
• Operation of ring and Johnson counter is realized and verified using the specified IC.