Professional Documents
Culture Documents
LAB MANUAL
S.E. COMPUTER (SEMESTER-III)
DIGITAL ELECTRONICS LABORATORY
Subject Code: 210243
PREFACE
Course Objectives:
Course Outcomes:
INDEX
Experiment No.1
TTL CHARACTERSTICS
Theory: A group of compatible IC’s with the same logic levels and supply voltages for
performing various logic functions have been fabricated using a specific circuit configuration which is
referred to as logic family.
I.) Characteristics of TTL IC’s: The various characteristics of digital ICs used to compare their
performances are 1. Speed of operation
2. Power dissipation
3. Figure of merit
4. Fan out
6. Noise immunity
9. Flexibilities available
1. Speed of operation:The speed of a digital circuit is specified in terms of the propagation delay
time. The propagation delay time is the time interval between the application of input voltage and
occurrences of resultant o/p voltage and is measured between 50% voltage levels of input and output
waveforms. There are two delay times: tpHL = when output is changing from HIGH state to LOW state.
tpLH= when output is changing from LOW state to HIGH state. The propagation delay time is taken as
the average of these two delay times.
2. Power dissipation:This is the amount of power dissipated in an IC. It is given by the product of Icc
and Vcc, where Icc is the amount of current drawn from the supply Vcc. Icc is the average value of
Icc(0) & Icc(1). This power is specified in milliwatts.
Where Icc(0)= The value of Icc drawn from Vcc when output is low.
Icc(1)= The value of Icc drawn from Vcc when output is high.
Pd=Vcc * Iccavg
3. Figure of merit:
The figure of merit of a digital IC is defined as the product of speed and power. The speed is specified
in terms of propagation delay time expressed in nanoseconds.
It is specified in pico joules (pJ) (ns * mW = pJ). A low value of speed power product is desirable.
1.) tpHL (time it takes for a change in the input to cause a HIGH-to-LOW transition in the output)
2.) tpLH (time it takes for a change in the input to cause a LOW-to-HIGH transition in the output)
4. Fan out:
This is the number of similar gates which can be driven by a gate. Fan-out is a measure of the number
of loads that a gate can drive. High fan out is advantageous because it reduces the need of additional
drivers to drive more gates.
where IOL and IIL are low level output current and low level input current respectively, as explained
below.
High level input voltage (VIH): This is the minimum input voltage which is recognized by
the gate as logic 1.
Low level input voltage (VIL): This is the maximum input voltage which is recognized by
the gate as logic 0.
High level output voltage (VOH): This is the minimum voltage available at the output
corresponding to logic 1.
Low level output voltage (VOL): This is the maximum voltage available at the output
corresponding to logic 0.
High level input current (IIH): This is the minimum current which must be supplied by a
driving source corresponding to logic 1 level voltage.
Low level input current (IIL): This is the minimum current which must be supplied by a
driving source corresponding to logic 0 level voltage.
High level output current (IOH): This is the maximum current which the gate can sink in 1
level.
Low level output current (IOL): This is the maximum current which the gate can sink in 0
level.
High level supply current, ICC (1): This is the supply current when the output of the gate is at
logic 1.
Low level supply current, ICC (0): This is the supply current when the output of the gate is at
logic 0.
fan-out:
Sinking current is the conventional current flowing into the gate and the gate is said to be
‘sinking’ current.
Sourcing current is the conventional current flowing out of the gate and the gate is said to be
‘sourcing’ or supplying current
6. Noise Immunity:
Stray electric and magnetic fields may induce unwanted voltages, known as noise, on the connecting
wires between logic circuits. This may cause the voltage at the input to a logic circuit to drop below
VIH or rise above VIL and may produce undesired operation. The circuit’s ability to tolerate noise
signals is referred to as the noise immunity, a quantitative measure of which is called as noise margin.
(Ref fig.2)
Voltages
VOH
VIL
0 State noise margin ∆ 0 = VIL-VOL
VOL
7. Operating Temperature:
The temperature range in which an IC functions properly is specified. The accepted temperature
ranges are: 0 to +70◦C for consumer and industrial applications and -55◦C to +125◦C for military
purposes.
The supply voltage(s) and the amount of power required by an IC are important characteristics
required to choose the proper power supply.
9. Flexibilities available:
Various flexibilities are available in different IC logic families and these must be considered while
selecting a logic family for a particular job. Some of the flexibilities available are:
i.) The breadth of the series: Type of different logic functions available in the series.
ii.) Popularity of the series: the cost of manufacturing depends upon the number of IC’s
manufactured. When a large number of IC’s of one type are manufactured, the cost per
function will be very small and it will be easily available because of multiple sources.
iii.) Wired logic capability: The outputs can be connected together to perform additional logic
without any extra hardware.
iv.) Availability of complement outputs: This eliminates the need for additional inverters.
v.) Type of output: Passive pull-up, active pull-up, open-collector/drain, and tristate.
Conclusion: TTL logic family characteristics and ICs are thoroughly studied.
Experiment No.2
Aim: Code converters e.g. Excess-3 to BCD and vice versa
LEARNING OBJECTIVE:
THEORY: Code converter is a combinational circuit that translates the input code word into a new
corresponding word. The excess-3 code digit is obtained by adding three to the corresponding BCD
digit. To Construct a BCD-to-excess-3-code converter with a 4-bit adder feed BCD-code to the 4-bit
adder as the first operand and then feed constant 3 as the second operand. The output is the
corresponding excess-3 code. To make it work as a excess-3 to BCD converter, we feed excess-3 code
as the first operand and then feed 2's complement of 3 as the second operand. The output is the BCD
code.
To make it work as a excess-3 to BCD converter, we feed excess-3 code as the first operandand then
feed 2's complement of 3 as the second operand. The output is the BCD code.
Conclusion
Experiment No.3
Aim: Multiplexers: Application like Realization of Boolean expression using Multiplexer.
Theory:
Multiplexer
The multiplexer is a special combinational circuit that is one of the most widely used standard circuits
in digital design. The multiplexer (or data selector) is a logic circuit that gates one out of several
inputs to a single output. The input selected is controlled by a set of select inputs. Figure (a) shows the
block diagram of multiplexer with n input lines and one output line. For selecting inputs is required,
where 2m=n. Depending upon the digital code applied at the select inputs one out of n data sources is
selected and transmitted to a single output channel. Normally, a strobe (or enable) input (G) is
incorporated which helps in cascading and it is generally active-low, which means it performs its
intended operation when it is LOW.
I0
I1
Inputs I2 Y
N: 1
Output
In-1
Multiplexer
Sm-1 S2 S1 S0
I1 0 0 1 0 I1
I2 0 1 0 0 I2
I3 0 1 1 0 I3
I4 1 0 0 0 I4
I5 1 0 1 0 I5
I6 1 1 0 0 I6
I7 1 1 1 0 I7
Types of Multiplexer:
o 2:1 MUX
o 4:1 MUX
o 8:1 MUX
o 16:1MUX
Different Multiplexer IC’s:
Advantages of Multiplexer:
1. It reduces number of wires.
2. It reduces the circuit complexity and cost.
3. We can implement many combinational circuits.
4. It simplifies the logic design
5. It doesn’t need the k maps and simplification
Applications of Multiplexer:
1. Used as a data selector to select one out of many data inputs.
2. Used for simplification of logic design.
3. In data acquisition system
4. In designing the combinational circuits.
5. In D/A converters.
6. To minimize the number of connections
Experiment No.4
Aim: Demultiplexers: Applications like Realization of ROM using Demultiplexer
Theory:
Demultiplexer/Decoder:
The demultiplexer performs the reverse operation of a multiplexer. It accepts a single input and
distributes over several outputs. Figure2 gives the block diagram of a demultiplexer. The select input
code determines to which output the data input will be transmitted.
The number of output lines is n and the number of select lines is m, where n=2m. This circuit can also
be used as binary-to-decimal decoder with binary inputs applied at the select input lines and the
output will be obtained on the corresponding line. The data input line is to be connected to logic 1
level. The device is very useful if multiple output combinational circuit is to be designed, because this
needs the minimum package count.
D0
1: N D1
Output
Inputs Demultiplex DY2
er
Dn-1
Sm-1 S2 S1 S0
1 0 0 0 0 0 0 1 1 1 1 1 1 1
1 0 0 0 0 1 1 0 1 1 1 1 1 1
1 0 0 0 1 0 1 1 0 1 1 1 1 1
1 0 0 0 1 1 1 1 1 0 1 1 1 1
1 0 0 1 0 0 1 1 1 1 0 1 1 1
1 0 0 1 0 1 1 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 1 1 1 1 1 1 1 0
Procedure:
1) Make the connections as per the circuit diagram.
2) Give inputs according to the Truth Table and verify the outputs.
Conclusion:
Experiment No.5
Aim: BCD adder/Subtractor using 4 bit binary adder 7483
Theory:
BCD adder is a circuit that adds 2 BCD digits and procedures a sum of digit also in BCD. BCD
addition procedures can be summarized as follows,
The logic circuit to determine sum greater than ‘9’ can be determined by simplifying the Boolean
expression of the given truth table: -
A4 1 16 B4
S3 2 15 S4
A3 3 14 C4
B3 4 13 C0
VCC GND
5 12
S2 6 11 B1
B2 7 10 A1
A2 8 9 S1
Truth Table:
S4 S3 S2 S1 C
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 1
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
Y = S4 (S3 + S2)
Procedure:
Results:
Conclusion:
Experiment No.6
Aim: Flip flops, Registers and Counters (Study and Write up only).
Truth Table verification of
1) RS Flip Flop
2) T type Flip Flop.
3) D type Flip Flop.
4) JK Flip Flop.
5) JK Master Slave Flip Flop.
LEARNING OBJECTIVE:
COMPONENTS REQUIRED: IC 7408, IC 7404, IC 7402, IC 7400, Patch Cords & IC Trainer Kit.
THEORY:
Logic circuits that incorporate memory cells are called sequential logic circuits; their outputdepends
not only upon the present value of the input but also upon the previous values.Sequential logic circuits
often require a timing generator (a clock) for their operation.
The latch (flip-flop) is a basic bi-stable memory element widely used in sequential logic
circuits. Usually there are two outputs, Q and its complementary value.
Some of the most widely used latches are listed below.
SR LATCH:
An S-R latch consists of two cross-coupled NOR gates. An S-R flip-flop can also be design
using cross-coupled NAND gates as shown. The truth tables of the circuits are shown below.
A clocked S-R flip-flop has an additional clock input so that the S and R inputs are
active only when the clock is high. When the clock goes low, the state of flip-flop is latched
and cannot change until the clock goes high again. Therefore, the clocked S-R flip-flop
is also called “enabled” S-R flip-flop.
A D latch combines the S and R inputs of an S-R latch into one input by adding an
inverter. When the clock is high, the output follows the D input, and when the clock
goes low, the state is latched.
A S-R flip-flop can be converted to T-flip flop by connecting S input to Qb and R to Q.
Conclusion
EXPERIMENT: 7
AIM :To implement the ripple counter using flip flop .
Theory:
A counter is a sequential circuit that moves through a predefined sequence of states upon
applying of clock pulses. The sequence of states may follow the binary number sequence or
an arbitrary manner (no sequence). The simplest example of a counter is the binary counter
which follows the binary number sequence. An n-bit binary counter contains n flip-flops and
can count binary numbers from 0 to (2n -1). Counters are classified into two types:
synchronous counters and ripple counter. In a synchronous counter, all flip flops are
triggered by a common pulse (CP). In the ripple counter a flip flop output used as a signal for
triggering other flip flop. In this experiment we will present these two types and explain their
design and operation.
Equipments:
1.4 J-K flip-flops (2 x 7473 TTL – IC chip) .
2.Logic Lab Trainer.
3.Connection leads.
Procedures:
Conclusion:
EXPERIMENT: 8
AIM: Design and set up a Sequence Generator using IC 7495.
PROCEDURE:
1. Check all the components for their working.
2. Insert the appropriate IC into the IC base.
3. Make connections as shown in the circuit diagram.
4. By Keeping mode=1. Load the input A,B,C,D as in Truth Table 1st Row and give a
clock
5. pulseFor count mode make mode = 0.
6. Verify the Truth Table and observe the outputs.
DESIGN 1:
Sequence = 100010011010111
Sequence length S = 15 Y = QC (+) QD
Conclusion:-
EXPERIMENT: 9
AIM: To design IC 74193 as a up/down counter
LEARNING OBJECTIVE:
To learn about Up- Down Counter and its application
COMPONENTS REQUIRED:
IC 74193, Patch Cords & IC Trainer Kit
PROCEDURE:
LEARNING OBJECTIVE:
COMPONENTS REQUIRED:
PROCEDURE:
EXPERIMENT NO. 11
Title: Pseudo Random Number Generator Using IC 74194.
We know that a register may operate in any of the modes , like SISO, SIPO, PISO, PIPO or
bi-directional. 74194 has 4 parallel data i/p ( D0-D3) & S0 & S1 are the control i/ps.When S0
& S1 are high , data appearing on D0-D3 i/ps is transffered to the Q0-Q3 o/ps respectively,
following the next Low to High transition of the clock shift right is accomplished by setting
S1 S0 = 0 1, & serial data is entered at the shift right serial i/p, DSR. Shift left is accomplished
by setting S1 S0 = 1 0 , & serial data is entered at the shift left serial i/p, DSL.CP is clock
pulse (positive edge triggered).
I/Ps O/Ps
Reset (Clear) 0 0 0 0 0
1 1 0 0 Q1 Q2 Q3 0
Shift Left
1 1 0 1 Q1 Q2 Q3 1
1 0 1 0 0 Q0 Q1 Q2
Shift Right
1 0 1 1 1 Q0 Q1 Q2
Parallel Load 1 1 1 Dn D0 D1 D2 D3
Hold 1 0 0 Q0 Q1 Q2 Q3
Q3 Q2 Q1 Q0 = 0 0 1 1
The PRBS generator cannot generate a truly random sequence because this stucture is a
deterministic stucture. This is the reason why the sequence repeats itself. The maximum
length of the sequence will be 2m-1.This is because the state 0 0 0…….0 must be excluded.
0 0 1 1 0 1 0 1 1 1 1 0 0 0 1
Binary sequence of Q3
Application of PRBS:
Since the sequence produced is random, PRBS generator is also called as a Pseudo
Noise Generator. This noise can be used to test the noise immunity of the system
under test.
PRBS generator is an important part of data encryption system. Such a system is
required to protect the data from data hackers.
Procedure:
Method-II
Shift right operation mode of IC 74194.
Connect MR pin to ground . All o/p of Q0 Q1 Q2 Q3 = 0 0 0 0.
Then shift right operation mode.
EX-NOR PRB
Clock Shift Register
Gate Sequence
Pulse
Q3 Q2 Q1 Q0 Q3
0 0 0 0 0 00=1 0
1 0 0 0 1 00=1 0
2 0 0 1 1 00=1 0
3 0 1 1 1 01=0 0
4 1 1 1 0 11=1 1
5 1 1 0 1 11=1 1
6 1 0 1 1 10=0 1
7 0 1 1 0 01=0 0
8 1 1 0 0 11=1 1
9 1 0 0 1 10=0 1
10 0 0 1 0 00=1 0
11 0 1 0 1 01=0 0
12 1 0 1 1 10=0 1
13 0 1 0 0 01=0 0
14 1 0 0 0 10=0 1
15 0 0 0 0 00=1 0
16 0 0 0 1 00=1 0
17 0 0 1 1 00=1 0
18 0 1 1 1 01=0 0
19 1 1 1 0 11=1 1
Procedure:
****Experiment No 11
Introduction to VHDL DESIGN FLOW (VHDL Code)
3. Enter or browse to a location (directory path) for the new project. A tutorial
4. Verify that HDL is selected from the Top-Level Source Type list.
Family: Spartan3
Device: XC3S200
Package: PQ208
Speed Grade: -4
When the table is complete, your project properties will look like the following:
7. Click Next to proceed to the Create New Source window in the New Project Wizard. At the end of
the next section, your new project will be complete.
5. Click Next.
6. Declare the ports for the counter design by filling in the port information as shown
below:
7. Click Next, then Finish in the New Source Information dialog box to complete the new source file
template.
7. Click Next, then Finish in the New Source Information dialog box to complete the new source file
template.
The source file containing the entity/architecture pair displays in the Workspace, and the counter
displays in the Sources tab, as shown below:
When you are finished, the counter source file will look like the following:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
--library UNISIM;
--use UNISIM.VComponents.all;
entity counter is
DIRECTION : in STD_LOGIC;
end counter;
begin
process (CLOCK)
begin
if DIRECTION='1' then
else
end if;
end if;
end process;
end Behavioral;
Sources window.
2. Select the counter design source in the Sources window to display the related
3. Click the “+” next to the Synthesize-XST process to expand the process group.
Note: You must correct any errors found in your source files. You can check for errors in the Console
tab of the Transcript window. If you continue without valid syntax, you will not be able to simulate or
synthesize your design.
Design Simulation
Create a test bench waveform containing input stimulus you can use to verify the functionality of the
counter module. The test bench waveform is a graphical view of a test bench.
3. In the New Source Wizard, select Test Bench WaveForm as the source type, and type
counter_tbw in the File Name field.
4. Click Next.
5. The Associated Source page shows that you are associating the test bench waveform
6. The Summary page shows that the source will be added to the project, and it displays the source
directory, type and name. Click Finish.
7. You need to set the clock frequency, setup time and output delay times in the Initialize Timing
dialog box before the test bench waveform editing window opens.
EXPERIMENT NO. 14
TITLE: 4-bit Asynchronous down counter using VHDL.
• If Statements
• Case Statements
• Loop Statements
• Next Statements
• Exit Statements
• Subprograms
• Return Statement
• Wait Statements
• Null Statements
Concurrent Statements:
The functionality of a design is defined in VHDL by a set of concurrent statements.
These statements mimic hardware in that many of these statements can be active at the same
time. All concurrent statements describe the functionality of multiplexer structures. It is
impossible to model storage elements, like Flip Flops with concurrent statements, only.
The main concurrent statements:
1. Process Statements
2. Block Statements
4. Direct Instantiation
5. Generate Statements
Process Statements:
Target:
Names the variables that receive the value of expression.
Expression:
Determines the assigned value; its type must be compatible with the target.
When a variable is assigned a value, the assignment takes place immediately. A variable
keeps its assigned value until another assignment takes place.
1.2 Signal Assignment Statements:
A signal assignment changes the value being driven on a signal by the current process.
The syntax is:
target <= expression;
Target:
Names the signals that receive the value of expression.
Expression
Determines the assigned value; its type must be compatible with target.
Signals and variables act in different ways when they receive values. The differences lie in
the way the two kinds of assignments take effect and how that influence the value reads from
either variables or signals.
2. IF Statements:
The if statement is a statement that depending on the value of one or more
corresponding conditions, selects for execution one or none of the enclosed sequences of
statements.
The syntax is:
1) if-then statement
if condition then
sequential_statements
end if;
2) if-then-else statement
if condition then
sequentiaL_statements
else
sequential_statements
end if;
3) if-then-elsif-else statement
if condition then
sequential_statements
eLsif condition then
sequential_statements
else
sequential_statements
end if;
3.Case Statements:
Definition:
The case statement selects for execution one of several alternative sequences of
statements; the alternative is chosen based on the value of the associated expression.
The syntax is:
case expression is
when choices =>
{ sequentiaL_statement }
{ when choices =>
{ sequentiaL_statement } }
end case;
4.Loop Statements:
Definition:
A loop statement repeatedly executes a sequence of statements.
The syntax is:
[ Label: ] [ iteration_scheme]loop
{ sequential_statement }
{ next [ tabel] [ when condition ] ; }
8. Return Statements:
return; -- Procedures
9. Null Statements:
The null statement explicitly states that no action is required. It is often used in case
statements because all choices must be covered, even if some of the choices are ignored.
null;
The behavioral VHDL code for the 4-bit binary down counter is Shown in Fig.B
Design Experiments:
Conclusion:
----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------