LDCO Lab Manual
LDCO Lab Manual
Title Page
No No
Group A : Combinational Logic Design– CO1
1 Design and implement 4-bit BCD to Excess-3 code
2 Design and implement 1 digit BCD adder using IC 7483
3 Design and implement following using multiplexer IC 74153 1)
full adder 2) Any three variable function ( cascade method)
4 Design and implement full subtractor using decoder IC 74138
Group B : Sequential Logic Design– CO 2
5 Design & implement 3 bit Asynchronous & Synchronous
counter
a. 3 bit up Asynchronous counter
b. 3 bit down Asynchronous counter
c. 3 bit up Synchronous counter
d. 3 bit down Synchronous counter
6 Design and implement Modulo ‘N’ counter using IC7490. ( N= 100
max)
Group C:- Computer organization– CO 3 Perform any two
7. Design& simulate single bit RAM cell OR 4 address*2bit memory
using 8 single bit RAM cells.
8. Design & simulate single bit ALU with four functions(AND, OR,
XOR, ADD).
9. Design& simulation of single instruction CPU.
Additional List of Experiments
(Over and above SPPU Syllabus)
Hardware Required:
Digital Trainer Kit, Gates Required :- AND (7408),OR (7432), EXOR(7486),
NOT(7404),Number of Patch Chords
Theory:
Explanation:
There is a wide variety of binary codes used in digital systems. Some of these
codes are binary- coded -decimal (BCD), Excess-3, Gray, octal, hexadecimal, etc.
Often it is required to convert from one code to another. For example the input to
a digital system may be in natural BCD and output may be 7-segment LEDs. The
digital system used may be capable of processing the data in straight binary
format. Therefore, the data has to be converted from one type of code to another
type for different purpose. The various code converters can be designed using
gates.
1. BCD Code:
Binary Coded Decimal (BCD) is used to represent each of decimal digits (0 to 9)
with a 4-bit binary code. For example (23)10 is represented by 0010 0011 using
BCD code rather than(10111)2 This code is also known as 8-4-2-1 code as 8421
indicates the binary weights of four bits(23, 22, 21, 20). It is easy to convert
between BCD code numbers and the familiar decimal numbers. It is the main
advantage of this code. With four bits, sixteen numbers (0000 to 1111) can be
represented, but in BCD code only 10 of these are used. The six code
combinations (1010 to 1111) are not used and are invalid.
Applications: Some early computers processed BCD numbers. Arithmetic
operations can be performed using this code. Input to a digital system may be in
natural BCD and output may be 7-segment LEDs.
It is observed that more number of bits are required to code a decimal number
using BCD code than using the straight binary code. However in spite of this
disadvantage it is very convenient and useful code for input and output
operations in digital systems.
Theory:
BCD Adder:
BCD adder is a circuit that adds two BCD digits & produces a sum of digits also
in BCD.
Rules for BCD addition:
1. Add two numbers using rules of Binary addition.
2. If the 4 bit sum is greater than 9 or if carry is generated then the sum is
invalid. To correct the sum add 0110 i. e. (6)10 to sum. If carry is generated
from this addition add it to next higher order BCD digit.
3. If the 4 bit sum is less than 9 or equal to 9 then sum is in proper form.
CASE I : Sum <= 9 & carry = 0.
Add BCD digits 3 & 4
1. 0011
+ 0100
---------
0111
Answer is valid BCD number = (7)BCD& so 0110 is not added.
CASE II : Sum > 9 & carry = 0.
Add BCD digits 6 & 5
1. 0110
+ 0101
-----------
10 1 1
Advantages :
1) Simplification of logic expression not required.
2) Logic design is simplified.
Disadvantage :
Only one function can be implemented using one MUX. Hence they can’t be
used in combinational logic circuit which contains many function.
Part-A (IC 74153)
1. VERIFICATION OF IC 74153 :
IC 74153 is a dual layer 4:1 MUX. It has four input lines for (I0D-I3D) for second
MUX & active high output. ‘Ya’, ‘Yb’ (1Y or 2Y). It has select lines S1S0 common to
both MUX. The Enable inputs are active low, Ea& Eb (1G and 2G). The MUX is
activated when they are at logic o.
Fig. Multiplexer Tree Method
2. FUNCTION IMPLEMENTATION:
Y= ∑ m (1, 3, 5, 6)
This expression is in Standard SOP form and it is three variable function. So, we
need to use mux with three select inputs i.e. 8:1 Mux. Already we have
implemented 8:1 Mux using IC 74153. For Boolean function in Standard SOP
form we connect data inputs corresponding to the minterms present in the given
function to Vcc and remaining data inputs to ground.
Truth table :
Inputs Outpu
t
C B A Y
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
4. IMPLEMENTATION OF FULL ADDER USING IC 74153:
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 these variables
denoted by A and B represent the two significant bits to be added. The third input
represents the carry from previous lower significant position.
Truth Table for Design of full adder:
Input Output
A B C Su Carr
m y
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
Mux. 1 74153 1
NOT 1 7404 1
Part-B Decoder (IC 74138)
THEORY:
Discrete quantities of information are requested in digital system with binary
codes. A binary code of n bits is capable of representing into 2n distinct elements
of the coded information.
Decoder converts coded input to coded outputs accepts one of the code.
There are different types of decoders such as 3:8 decoder, 4:16 line decoders etc.
These are in general called as n: m line decoder where m=2n and n= no. of input
lines and m=no. of output lines.
Demux also takes one input data line source and selectively distributes it to one
of n output channels. The only difference between demux and decoder is that
demux has Din (data i/p) line whereas decoder does not have.
ADVANTAGES:
1) The decoder provides best implementation whenever there are many
outputs of the combinational circuit and each o/p of the function (or its
complement) is required to be expressed with a small no. of minterms.
2) The decoder can function as demux. If the Enable i/p line is taken as Din
(data i/p) .
DISADVANTAGES:
Since decoder method requires an OR gate for each o/p function, so there is new
hardware used. And it is always advisable to use minimum hardware as we come
across problems like propagation delay of gates.
APPLICATIONS:
Decoder is worthily used for decoding binary information and memory
interfacing. It is used for the implementation of Boolean function.
A) Verification of IC 74138:
We use IC 74138 which accepts 3 binary weighted inputs (A0, A1, A2) and when
enabled provides mutually exclusive active low outputs (y0-y7). It features 3
Enable i/ps. Two active low (G2A, G2B) and one active high (G1). Every output
will be high unless G2A, G2B are low and G1 is high. It has demultiplexing
capability and multiple enable i/ps for easy expansion.
Function Table of 3:8 decoder:
Input Output
Enable Data
G2A G2B G1 A2 A1 A0 Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7
0 0 0 X X X 1 1 1 1 1 1 1 1
0 1 1 X X X 1 1 1 1 1 1 1 1
1 0 1 X X X 1 1 1 1 1 1 1 1
1 1 1 X X X 1 1 1 1 1 1 1 1
0 0 1 0 0 0 0 1 1 1 1 1 1 1
0 0 1 0 0 1 1 0 1 1 1 1 1 1
0 0 1 0 1 0 1 1 0 1 1 1 1 1
0 0 1 0 1 1 1 1 1 0 1 1 1 1
0 0 1 1 0 0 1 1 1 1 0 1 1 1
0 0 1 1 0 1 1 1 1 1 1 0 1 1
0 0 1 1 1 0 1 1 1 1 1 1 0 1
0 0 1 1 1 1 1 1 1 1 1 1 1 0
C) Implementation of Boolean function:
The procedure for implementation of combinational circuit by means of a decoder
and ‘OR’ gates requires that the Boolean function fir the circuit be expressed in
Sum of Minterms. These forms can be obtained by expanding the function. A
decoder is then chosen which generates all the minterms of n i/p variables. The
i/p to each OR gate are selected from the decoder outputs according to the
minterms list in each function.
For example, F1=∑m (1, 3, 5, 7) and F2=∑m (2, 3, 6, 7)
State Table :
Logic diagram :
Logic diagram :
Applications :
The asynchronous counters are specially used as the counting devices.
They are also used to count number of pulses applied.
It also works as frequency divider.
It helps in counting the number of product coming out of the machinery where
product is coming out at equal interval of time.
0 X X X X
1 0 0 1 0
J2 = Q1Q0 K2 = Q1Q0
Q1Q0 0 01 11 10
Q2 0
0 0 1 X X
1 0 1 X X
J1 = Q1Q0 0 01 11 10 Q0
0
K1 = Q2 Q0
Q1Q0
0 0X 01X 111 100
Q2 1 0
X X 1 0
0 1 X X 1 K0 = 1
1 1 X X 1
J0 = 1
Q1Q0 0 01 11 10
0 Logic Diagram:
Q2
0 X 1 1 X
1 X 1 1 X
Fig 1: 3 bit Synchronous up counter
Q1Q0 0 01 11 10
Q2 0
0 1 0 X X
1 1 0 X X
Q1Q0 0 01 11 10
Q2 0
0 X X 0 1
1 X X 0 1
J1 = Q0’ K1 = Q0’
Q1Q0 0 01 11 10
Q2 0
0 1 X X 1
1 1 X X 1
Q1Q0 0 01 11 10
Q2 0
0 X 1 1 X
1 X 1 1 X
J0 = 1 K0 = 1
Logic Diagram :
Uses:
1.
Specially used as the counting devices.
2.
Used in frequency divider circuit.
3.
Used in digital voltmeter.
4.
Used in counter type A to D converter.
5.
Used for time measurement..
6.
It helps in counting the no of product coming out from machinery where
product is coming out at equal interval of time.
Conclusion:
Up and down counters are successfully implemented, the counters are studied &
o/p are checked. The state table is verified.
Experiment No. 5
Title:- Modulus n Counter
AIM: To design and implement mod - 10, mod – 7, mod - 99 asynchronous BCD
counter using IC 7490.
OBJECTIVE: To know difference between regular & truncated counter as well as
binary & BCD Counter
IC’s USED: IC 7490, Basic gates 7408,7432.
THEORY: IC 7490
IC 7490 is a TTL MSI (medium scale integration) decade counter. It
contains 4 master slave flip flops internally connected to provide MOD-2 i.e.
divide by 2 and MOD-5 i.e. divide by 5 counters. MOD-2 and Mod-5 counters can
be used independently or in cascading.
It is a 4-bit ripple type decade counter. The device consists of 4-master
slave flip flops internally connected to provide a divide by two and divide by 5
sections. Each section has a separate clock i/p to initiate state changes of the
counter on the high to low clock transition.
Since the o/p from the divide by 2 section is not internally connected to the
succeeding stages. The device may be operated in various counting modes. In a
BCD counter the CP1 input must be externally connected to QA o/p. The CP0 i/p
receives the incoming count producing a BCD count sequence. It is also provided
with additional gating to provide a divide by 2 counter and binary counter for
which the count cycle length is divide by 5. The device may be operated in various
counting modes.
There are 2 reset inputs R0(1) and R0(2) both of which need to be connected
to the ‘logic 1’ for clearing all flip flops. Two set inputs Rg(1) and Rg(2) when
connected to logic 1 are used for setting counter to 1001 (BCD 9).
Pin out of IC 7490:
Basic internal Structure of IC 7490:
Function table:
I/p Output
clock QD Q Q Q Coun
C B A t
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
Timing diagram of mod7:
FAQs:
1. What do you mean modulus counter?
It represents the number of possible states of counter.
2. How will you use the 7490 IC to design symmetrical divide by 10 frequency
counter?
The divide by 5 circuit followed by divide by 2 circuit will give symmetrical
output.
1. Where counters are used? Give real life example of counter.
Binary counter – An N stage counter that recycles after 2 N count. The count
proceds in specified binary sequence.
5. Counter, Presetable- A counter which can be set to a desired value before the
start of the counting/
6. UP/Down counter – A counter that can count in both up and down direction
depending upon a control input.
Experiment No. 6:- Design of Arithmetic Logic Unit:
Theory for Design of ALU
ALU or Arithmetic Logical Unit is a digital circuit to do arithmetic operations like addition,
subtraction,division, multiplication and logical oparations like and, or, xor, nand, nor etc. A
simple block diagram of a 4 bit ALU for operations and,or,xor and Add is shown here :
Design Issues :
The circuit functionality of a 1 bit ALU is shown here, depending upon the control signal S1
The truth table for 16-bit ALU with capabilities similar to 74181 is shown here:
Required functionality of ALU (inputs and outputs are active high)
Objective
Objective of 4 bit arithmetic logic unit (with AND, OR, XOR, ADD operation):
1. Understanding behaviour of arithmetic logic unit from working module and the
module designed by the student as part of the experiment
2. Designing an arithmetic logic unit for given parameter
Examining behaviour of arithmetic logic unit for the working module and module designed by the student as
part of the experiment (refer to the circuit diagram):
Loading data in the arithmetic logic unit (refer to procedure tab for further detail and experiment manual for
pin numbers):
• load the two input numbers as:
• carry in(C0)=0
• S1=0, S0=0 `
• check output:
• S1=0, S0=1 `
• check output:
• cout=0 `
• S1=1, S0=0 `
• check output:
• cout=0 `
• S1=1, S0=1 `
• check output:
• cout=1 `
Recommended learning activities for the experiment: Leaning activities are designed
in two stages, a basic stage and an advanced stage. Accomplishment of each stage can
be self-evaluated through the given set of quiz questions consisting of multiple type and
subjective type questions. In the basic stage, it is recommended to perform the experiment
firstly, on the given encapsulated working module, secondly, on the module designed by
the student, having gone through the theory, objective and procuder. By performing the
experiment on the working module, students can only observe the input-output behavior.
Where as, performing experiments on the designed module, students can do circuit
analysis, error analysis in addition with the input-output behavior. It is recommended to
perform the experiments following the given guideline to check behavior and test plans
along with their own circuit analysis. Then students are recommended to move on to the
advanced stage. The advanced stage includes the accomplishment of the given
assignments which will provide deeper understanding of the topic with innovative circuit
design experience. At any time, students can mature their knowledge base by further
reading the references provided for the experiment.
likewise the 16 bit arithmetic logic unit can be designed and tested
• by cascading 4 bit ALUs only the carry will propagate to the next level for ADD
operation
Test plan :
1. Set inputs 0101 and 0011 and check output for all possible select input
combinations.
2. Set any two 16-bit number and check output for all possible select input
combinations.
Use Display units for checking output. Try to use minimum number of components to build.
The pin configuration of the canned components are shown when mouse hovered over a
component.
Assignment Statements :
1. Design a 4 bit ALU comprising only the AND, OR, XOR and Add operations.
2. Design a 16-bit ALU with capabilities similar to 74181
Procedure
Design of ALU:
Components :
To build any 4 bit ALU, we need :
In case of counters the number of flip-flops depends on the number of different states in
the counter.
Experiment
Design of ALU :
• Start the simulator as directed. For more detail please refer to the manual for
• To add the logic components to the editor or canvas (where you build the
circuit) select any component and click on the position of the canvas where
you want to add the component
• The pin configuration is shown when you select the component and press the
'show pinconfig' button in the left toolbar or whenever the mouse is hovered
on any canned component of palette
• To connect any two components select the connection tool of palette, and
then click on the source terminal and then click on the the target terminal
• To move any component select the component using the selection tool and
period can be set from the given 'set clock' button in the left toolbar
• Use 'plot graph' button to see input-output wave forms
• Users can save their circuits with .logic extension and reuse them
• After building the circuit press the simulate button in the top toolbar to
will start the simulation of the whole circuit. Then there is no need to
again press the 'simulate' button
56
57
58
59