DD Practicals Master Manual
DD Practicals Master Manual
DD Practicals Master Manual
File New Project Type the Name of the project and select the location
Next
If simulator is ISim and preferred language is Verilog, then click Next Finish
Select Verilog module and type the file name Next Finish .
7. Right click on the inputs appeared on the output window and click on Force constant .
Apply the values ( Test Vectors ) and Run for the specified time interval.
Aim:
To design basic Logic gates (AND Gate, OR Gate, NOT Gate, XOR Gate, XNOR Gate)
using Dataflow modeling.
Tools Required:
Program:
AND Gate:
OR Gate:
NOT Gate:
XOR Gate:
module xor1(Y,A,B);
output Y;
input A,B;
assign Y= A^ B;
endmodule
XNOR Gate:
module xnor1(Y,A,B);
output Y;
input A,B;
assign Y= ~(A^ B);
endmodule
AND Gate
Logic Diagram
Truth Table
A B Y=A.B
0 0 0
0 1 0
1 0 0
1 1 1
OR Gate
Logic Diagram
Truth Table
A B Y=A+B
0 0 0
0 1 1
1 0 1
1 1 1
NOT Gate
Logic Diagram
Truth Table
A Y=A
0 1
1 0
XOR Gate
Logic Diagram
Truth Table
A B Y=AB
0 0 0
0 1 1
1 0 1
1 1 0
XNOR Gate
Logic Diagram
Truth Table
A B Y=(AB)
0 0 1
0 1 0
1 0 0
1 1 1
Result
The design of basic logic gates are done by Data flow modeling and verified the
functionality by simulation.
Exp No: 1(b) Date:
Aim:
To design of Universal Logic Gates (NAND Gate, NOR Gate) using Gate level
modeling.
Tools Required:
Program:
NAND Gate:
module NAND(Y,A,B);
output Y;
input A,B;
nand u1(Y,A,B);
endmodule
NOR Gate:
module NOR(Y,A,B);
output Y;
input A,B;
nor u1(Y,A,B);
endmodule
NAND Gate
Logic Diagram
Truth Table
A B Y=(A.B)
0 0 1
0 1 1
1 0 1
1 1 0
NOR Gate
Logic Diagram
Truth Table
A B Y=(A+B)
0 0 1
0 1 0
1 0 0
1 1 0
Result
The design of universal gates are done by Gate level modeling and verified the
functionality by simulation.
Exp No: 2 Date:
DESIGN OF ADDERS
Aim:
Half Adder(HA)
Full Adder(FA)
Tools Required:
Program:
Half Adder
Full Adder
Half Adder
Logic Diagram
Truth Table
INPUTS OUTPUTS
A B S= A B C= A.B
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Full Adder
Logic Diagram
Truth Table
INPUTS OUTPUTS
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
Result
The design of adders (Half and Full Adder) are done by Gate level modeling and verified
the functionality by simulation..
Exp No: 3 Date:
Aim:
Tools Required:
Program:
output Cout,
input Cin
);
wire C1,C2,C3;
FA FA1(Sum[0],C1,A[0],B[0],Cin);
FA FA2(Sum[1],C2,A[1],B[1],C1);
FA FA3(Sum[2],C3,A[2],B[2],C2);
FA FA4(Sum[3],Cout,A[3],B[3],C3);
endmodule
/* Full Adder */
Circuit Diagram
Result
The design of ripple carry adder is done by full adders and verified the functionality by
simulation..
Exp No: 4 Date:
DESIGN OF SUBTRACTOR
Aim:
Tools Required:
Program:
Half Subtractor
input A,B;
wire W;
xor XOR(Diff,A,B);
and AND(Bor,W,B);
not NOT1(W,A);
endmodule
Full Subtractor
input A, B, C;
wire W0,W1,W2,W3,W4;
endmodule
Half Subtractor
Logic Diagram
Truth Table
INPUTS OUTPUTS
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Full Subtractor
Logic Diagram
Truth Table
INPUTS OUTPUTS
A B C Diff Bor
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
Result
The design of subtractor (Half and Full Subtractor) are done by Gate level modeling and
verified the functionality by simulation..
Exp No : 5 Date:
DESIGN OF LATCHS
Aim:
Tools Required:
Programs
Logic Diagram
Truthtable
Inputs Outputs
S R Q Q
0 1 0 1
1 0 1 0
Truthtable
Inputs Outputs
S R Q Q
0 1 1 0
1 0 0 1
D Latch
Inputs Outputs
E D Q Q
1 0 0 1
1 1 1 0
Truthtable
Inputs Outputs
E D Q Q
1 0 0 1
1 1 1 0
Result
The design of Latchs (SR and D) using universal gates are done by Gate level
modeling and verified the functionality by simulation.
Exp No: 6 Date:
DESIGN OF FLIPFLOPS
Aim:
D Flipflop
Tools Required:
Programs
D Flipflop
Inputs Outputs
Clock Pulse D Q Q
Clock Pulse 0 0 1
Clock Pulse 1 1 0
Result
Thus the design of D flip flop using universal gates was done and output was verified by
the functionality.
Exp.No:7 Date:
Aim
To test and verify the truth table of following logic gates using ICs.
NAND (IC7400) Gate, NOR (IC7402) Gate, NOT (IC7404) Gate, AND (IC7408) Gate, OR
(IC7432), XOR(IC7486) Gate and XNOR (IC747266) Gate.
Apparatus Required
Theory
OR (IC7432)Gate:
AND (IC7408)Gate:
The AND Gate performs logical multiplication, commonly known as AND function.
IC7408 is a quad 2-input AND function. It has two inputs and only one output. The output of an
AND gate is HIGH only when all the inputs are HIGH. Even if any one of the inputs is LOW,
the output will be LOW.
NOT (IC7404)Gate:
The NOT performs the basic logical function called inversion or complementation.
IC7404 is a hex 1-input NOT function. It has one input and one output. The purpose of this logic
gate is to convert one logic to the opposite logic level. When HIGH input is applied to an
inverter, a LOW output appears at its output and vice versa.
NAND (IC7400)Gate:
NAND gate is a contraction of the NOT-AND gates. IC7400 is a quad 2-input NAND
function. It has two inputs and only one output. When all the inputs are HIGH, the output is
LOW. If any one or both the inputs are LOW, then the output is HIGH. The NAND called as
Universal Gate.
NOR(IC7402) Gate:
NOR gate is a contraction of the NOT-OR gates. IC7402 is a quad 2-input NOR
function. It has is a gate with two and one output. When all the inputs are LOW, the output is
HIGH. If any one or both the inputs are HIGH, then the output is LOW. The NOR gate called as
Universal Gate.
IC7486 is a quad 2-input EX-OR function. The output of a gate is HIGH when odd
numbers of HIGH inputs are applied. If Even number of HIGH inputs or all the inputs are LOW
the output will be LOW.
IC74266 is a quad 2-input Ex-NOR function. It is a gate with two and one output. When
all the inputs are LOW or HIGH the output will be HIGH. The output of a gate is LOW when
odd numbers of HIGH inputs are applied.
Procedure
Note: Student should write it on your own with proper meaning and sentence formation
Circuit Diagram
IC Diagram
Logic Diagram
Truth Table
A B Y=(A.B)
0 0
0 1
1 0
1 1
IC Diagram
Logic Diagram
Truthtable
A B Y=(A+B)
0 0
0 1
1 0
1 1
NOT Gate (IC7404)
IC Diagram
Logic Diagram
Truth Table
A Y=A
IC Diagram
Logic Diagram
Truth Table
A B Y=A.B
0 0
0 1
1 0
1 1
OR Gate (IC 7432)
IC Diagram
Logic Diagram
Truth Table
A B Y=A+B
0 0
0 1
1 0
1 1
IC Diagram
Logic Diagram
Truth Table
A B Y=AB
0 0
0 1
1 0
1 1
EX-NOR Gate (IC74266)
IC Diagram
Logic Diagram
Truth Table
A B Y=(AB)
0 0
0 1
1 0
1 1
Result
The testing of logic gates using ICs was done and output was verified by the
functionality.
Exp.No: 8 Date:
TESTING OF ADDERS
Aim
To test and verify the following adders using IC 7486, 7408 & 7432.
Half Adder
Full Adder
Apparatus Required
o Patch Cord
Theory
Half Adder:
The half adder is an example of a simple, functional digital circuit built from two logic
gates. The half adder adds to one-bit binary numbers (AB). The output is the sum of the two
bits (S) and the carry (C). Note how the same two inputs are directed to two different gates. The
inputs to the XOR gate are also the inputs to the AND gate. The input "wires" to the XOR gate
are tied to the input wires of the AND gate; thus, when voltage is applied to the A input of the
XOR gate, the A input to the AND gate receives the same voltage.
Sum = AB + AB = AB
Carry = AB
Full Adder:
The full-adder circuit adds three one-bit binary numbers (C A B) and outputs two one-bit
binary numbers, a sum (S) and a carry (C1). The full-adder is usually a component in a cascade
of adders, which add 8, 16, 32, etc. binary numbers. The carry input for the full-adder circuit is
from the carry output from the circuit "above" itself in the cascade. The carry output from the
full adder is fed to another full adder "below" itself in the cascade. If you look closely, you'll see
the full adder is simply two half adders joined by an OR.
Sum = ABC
Carry = AB + BC + AC
Procedure
Note: Student should write it on your own with proper meaning and sentence formation
Half Adder
Truthtable
INPUTS OUTPUTS
A B S= A B C= A.B
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
K-Map
Note: Student should have to find out the expression of Sum and Carry using Half Adder
truthtable
Logic Diagram
Circuit Diagram
Full Adder
Truthtable
INPUTS OUTPUTS
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
K-map:
Note: Student should have to find out the expression of Sum and Carry using Full Adder
truthtable
Logic Diagram
Circuit Diagram
Result
Thus the testing of half adder and full adder using ICs was done and output is verified by
the functionality.
Exp.No: 9 Date:
TESTING OF SUBTRACTORS
Aim
To test and verify the following Subtractors using ICs 7486, 7408, 7404, 7432.
Half Subtractor
Full Subtractor
Apparatus Required
o Patch Cord
Theory
Half Subtractor:
Difference = AB + AB = AB
Borrow = AB
Full Subtractor:
As in the case of the addition using logic gates, a full subtractor is made by combining two half-
subtractors and an additional OR-gate. A full subtractor has the borrow in capability and so allows
cascading which results in the possibility of multi-bit subtraction. The circuit diagram for a full
subtractor is given below.
Difference = ABC
Borrow = AB + BC + AC
Procedure
Note: Student should write it on your own with proper meaning and sentence formation
Half Subtractor
Truthtable
INPUTS OUTPUTS
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
K-Map
Note: Student should have to find out the expression of Difference and Borrow using
Half Subtractor truthtable
Logic Diagram
Circuit Diagram
Full Subtractor
Truthtable
INPUTS OUTPUTS
A B C Diff Bor
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
K-Map
Note: Student should have to find out the expression of Difference and Borrow using Full
Subtractor truthtable
Logic Diagram
Circuit Diagram
Result
Thus the testing of half subtractor and full subtractor using ICs was done and output was
verified by the functionality.
Exp.No: 10 Date:
Aim
To test and verify the truth table of four bit binary comparator circuit using IC 74LS85.
Apparatus Required
o IC 74LS85
o Connecting Wires
Theory
Comparator
The 74LS85 is a 4-bit magnitude comparator that can be expanded to almost any length.
It compares two 4-bit binary, BCD, or other monotonic codes and presents the three possible
magnitude results at the outputs. The 4-bit inputs are weighted (A0A3) and (B0B3) where A3
and B3 are the most significant bits. The operation of the 74LS85 is described in the Function
Table, showing all possible logic conditions. The upper part of the table describes the normal
operation under all conditions that will occur in a single device or in a series expansion scheme.
In the upper part of the table the three outputs are mutually exclusive. In the lower part of the
table, the outputs reflect the feed-forward conditions that exist in the parallel expansion scheme.
The expansion inputs IA>B, and IA=B and IA<B are the least significant bit positions. When used for
series expansion, the A>B, A=B and A<B outputs of the lease significant word are connected to
the corresponding IA>B, IA=B and IA<B inputs of the next higher stage. For proper operation, the
expansion inputs of the least significant word should be tied as follows: IA>B= 0 , IA=B= 1, and
IA<B= 0.
Procedure
Note: Student should write it on your own with proper meaning and sentence formation.
Circuit Diagram
IC Diagram
Logic Symbol
Truth Table
Result
The testing of 4 bit binary comparator using IC 74LS85 was done and output was
verified by functionality.
Exp.No: 11 Date:
Aim
To test and verify the truth table of following combinational circuits using ICs 74LS151
& 74LS155.
Multiplexer
Demultiplexer
Apparatus Required
o Connecting Wires
Theory
Multiplexer
Multiplexer is a combinational circuit that is one of the most widely used in digital
design. The LS151 is a logical implementation of a single pole, 8-position switch with the switch
position controlled by the state of three Select inputs, S0, S1, S2. Both assertion and negation
outputs are provided. The Enable input (E) is active 0. When it is not activated, the negation
output is 1 and the assertion output is 0 regardless of all other inputs. The LS151 provides the
ability, in one package, to select from eight sources of data or control information. By proper
manipulation of the inputs, the LS151 can provide any logic function of four variables and its
negation.
Demultiplexer
The data distributor, known more commonly as a Demultiplexer or Demux for short, is
the exact opposite of the Multiplexer we saw in the previous tutorial. The demultiplexer takes
one single input data line and then switches it to any one of a number of individual output lines
one at a time. The demultiplexer converts a serial data signal at the input to a parallel data at its
output lines. These monolithic transistor-transistor logic (TTL) circuit feature dual 1 to 4 line
demultiplexer with individual strobes end common binary address inputs in a single 16 pin
package. When both sections are enabled by the strobes, the common binary address inputs
sequentially select and route associated inputs data to the appropriate output of each section. The
individual strobes permit activating or inhibiting each of the 4- bit sections as desired. Data
applied to inputs 1C is inverted at its outputs and data applied at 2C' is not inverted through its
outputs. The inverter following the 1C data input permits use as a 3 to 8 line decoder or 1 to 8
line demultiplexer without external gating. Input clamping diodes are provided on all of these
circuits to minimize transmission line effects and simplify system design.
Procedure
Note: Student should write it on your own with proper meaning and sentence formation
Multiplexer
Pin Diagram
Logic Diagram
Truthtable
Demultiplexer
Pin Diagram
Logic Symbol
Truthtable
Result
The testing of Multiplexer (MUX) and Demultiplexer (DEMUX) using ICs was done
and output was verified by functionality.
Exp.No: 12 Date:
Aim
To test and verify the truth table of following combinational circuits using ICs.
Decoder
Encoder
Apparatus Required
o IC 74HC138N - 1 no
o IC 74HC148N - 1 no
o Connecting Wires
Theory
Decoder
Encoder
The 74HC148 also uses priority encoding and features eight active low inputs and a
three-bit active low binary (Octal) output. The internal logic of the 74HC148 is shown in logic
symbol. The IC is enabled by an active low Enable Input (EI), and an active low Enable output
(EO) is provided so that several ICs can be connected in cascade, allowing the encoding of more
inputs, for example a 16-to-6-line encoder using two 8-to-3 encoders.
The CMOS 74HC148 also uses active low inputs and outputs. The operation of the
74HC148 can be seen from its truth table. Notice from truthtable that the IC is only active when
EI is low, and also that for each input selected by a low logic level (L), all lower value inputs
indicate Dont Care, typical of priority encoding. Two further outputs (GS and EO) are used for
connecting additional 74HC148 ICs in cascade.
The EI input is normally used on the most significant IC and whenever an input on this
IC is selected, the EO output goes high (disabling any less significant ICs), and the Group Select
(GS) output goes low indicating that the group of outputs of this IC are active.
Procedure
Note: Student should write on your own with proper meaning and sentence formation.
Decoder
Pin Diagram
Logic Symbol
Truthtable
Inputs Outputs
E1 E2 E3 A2 A1 A0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
1 X X X X X 1 1 1 1 1 1 1 1
X 1 X X X X 1 1 1 1 1 1 1 1
X X 0 X X X 1 1 1 1 1 1 1 1
0 0 1 0 0 0 1 1 1 1 1 1 1 0
0 0 1 0 0 1 1 1 1 1 1 1 0 1
0 0 1 0 1 0 1 1 1 1 1 0 1 1
0 0 1 0 1 1 1 1 1 1 0 1 1 1
0 0 1 1 0 0 1 1 1 0 1 1 1 1
0 0 1 1 0 1 1 1 0 1 1 1 1 1
0 0 1 1 1 0 1 0 1 1 1 1 1 1
0 0 1 1 1 1 0 1 1 1 1 1 1 1
Encoder
Pin Diagram
Logic Symbol
Truthtable
Inputs Outputs
EI I0 I1 I2 I3 I4 I5 I6 I7 A2 A1 A0 GS EO
1 X X X X X X X X 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1 1 1 1 0
0 X X X X X X X 0 0 0 0 0 1
0 X X X X X X 0 1 0 0 1 0 1
0 X X X X X 0 1 1 0 1 0 0 1
0 X X X X 0 1 1 1 0 1 1 0 1
0 X X X 0 1 1 1 1 1 0 0 0 1
0 X X 0 1 1 1 1 1 1 0 1 0 1
0 X 0 1 1 1 1 1 1 1 1 0 0 1
0 0 1 1 1 1 1 1 1 1 1 1 0 1
Result
The testing of Decoder and Encoder using ICs was done and output was verified by
functionality.
Exp.No: 12 Date:
Aim
To study and verify the truth table of following sequential circuits using IC CD4027BE.
JK Flipflop
SR Latch
Apparatus Required
o IC CD4027BE 1 No
o Connecting Wires
Theory
Logic levels present at the j and K inputs along with internal self-steering control the
state of each flipflop; changes in the flipflop state are synchronous with the positive going
transition of the clock pulse. Set and Reset functions are independent clock and are initiated
when a high level signal is present at either the Set or Reset input.
Procedure
Note: Student should write it on your own with proper meaning and sentence formation
Pin Diagram
Logic Symbol
Truthtable
JK Flipflop
INPUTS OUTPUTS
S R J K Clock Q Q
1 0 x x x 1 0
0 1 x x x 0 1
1 1 x x x Forbidden State
0 0 0 1 0 1
0 0 1 0 1 0
0 0 1 1 Toggle State
SR Latch
INPUTS OUTPUTS
S R Q Q
0 1 0 1
1 0 1 0
Result
The testing of JK Flipflop and SR Latch using IC CD4027BE was done and output was
verified by functionality.
Exp.No: 14 Date:
Aim
To test and verify the truth table of BCD Decade counter circuit using IC 74LS90 .
Apparatus Required
o IC 74LS90
o Connecting Wires
Theory
Decade Counter
The counters four outputs are designated by the letter symbol Q with a numeric subscript equal
to the binary weight of the corresponding bit in the BCD counter circuits code. So for example
Q0, Q1, Q2 and Q3. The 74LS90 counting sequence is triggered on the negative going edge of the
clock signal, that is when the clock signal CP0 goes from logic 1 (HIGH) to logic 0 (LOW).The
additional input pins MR1 and MR2 are counter reset pins while inputs MS1 and MS2 are set
pins. When connected to logic 1, the Reset inputs MR1 and MR2 reset the counter back to zero, 0
(0000), and when the Set inputs MS1 and MS2 are connected to logic 1, they Set the counter to
maximum, or 9 (1001) regardless of the actual count number or position.
As we said before, the 74LS90 counter consists of a divide-by-2 counter and a divide-by-
5 counter within the same package. Then we can use either counter to produce a divide-by-2
frequency counter only, a divide-by-5 frequency counter only or the two together to produce our
desired divide-by-10 BCD counter.With the four flip-flops making up the divide-by-5 counter
section disabled, if a clock signal is applied to input pin 14 (CP0) and the output taken from pin
12 (Q0), we can produce a standard divide-by-2 binary counter for use in frequency dividing
circuits as shown.
Procedure
Note: Student should write it on your own with proper meaning and sentence formation.
Decade Counter
IC Diagram
Circuit Diagram
Truthtable
Count Sequence
Count Output
Q0 Q1 Q2 Q3
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
Result
The testing of decade counter using IC 74LS90 was done and output was verified by
functionality.
Exp.No: 15 Date:
Aim
To test and verify the truth table of Universal Shift Register (sequential circuit) using IC
74LS194N.
Apparatus Required
o IC SN74LS194N
o Connecting Wires
Theory
These universal shift registers are designed to incorporate virtually all of the features a
system designer may want in a shift register. The circuit contains 46 equivalent gates and
features parallel inputs, parallel outputs, right-shift and left-shift serial inputs, operating-mode
control inputs and a direct overriding clear line. The register has four distinct modes of
operation, namely:
Synchronous parallel loading is accomplished by applying the four bits of data and taking
both mode control inputs S0 and S1 high. The data are loaded into the associated flip-flops and
appear at the outputs after the positive transition of the clock input. During loading serial data
flow in inhibited. Shift right is accomplished synchronously with the rising edge of the clock
pulse when S0 is high and S1 is low. Serial data for this mode is entered at the shift-right data
input. When S0 is low and S1 is high, data shifts left synchronously and new data is entered at the
shift-left serial input.
Clocking of the shift register is inhibited when both mode control inputs are low. The mode
controls of the SN54194/SN74194 should be changed only while the clock input is high.
Procedure
Note: Student should write it on your own with proper meaning and sentence formation.
IC Diagram
Logic Symbol
Truthtable
Inputs Outputs
MR S1 S0 DSR DSL Q0 Q1 Q2 Q3
0 X X X X 0 0 0 0
1 0 0 X X q0 q1 q2 q3
1 0 1 0 X 0 q0 q1 q2
1 0 1 1 X 1 q0 q1 q2
1 1 0 X 0 q1 q2 q3 0
1 1 0 X 1 q1 q2 q3 1
1 1 1 X X P0 P1 P2 P3
Result
The testing of universal shift register using IC SN74LS194N was done and output was
verified by functionality.