Académique Documents
Professionnel Documents
Culture Documents
SE (CSE) SEM – I
DIGITAL TECHNIQUES LAB MANUAL
List of Experiment
1 Introduction to Lab
EXPERIMENT NO. 01
TITLE: INTRODUCTION TO LAB
AIM:
Introduction to Lab
APPARATUS:
Trainer kit,Connecting wires, power supply, Logic gates,Xlinx software
THEORY:
The Digital signal contains the information in discrete symbols (e.g. numbers in coded
form). It has discrete or quantized (the values of such a signal are restricted to belong
to a finite set) values. The signal can be represented by integer numbers. One of the
most common representations of a digital signal is the binary signal, which has a set
of two elements:0 and 1.
The operation of almost all modern digital computers is based on two-valued or
binary systems.Propositions may be TRUE or FALSE, and are stated as functions of
other propositions which are connected by the three basic logical connectives: AND,
OR, and NOT.
Logic Variables :
Logic variables are used to describe the occurrence of events. It can have two values
i.e. TRUE or FALSE or YES/NO which refers to the occurrence of an event. Their
meaning corresponds to the everyday meaning of the words in question. TRUE
corresponds to logic-1 and FALSE corresponds to logic-0. Here 1 and 0 are not digits;
they do not have any numeric value.
Trainer kit :
An electronic kit is a package of electrical components used to build an electronic
device. Generally, kits are composed of electronic components, a circuit diagram
(schematic), assembly instructions and often a printed circuit board (PCB) or another
type of prototyping board. Also emerging is a trend to simplify the complexity by
providing preprogrammed or modular kits and this is provided by many suppliers
online often.
Xilinx :
Xilinx ISE (Integrated Synthesis Environment) is a software tool produced by
Xilinx for synthesis and analysis of HDL designs, enabling the developer to
synthesize ("compile") their designs, perform timing analysis, examine RTL
diagrams, simulate a design's reaction to different stimuli, and configure the target
device with the programmer.
Experiment No. 02
OBJECTIVES:
APPARATUS:
IC Trainer Kit, patch chords, power supply, AND(IC 7408), OR (IC7432), NOT
(IC7404), NOR (IC7402), NAND (IC7400).
THEORY:
a) Verification of truth table of basic and universal logic gates.
A logic gate is just a simple Boolean function, in the sense that it has only
either of two outputs. Either 1 or 0, high or low, true or false, whatever you call it. It
is the most elementary tool in building a circuit. A logic gate performs a logical
operation on an input and gives the appropriate output for it. There are 3 basic logic
gates. Those are AND gate, OR gate and NOT gate. There are 2 universal gates
NAND gate and NOR gate. Given below are the different logic gates, their symbols,
descriptions and truth tables.
The AND gate is a digital logic gate with ‘n’ i/ps one o/p, which perform
logical conjunction based on the combinations of its inputs. The output of this gate is
true only when all the inputs are true. When one or more inputs of the AND gate’s
i/ps are false, then only the output of the AND gate is false. The symbol and truth
table of an AND gate with two inputs is shown below.
Truth Table of AND Gate
A B O/P
0 0 0
0 1 0
1 0 0
1 1 1
The OR gate is a digital logic gate with ‘n’ i/ps and one o/p, that performs a
logical conjunction based on the combinations of its inputs. The output of the OR gate
is true only when one or more inputs are true. If all i/ps of the gate are false, then only
the output of the OR gate is false. The symbol and truth table of an OR gate with two
inputs is shown below.
Truth Table of OR Gate
A B O/P
0 0 0
0 1 1
1 0 1
1 1 1
A O/P
0 1
1 0
A B O/P
0 0 1
0 1 1
1 0 1
1 1 0
Fig 1.4: Pin Configuration of NAND gate
A B O/P
0 0 1
0 1 0
1 0 0
1 1 0
Fig 1.5: Pin Configuration of NOR gate
A B C Y1 Y2 Y
0 0 0 0 0 0
0 0 1 0 0 0
0 1 0 0 0 0
0 1 1 0 0 0
1 0 0 0 1 1
1 0 1 0 0 0
1 1 0 1 1 1
1 1 1 1 0 0
1.
Place the IC on IC Trainer Kit.
2.
Connect VCC and ground to respective pins of IC Trainer Kit.
3.
Connect the inputs to the input switches provided in the IC Trainer Kit.
4.
Connect the outputs to the switches of O/P LEDs,
5.
Apply various combinations of inputs according to the truth table and
observe condition of LEDs.
6. Verify the truth table of various gates.
7. Apply various combinations of inputs according to the truth table and
observe conditions of LEDs.
8. Verify the truth table for each input-output combination.
Conclusion:
Thus we verified the truth table of basic and universal logic gates.
EXPERIMENT NO. 03
OBJECTIVES:
Apparatus:
Theory:
Karnaugh maps are the most extensively used tool for simplification of
Boolean functions. It is mostly used for functions having up to six variables beyond
which it becomes very cumbersome. In an n-variable K-map there are 2ⁿ cells. Each
cell corresponds to one of the combination of n variable, since there are 2ⁿ
combinations of n variables. Gray code has been used for the identification of cells.
The following function is to be reduced by using K-Map.
Y=ABC+A’BC+AB’C+ABC’……….1
The given function is in SOP form. In SOP form Normal terms are represented by 1
and negation terms are represented by 0.So, the equation will become as in binary
form as below,
Y=111+011+101+110…………2
Y=AB+BC+AC…………… (4)
Procedure:
Conclusion:
Thus we implemented given reduced Boolean functions using basic gates
and universal gate.
EXPERIMENT NO. 04
AIM:
Implementation of half adder and full adder using logic Gates
OBJECTIVES:
Apparatus:
IC Trainer Kit, patch chords, power supply, AND(IC 7408), OR(IC7432),
NOT(IC7404).
Theory:
Half Adder:
A half adder can add two bits at a time. Its outputs are SUM and
CARRY. For two bit addition- SUM will be 1, if only one input is 1(X-OR
operation). CARRY will be one, when both inputs are 1 (AND operation). So,
by using one AND gate and one X-OR gate, a half adder circuit can be
constructed.
From the truth table, we obtain the logical expressions for S and C outputs as:
SUM = AB’ + A’B (3.1)
SUM=A + B
CARRY = AB (3.2)
The realization of an half adder using the gates is shown in Fig.3.1
Full adder:
An half adder has only two inputs and there is no Provision to add a carry
coming from lower order bits when multi bit is performed.
For this purpose ,a third input terminal is added and this circuit is used to add
An , Bn and Cn-1,where An and Bn are nth order bits of the numbers A and B
respectively and Cn- is the carry generated from the addition of (n-1)th order bits.
This circuit is referred to as full-adder and its truth table is given in Table 3.2
The K-map for the outputs Sn and Cn are given below and the minimized
expressions are given below,
K-map for Sum
00 01 11 10
0 1 0 1
1 0 1 0
00 01 11 10
0 0 1 0
0 1 1 1
Procedure:
1. Connect the trainer kit to ac power supply.
2. Connect logic sources to the inputs of the adder.
3. Connect output from SUM and CARRY to logic indicators.
4. Apply various input combinations to the adder.
5. Observe the SUM and CARRY outputs, verify the truth table for each input/
output combination.
6. Switch off the ac power supply.
Conclusion:
Thus we have Implemented half adder and full adder using logic Gates and also
verified its truth table
EXPERIMENT No. 05
IMPLIMENTATION OF MULTIPLEXER
Aim:
a) Design and Implement a 4:1 multiplexer using 74153 IC.
b) Design and Implement a 8:1 multiplexer using 74151 IC.
Objectives:
a) To Design and Implement a 4:1 multiplexer using 74153 IC.
b) To Design and Implement a 8:1 multiplexer using 74151 IC.
Apparatus:
IC Trainer Kit, patch chords, power supply, 74153 IC, 74151 IC
Theory:
Multiplexer:-
Multiplexer is the special type of combinational circuit. It quite often
happens, in the design of large-scale digital systems, that a single line is required to
carry two or more different digital signals. Of course, only one signal at a time can be
placed on the one line. What is required is a device that will allow us to select, at
different instants, the signal we wish to place on this common line. Such a circuit is
referred to as a Multiplexer.
A multiplexer performs the function of selecting the input on any one of 'n'
input lines and feeding this input to one output line. Multiplexers are used as one
method of reducing the number of integrated circuit packages required by a particular
circuit design. This in turn reduces the cost of the system.
4:1 multiplexer
IC Description:
74153 is a 4 line-to-1 line multiplexer. It has the schematic representation shown in
Fig 4.2. Selection lines S1 and S0 select the particular input to be multiplexed and
applied to the output. Strobe S acts as an enable signal. If strobe =1, the chip 74153 is
the chip disabled and output y = 0. If strobe = 0 then the chip 74153 is enabled and
functions as a multiplexer. Table 4.1 shows the multiplex function of 74153 in terms
of select lines. IC 74LS153 is used as 4x1 multiplexer IC & pinout for IC 74153 is as
below:
8:1 multiplexer
IC Description:
74151 is a 8 line-to-1 line multiplexer. It has the schematic representation shown in
Fig 5.2. Selection lines S2, S1 and S0 select the particular input to be multiplexed and
applied to the output. Strobe S acts as an enable signal. If strobe =1, the chip 74151 is
disabled and output y = 0. If strobe = 0 then the chip 74151 is enabled and functions
as a multiplexer. Table 1 shows the multiplex function of 74151 in terms of select
lines. IC 74LS151 is used as 8x1 multiplexer IC & pinout for IC 74151 is as below:
Procedure: -
1. Make the connections as per the circuit diagram.
2. Switch on Vcc.
Conclusion:
Thus we have Design and Implemented a 4:1 and 8:1 multiplexer using 74153
IC.
Experiment No.06
Flip Flops Using NAND/NOR Gates
Aim: Implementation of flip flops using NAND/NOR gates: S-R Flip flop, D flips
flop.
Objectives:
a) To implement S-R Flip flop by using NAND/NOR gates
b) To implement D Flip flop by using NAND/NOR gates
1 1 ?
Fig 7.3(a) Symbol of JK flip flop (b) Circuit diagram of JK Flip Flop.
the other two lines in a JK FF truth table? We make sure they do not occur by
connecting a NOT gate between the inputs J and K, as shown in Fig.
Fig 5.5(a) Symbol of D flip flop (b) Circuit diagram of D Flip Flop.
Inputs Output
0 0
1 1
Procedure:
Draw block diagram, truth table and pin diagram for respective IC.
According to pin assignment, connect the circuit as shown in fig. by using
connecting wires.
Switch ‘ON’ the power supply.
Apply the corresponding inputs and verify the truth table.
Conclusion:
Thus we have implemented S-R ,J-K Flip flop by using NAND gates
EXPERIMENT NO. 7
Apparatus: Digital IC trainer kit, IC 7490, patch chords, power supply, Digital IC
trainer kit.
Theory :
7490 4-Bit Ripple Counter:
The 7490, like the 7493, is another 4-bit ripple counter. However, its flip-flops
are internally connected to provide MOD-2 (count-to-2) and MOD-5 (count-to-5)
counter sections. Again, each section uses a separate clock: Cp0 for MOD-2 and Cp1
for MOD-5. By connecting Q0 to Cp1 and using Cp0 as the single clock input, a
MOD-10 counter (decade or BCD counter) can be created. When master reset inputs
MR1 and MR2 are set high, the counter’s outputs are reset to 0—provided that master
set inputs MS1 and MS2 are not both high (the MS inputs override the MR inputs).
When MS1 and MS2 are high, the outputs are set to Q0 = 1, Q1 = 0, Q2 = 0,
and Q3 = 1. In the MOD-10 configuration, this means that the counter is set to 9
(binary 1001). This master set feature comes in handy if you wish to start a count at
0000 after the first clock transition occurs (with master reset, the count starts out at
0001).
Clock Signal QA QB QC QD
1st 0 0 0 0
2nd 0 0 0 1
3rd 0 0 1 0
4th 0 0 1 1
5th 0 1 0 0
6th 0 1 0 1
7th 0 1 1 0
8th 0 1 1 1
9th 1 0 0 0
10th 1 0 0 1
If any one of R1 & R2 is at high or R3 & R4 are at ground, the counter will reset all
the outputs QA, QB, QC and QD to 0. If the pins R3 & R4 are high, then the count on
QA, QB, QC and QD is 1001.
7490 IC can work like bi –quinary counter, which is used to store decimal digits in the
form of 4 bit binary numbers.
Procedure:
Conclusion:
Thus we have Implemented Mod 10 (Decade) Counter using IC 7490 and verified its
truth table.
Experiment No. 8
TITLE: BCD to 7-segment decoder by using IC7447
Apparatus: Digital IC trainer kit, IC 7447, patch chords, power supply, 7-segment
display
Theory :
A Digital Decoder IC, is a device which converts one digital format into another and
one of the most commonly used devices for doing this is called the Binary Coded
Decimal (BCD) to 7-Segment Display Decoder.
The 74LS47 display decoder receives the BCD code and generates the necessary
signals to activate the appropriate LED segments responsible for displaying the
number of pulses applied. As the 74LS47 decoder is designed for driving a common-
anode display, a LOW (logic-0) output will illuminate an LED segment while a HIGH
(logic-1) output will turn it “OFF”. For normal operation, the LT (Lamp test),
BI/RBO (Blanking Input/Ripple Blanking Output) and RBI (Ripple Blanking Input)
must all be open or connected to logic-1 (HIGH).
Note that while the 74LS47 has active LOW outputs and is designed to decode a
common anode 7 segment LED display, the 74LS48 decoder/driver IC is exactly the
same except that it has active HIGH outputs designed to decode a common cathode 7
segment display. So depending upon the type of 7-segment LED display you have you
may need a 74LS47 or a 74LS48 decoder IC.
The 74LS47 binary coded decimal inputs can be connected to the corresponding
outputs of the 74LS90 BCD Counter to display the count sequence on the 7-segment
display as shown each time the push button SW1 is pressed. By changing the position
of the push button and 10kΩ resistor, the count can be made to change on the
activation or release of the push button switch, SW1.
Decimal A B C D
Digit
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
Procedure:
Conclusion:
Thus we have Implemented BCD to 7-segment decoder by using IC7447.
Experiment No. 08
Aim: a) Write Verilog code to realize all the logic gates, Simulate and verify it’s
working
b) Design the Half subtractor and full Subtractor using Verilog Code, Simulate
and verify it’s working.
Theory :
The Verilog HDL is an IEEE standard - number 1364. The first version of the IEEE
standard for Verilog was published in 1995. A revised version was published in 2001;
this is the version used by most Verilog users. The IEEE Verilog standard document
is known as the Language Reference Manual, or LRM. This is the complete
authoritative definition of the Verilog HDL.
A logic gate performs a logical operation on one or more logic inputs and produces a
single logic output. The logic is normally performed as Boolean logic and is most
commonly found in digital circuits.
In the beginning of a module, we have to declare all ports as input output or inout. By
default, ports will have one pin or one bit.
i. AND gate
The AND gate is an electronic circuit that gives a high output (1) only if
all its inputs are high. A dot (.) is used to show the AND operation i.e.
A.B. Bear in mind that this dot is sometimes omitted i.e. AB
ii. OR gate
The OR gate is an electronic circuit that gives a high output (1) if one or
more of its inputs are high. A plus (+) is used to show the OR operation.
iii. NOT gate
The NOT gate is an electronic circuit that produces an inverted version of
the input at its output. It is also known as an inverter. If the input variable
is A, the inverted output is known as NOT A. This is also shown as A', or
A with a bar over the top, as shown at the outputs.
iv. NAND gate
This is a NOT-AND gate which is equal to an AND gate followed by a
NOT gate. The outputs of all NAND gates are high if any of the inputs are
low. The symbol is an AND gate with a small circle on the output. The
small circle represents inversion.
v. NOR gate
This is a NOT-OR gate which is equal to an OR gate followed by a NOT
gate. The outputs of all NOR gates are low if any of the inputs are high.
The symbol is an OR gate with a small circle on the output. The small
circle represents inversion.
vi. EXOR gate
The 'Exclusive-OR' gate is a circuit which will give a high output if either,
but not both, of its two inputs are high. An encircled plus sign () is used to
show the EOR operation.
vii. EXNOR gate
The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will
give a low output if either, but not both, of its two inputs are high. The
symbol is an EXOR gate with a small circle on the output. The small circle
represents inversion.
Program:
The half substractor schematic is mentioned below. The boolean expressions
are:
Program:
module hs ( a, b, d, br)
input a, b;
output d, br;
assign d= a ^ b;
assign br= ~a & b;
endmodule
The full substractor schematic (fig-2) is mentioned below. The boolean expressions
are:
Program:
module fs ( a, b, bin, d, br)
input a, b, bin;
output d, br;
assign d= a ^ b^bin;
assign br= (~a & b)l(b & bin)l(~a & bin);
endmodule
Conclusion:
Experiment No. 09
Aim: Design a 4:1 & 8:1 multiplexer circuit using Verilog Code, Simulate and verify
it’s working.
Software Used: Xlinx
Theory:
Multiplexer:-
Multiplexer is the special type of combinational circuit. It quite often
happens, in the design of large-scale digital systems, that a single line is required to
carry two or more different digital signals. Of course, only one signal at a time can be
placed on the one line. What is required is a device that will allow us to select, at
different instants, the signal we wish to place on this common line. Such a circuit is
referred to as a Multiplexer.
A multiplexer performs the function of selecting the input on any one of 'n'
input lines and feeding this input to one output line. Multiplexers are used as one
method of reducing the number of integrated circuit packages required by a particular
circuit design. This in turn reduces the cost of the system.
4:1 multiplexer
8:1 multiplexer
Program:
4:1 multiplexer
module mux4to1(S0, S1, DO, D1, D2, D3, Y);
input S0, S1, DO, D1, D2, D3;
output Y;
reg Y;
always@ (S0 or S1 or DO or D1 or D2 or D3)
begin
case ({S0, S1})
0: Y=D0;
1:Y=D1;
2:Y=D2;
3:Y=D3;
endcase
end
endmodule
8:1 multiplexer
module mux8to1(S0, S1, S2, DO, D1, D2, D3,D4, D5, D6, D7, Y);
input S0, S1, DO, D1, D2, D3;
output Y;
reg Y;
always@ (S0 or S1 or DO or D1 or D2 or D3 or D4 or D5 or D6 or D7)
begin
case ({S2, S1,S0})
0: Y=D0;
1:Y=D1;
2:Y=D2;
3:Y=D3;
4:Y=D4;
5:Y=D5;
6:Y=D6;
7:Y=D7;
endcase
end
endmodule
Conclusion: