DLP Lab Manual
DLP Lab Manual
LAB MANUAL
For
I Semester / I Year
Of
B.Tech.
CSE, ECS, ECE, EEE, CS&IT, AI&DS, IOT
KL UNIVERSITY
VADDESWARAM, GUNTUR – 522 502 (A.P.) INDIA
2022-23
1
DIGITAL LOGIC & PROCESSORS [ 22EC1101]
LIST OF EXPERIMENTS
Exp. Name of the Experiments Lab
No. Type
1 Realization of Logic Functions using TTL IC’s IN Lab
2 LED Control Using Universal Gates IN Lab
3 Combinational Circuit Based Car Security System IN Lab
4 Participant selection in Competitions Using Multiplexer IN Lab
5 Random Number Generator for Gaming Using D-Flip- flop IN Lab
6 Verification of logic gates using Verilog tool IN Lab
7 Design and verification of full adder using Verilog tool IN Lab
8 Design and verification of 3-bit odd parity generator using Verilog tool IN Lab
9 Verification of Flip flops using Verilog tool IN Lab
10 Design and verification of 3-bit Synchronous counter using Verilog tool IN Lab
Components Required as per Experiment Number:
Other than these IC’s we require LED’s (Red, Green, and White) 100 each
Bread boards or Digital Trainers (25) ----- To conduct experiments for 25 batches at a time
Connecting wires
(All the basic concepts will be covered in class room with simulation tool logisim or multisim prior to lab
application oriented experiments)
2
LAB Evaluation Pattern
Weightage (10%)
Weightage (16%)
SE Lab Exam 90 mts
Total
NOTE: Teacher must maintain the same format in the attendance register of the said labcourse
3
EXPERIMENT 1
Aim: To Study and Verify the Logic Gates Using TTL IC’s
Apparatus: Logic trainer kit, logic gates / ICs, wires.
Theory: Logic gates are electronic circuits which perform logical functions on one or more inputs
to produce one output. There are seven logic gates. When all the input combinations of a logic
gate are written in a series and their corresponding outputs written along them, then this input/
output combination is called Truth Table. Various gates and their working is explained here.
AND Gate
AND gate produces an output as 1, when all its inputs are 1; otherwise the output is 0. This gate
can have minimum 2 inputs but output is always one. Its output is 0 when any input is 0.
IC 7408
4
OR Gate
OR gate produces an output as 1, when any or all its inputs are 1; otherwise the output is 0. This
gate can have minimum 2 inputs but output is always one. Its output is 0 when all input are 0.
IC 7432
NOT Gate
NOT gate produces the complement of its input. This gate is also called an INVERTER. It always
has one input and one output. Its output is 0 when input is 1 and output is 1 when input is 0.
IC 7404
5
NAND Gate
NAND gate is actually a series of AND gate with NOT gate. If we connect the output of an AND
gate to the input of a NOT gate, this combination will work as NOT-AND or NAND gate. Its
output is 1 when any or all inputs are 0, otherwise output is 1.
IC 7400
NOR Gate
NOR gate is actually a series of OR gate with NOT gate. If we connect the output of an OR gate
to the input of a NOT gate, this combination will work as NOT-OR or NOR gate. Its output is 0
when any or all inputs are 1, otherwise output is 1.
IC 7402
6
Exclusive OR (X-OR) Gate
X-OR gate produces an output as 1, when number of 1’s at its inputs is odd, otherwise output is
0. It has two inputs and one output.
IC 7486
7
Procedure:
8
EXPERIMENT – 2
AIM: To control given LED sequence using NAND and NOR gates
Apparatus:
A B LED1 LED2
0 0 1 0
0 1 0 1
1 0 0 0
1 1 1 1
9
Circuit Implementation Using NOR Gate
Theory: NAND and NOR gates are known as universal logic gates. We can implement any
logic by using these universal logic gates. A logic circuit is designed to control LED’s using
NAND and NOR logic gates.
Procedure:
b) By applyingthe inputs, the LED outputs are observed and the operation is verified with the help
of truth table.
Precautions:
1. Connections must be tight on the bread board.
Result:
1. Understand the concept of universal gates
2. Identify the replacement of universal gates instead of basic gates
3. LED on and off controlling using universal gates
10
EXPERIMENT – 3
Aim: To Design a combinational circuit that check the following conditions to start the car engine
Otherwise blow horn if any one condition fails
Apparatus:
Logic Gates
Principle of Operation:
It is used to provide the security and safety to the passengers travelling in the car. When
a driver step into the car first it checks whether all the doors are properly closed or not if the
doors are closed then it checks for seatbelt is fasten or not all the conditions are satisf ied then
the engine will start otherwise buzzer will blown.
Block diagram:
11
Truth Table:
Inputs Outputs
Key Cardoors Seatbelt Buzzer Engine
0 X X 0 0
1 0 X 1 0
1 1 0 1 0
1 1 1 0 1
K-Maps:
Logic Diagram:
12
Procedure:
Result: Student is able to design a car security system using logic gates
13
EXPERIMENT – 4:
Two judges of the Indian Idol competition need the help of digital logic to display
whether the participant must stay or leave the competition without displaying their votes. The
selection criteria are as follows.
Components Required: LED’s (Green and Red), MUX IC, NI Multisim with MyDAQ
Theory:
1. There will be 4 possibilities based on the voting of two judges (say A & B).
2. If the 2 judges vote positively or negatively for the participant, then the participant
should leave the competition i.e., if 00 or 11 then output should be zero.
3. If both the judges vote compliment to each other, then the participant stays in the
competition i.e., if 01 or 10 then output should be one.
4. Since one of the combinations will occur at a time based on the voting we can switch
the output using a multiplexer.
5. The circuit diagram is shown below for the given conditions.
Circuit Diagram:
14
Truth Table:
Procedure:
Observation:
1. What happens if both the judges vote positively for the participant?
2. Does both LEDs glow at the same time for any combination?
3. Can we implement the digital logic for the given problem using universal gates other than
MUX
15
EXPERIMENT – 5
Components Required: -
1 IC 7474 1
2 IC 7486 1
3 Breadboard 1
4 LEDs 4
Theory:
1. Circuit counts through 24-1 different non-zero bit patterns.
2. Left most bit determines shift or more complex operation
3. Can build a similar circuit with any number of FFs, may need more xor gates.
4. In general, with n flip-flops, 2n-1 different non-zero bit patterns.
Circuit Diagram:
C LK
16
Block Diagram:
Procedure:
1. Let us consider the initial input data is “ 0001”;
2. D1,D2,D3 and D4 are input lines of corresponding flipflops.
3. Similarly q1,q2,q3 and q4 are output lines of corresponding flipflops.
4. D1=q4, D2=q1^q4
D3=q2
D4=q3
12 12 1110 14
13 13 1111 15
14 14 1101 13
17
15 15 1001 9
16 16 0001 1
Schematic In NI-Multisim:
Result:
1) From this Design, we had understand the concept of flipflops and its Applications.
2) Understood the concept of LFSR and its uses.
18
DSCH Installation procedure
http://csit-sun.pub.ro/courses/vlsi/Carte_VLSI/intrage.insa-tlse.fr/_etienne/Microwind/index.html
19
EXPERIMENT – 6
VERIFICATION OF LOGIC GATES USING VERILOG HDL
Aim: Verification of logic gates using verilog HDL
Components required: DSCH Tool
1.AND gate
VERILOG CODE:
module logicgate (A,B,F);
input A,B;
output F;
and and1 (F,A,B);
endmodule
NAND gate:
VERILOG CODE:
module logicgate (A,B,F);
20
input A,B;
output F;
nand nand1 (F,A,B);
endmodule
OR Gate:
VERILOG CODE:
module logicgate (A,B,F);
input A,B;
output F;
or or1 (F,A,B);
endmodule
NOR gate
VERILOG CODE:
module logicgate (A,B,F);
input A,B;
output F;
nor nor1 (F,A,B);
endmodule
21
EX-OR gate
VERILOG CODE:
module logicgate (A,B,F);
input A,B;
output F;
xor xor1 (F,A,B);
endmodule
EX-NOR gate
Verilog code:
EXPERIMENT – 7
DESIGN AND VERIFICATION OF FULL ADDER USING VERILOG HDL
TRUTH TABLE
23
module FULL ADDER (A,B,C,SUM,CARRY);
input A,B,C;
output SUM,CARRY;
and and1 (w1,A,B);
xor xor1 (w2,A,B);
and and2 (w3,w1,C);
xor xor2 (SUM,w1,C);
or or1 (CARRY,w1,w3);
endmodule
EXPERIMENT – 8
DESIGN AND VERIFICATION OF 3-BIT ODD PARITY GENERATOR USING VERILOG HDL
Aim:To design and verification of 3-bit odd parity generator using verilog HDL
Components required: DSCH Tool
24
module oddparitygenerator (A,B,C,Pe,b3,b2,b1);
input A,B,C;
output Pe,b3,b2,b1;
xor xor1 (w1,A,B);
xnor xnor2 (Pe,w1,C);
buf buf1 (b1,A);
buf buf2 (b2,B);
buf buf3 (b2,C);
endmodule
25
EXPERIMENT – 9
VERIFICATION OF FLIP FLOPS USING VERILOG HDL
SR-Flip-Flop
D-Flip flop
26
JK-Flip flop
T-Flop flop
27
Verilog codes for Flip flops
28
29
30
EXPERIMENT – 10
DESIGN AND VERIFICATION OF 3-BIT SYNCHRONOUS COUNTER USING VERILOG HDL
Aim: To design and verification of 3-bit synchronous counter using verilog HDL
Components required: DSCH Tool
Circuit diagram:
Truth table
31
32