Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views45 pages

Digital Circuits Lab

The document outlines a Digital Circuits Simulation Lab with a list of experiments focused on designing and verifying various digital circuits, including combinational circuits, decoders, multiplexers, and counters. It provides detailed instructions for using the SynaptiCAD tool for Verilog programming and includes truth tables, circuit diagrams, and aims for each experiment. Additionally, it covers the theory behind components like full adders and demultiplexers, along with practical applications and viva questions for assessment.

Uploaded by

sreedhar_vk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views45 pages

Digital Circuits Lab

The document outlines a Digital Circuits Simulation Lab with a list of experiments focused on designing and verifying various digital circuits, including combinational circuits, decoders, multiplexers, and counters. It provides detailed instructions for using the SynaptiCAD tool for Verilog programming and includes truth tables, circuit diagrams, and aims for each experiment. Additionally, it covers the theory behind components like full adders and demultiplexers, along with practical applications and viva questions for assessment.

Uploaded by

sreedhar_vk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 45

PART A: DIGITAL CIRCUITS SIMULATION LAB

LIST OF EXPERIMENTS:
1. Design a simple combinational circuit with four variables and obtain minimal expression
and verify the truth table using Digital Trainer Kit.
2. Verification of functional table of 3 to 8-line Decoder /De-multiplexer.
3. 4 Variable logic function verification using 8 to1 multiplexer.
4. Design full adder circuit and verify its functional table.
5. Design a four-bit ring counter using D Flip–Flops/JK Flip Flop and verify output
6. Design a four bit Johnson’s counter using D Flip-Flops/JK Flip Flops and verify output
7. Verify the operation of 4-bit Universal Shift Register for different Modes of operation.
8. Draw the circuit diagram of MOD-8 ripple counter and construct a circuit using T-Flip-
Flops and Test It with a low frequency clock and sketch the output waveforms.
9. Design MOD–8 synchronous counter using T Flip-Flop and verify the result and sketch
the output waveforms.
10. (a) Draw the circuit diagram of a single bit comparator and test the output
(b) Construct 7 Segment Display Circuit Using Decoder and7 Segment LED and test it.

11. Design Binary to Gray and Gray to Binary conversion using gates
CONTENTS

S.NO. NAME OF THE EXPERIMENT PAGE NO


1 Design of combinational circuits with four variables.

2 3 to 8-line Decoder /De-multiplexer.

3 8 to1 multiplexer.

4 Full adder.
Four-bit ring counter using D Flip–Flops/JK Flip Flop.
5
Four bit Johnson’s counter using D Flip-Flops/JK Flip Flops.
6

7 4-bit Universal Shift Register.

8 MOD-8 ripple counter using T-Flip-Flops.

9 MOD–8 synchronous counter using T Flip-Flop.

10 A. single bit comparator


B.7 Segment Display Circuit Using Decoder and7 Segment LED
11 Design Binary to Gray and Gray to Binary conversion using gates
Getting Started With SYNAPTICAD Tool for
VERILOG Programming
 Choose Start > SynaptiCAD > TestBencher Pro menu to launch the simulator with the graphical debugger.

 create a file called Filename by choosing the Editor > New HDL File menu option to

 open an editor window.

 Type in your source code and save the file.

 Then add the file to the project by right clicking on the User Source Files Folder and choosing

Add HDL Files to Source File Folder from the context menu.

 First, build the project by pressing the yellow Build button on the simulation button bar or

selecting the Simulate > Build menu.

 Building the project compiles the source files.

 After the build you are also able to set the top-level component for the project and/or select

additional signals to watch using the project tree context menus.

 Watch signals are those listed in the Waveform Diagram Window.

 Check the Report window to find any syntax errors found by the build.

 Next, start the simulator by pressing one of the green buttons on the Build and Simulate button bar.

 The simulated signals should appear in the Waveform window

 The Testbench Results should appear Report Window > Verilog.log


DCD LABORATORY II B.Tech I Sem

EXP NO : DATE:

AIM:- Design a simple combinational circuit with four variables and obtain minimal expression
and verify the truth table

APPARATUS REQUIRED:
Desktop Computer, Synapticad Tool for Verilog Programming

Example:

Function = Sum of Product (SOP) Y = ∑m (2,3,6,7,8,10,13,15)

SELECTI
ON OUTPUTS
LINES

A B C D Y
0 0 0 0 0
0 0 0 1 0
0 0 1 0 1
0 0 1 1 1
0 1 0 0 0
0 1 0 1 0
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 0
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0
1 1 0 1 1
1 1 1 0 0
1 1 1 1 1

SOP realization Diagram

Solution:-

Page 4
DCD LABORATORY II B.Tech I Sem

Explanation
The simplification of the function is done as per the following steps −
There are no isolated 1s in the K-Map.
The minterm m2 can form a 4-square with m3, m6, and m7. Make it and read it as −
A’C
The minterm m8 can form a 2-square with m10. Make it and read it as −
ABD’
The minterm m13 can form a 2-square with m15. Make it and read it as −
(AB’D)
Write all the product in SOP form.
So the simplified SOP expression is,
f(A,B,C,D)=A’C+AB’D+ABD’

RESULT:

Page 5
DCD LABORATORY II B.Tech I Sem

LOGIC DIAGRAM:

FIG: 3:8 DECODER

TRUTH TABLE FOR DECODER:

Page 6
DCD LABORATORY II B.Tech I Sem

EXP. NO: DATE:

3 TO 8-LINE DECODER /DE-MULTIPLEXER

AIM:-Verification of functional table of 3 to 8-line Decoder /De-multiplexer.

APPARATUS REQUIRED:
Desktop Computer, Synapticad Tool for Verilog Programming

THEORY:

ENCODER:

An encoder is a device, circuit, transducer, software program, algorithm or person that


converts information from one format or code to another, for the purposes of
standardization, speed, secrecy, security, or saving space by shrinking size. An encoder has
M input and N output lines. Out of M input lines only one is activated at a time and
produces equivalent code on output N lines. If a device output code has fewer bits than the
input code has, the device is usually called an encoder. For example Octal-to-Binary
Encoder take 8 inputs and provides 3 outputs, thus doing the opposite of what the 3-to-8
decoder does. At any one time, only one input line has a value of 1. The figure below
shows the truth table of an Octal-to-binary encoder.

For an 8-to-3 binary encoder with inputs I0-I7 the logic expressions of the outputsY0-
Y2 are:

Y0 = I1 + I3 + I5 + I7Y1= I2 + I3 + I6 + I7Y2 = I4 + I5 + I6 +I7

DECODER:

A decoder is a device which does the reverse operation of an encoder, undoing the
encoding so that the original information can be retrieved. The same methodused to encode
is usually just reversed in order to decode. It is a combinational circuit thatconverts binary
information from n input lines to a maximum of 2n unique output lines. Indigital
electronics, a decoder can take the form of a multiple-input, multiple-output logiccircuit
that converts coded inputs into coded outputs, where the input and output codes are
different. e.g. n-to- 2n, binary-coded decimal decoders. Enable inputs must be on for the
decoder to function, otherwise its outputs assume a single "disabled" output code word. In
case of decoding all combinations of three bits eight (2 3=8) decoding gates are required.
This type of decoder is called 3-8 decoder because 3 inputs and 8 outputs. For any input
combination decoder outputs are 1.

Page 7
DCD LABORATORY II B.Tech I Sem

LOGIC DIAGRAM:

FIG: 1:4 DEMUX

TRUTH TABLE FOR DEMUX:

Page 8
DCD LABORATORY II B.Tech I Sem

DEMULTIPLEXER:

Demultiplexer means generally one into many. A demultiplexer isa logic


circuit with one input and many outputs. By applying control signals, we can
steerthe input signal to one of the output lines. The ckt has one input signal,
m control signal and n output signals. Where 2 n = m. It functions as an
electronic switch to route anincoming data signal to one of several outputs.

RESULT:

CONCLUSION:

VIVA QUESTIONS:

1. What do you understand by decoder?

2. What is demultiplexer?

3. What do you understand by encoder?

4. What is the main difference between decoder and demultiplexer?

5. Why Binary is different from Gray code?

Page 9
DCD LABORATORY II B.Tech I Sem

LOGIC DIAGRAM:

FIG: 8:1 MULTIPLEXER

FUNCTION TABLE

SELECTION STROBE
LINES OUTPUTS

C B A E Y Y
X X X 1 0 1
0 0 0 0 D0 D0
0 0 1 0 D1 D1
0 1 0 0 D2 D2
0 1 1 0 D3 D3
1 0 0 0 D4 D4
1 0 1 0 D5 D5
1 1 0 0 D6 D6
1 1 1 0 D7 D7

X = don’t care condition.

Page 10
DCD LABORATORY II B.Tech I Sem

EXP NO: DATE:


8:1 MULTIPLEXER
AIM: Design a 8 to 1 multiplexer by using the 4 variable function given by F(A, B, C, D) =
∑ (0,1,3,4,8,9,15).

APPARATUS REQUIRED:
Desktop Computer, Synapticad Tool for Verilog Programming

THEORY:

Design of 8 to 1 Multiplexer: It is a four-variable function and thus we require a multiplexer along with three
selection lines and 8 inputs. We select to apply variables B, C, and D for the selection lines. It is shown in
Table no.1. The first half of given minterms are associated with A' and the second half with A. Through
circling the minterms of the function and applying the rules for determine values for the multiplexer inputs,
the implementation represented in Table no.2.

The specified function can be implemented along with a 8-to-1 multiplexer as represented in fig.(a). 3 of the
variables as B, C and D are applied to the selection lines in order that is B is connected to s2, C to s1 and D to
s0. Hence the inputs of the multiplexer are 0, 1, A and A'. As BCD = 000,001 and 111 output F = 1 because
I0 and I8 = 1 for BCD(000), I1 = 1and I9 =1 correspondingly. Thus, minterms m0 = A' B' C' m1 = A' B' C,
m8 = A', B', C' and m9 = A' B' C generate a 1 output. While BCD = 010, 101 and 110, output F = 0, as I2, I5
and I6 respectively are equivalent to 0.

Page 11
DCD LABORATORY II B.Tech I Sem

Minterm A B C D F

0 0 0 0 0 1

1 0 0 0 1 1

2 0 0 1 0 0

3 0 0 1 1 1

4 0 1 0 0 1

5 0 1 0 1 0

6 0 1 1 0 0

7 0 1 1 1 0

8 1 0 0 0 1

9 1 0 0 1 1

10 1 0 1 0 0

11 1 0 1 1 0

12 1 1 0 0 0

13 1 1 0 1 0

14 1 1 1 0 0

15 1 1 1 1 1

Table no.1 Truth Table for 8-1 Multiplexer

Page 12
DCD LABORATORY II B.Tech I Sem

Table no.2 Implementation Table for 8 to 1 MUX

Fig.(a) Logic circuit for 8-to-1 Multiplexer

RESULT :

CONCLUSION:

Page 13
DCD LABORATORY II B.Tech I Sem
VIVA QUESTIONS:

1. What is a multiplexer?

2. What are the applications of multiplexer and de-multiplexer?

3. What is a de-multiplexer?

4. In 2n to 1 multiplexer how many selection lines are there?

5. Implement an 8:1 mux using 4:1 muxes?

Page 14
DCD LABORATORY II B.Tech I Sem

CIRCUIT DIAGRAM:

TRUTH TABLE

X Y Z Sum (S) Carry (C)


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

Page 15
DCD LABORATORY II B.Tech I Sem

Exp No: Date:


FULL ADDER

AIM: To verify the truth tables of Full Adder.

APPARATUS REQUIRED:
Desktop Computer, Synapticad Tool for Verilog Programming

THEORY:

Full adder
A Full adder is a combinational circuit that performs addition of three input bits. Half adder
has inputs X, Y, Z and outputs sum (S) and carry(C). The truth table is

X Y Z Sum (S) Carry (C)


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

Page 16
DCD LABORATORY II B.Tech I Sem

The simplified Boolean expressions are

The logic circuit to implement is as shown below

Page 17
DCD LABORATORY II B.Tech I Sem

FULL ADDER USING TWO HALF ADDERS AND OR GATE

A full adder can also be implemented using two half adders and one OR gate as shown in
fig.The sum output from second half adder is

S=x EXOR y EXOR z S=x’y’z’+x’yz’+xy’z’+xyz

C=xy+yz+xz

RESULT:

CONCLUSION

VIVA QUESTIONS:

1. What is use of Full adder?

2. What is difference between the half and full adder?

3. How many half adders required to make a full adder?

4. In full adder how many types of gates are required?

5. Draw full adder circuit?

Page 18
DCD LABORATORY II B.Tech I Sem

LOGIC DIAGRAM:

FIG: RING COUNTER

Page 19
DCD LABORATORY II B.Tech I Sem

Exp No: Date:


RING COUNTER

AIM: Design a four-bit ring counter using D Flip–Flops/JK Flip Flop.

APPARATUS REQUIRED:

Desktop Computer, Synapticad Tool for Verilog Programming

THEORY:

Ring counter and Johnson counters are basically shift registers Ring

Ring counter:

It is made by connecting Q&Q‟ output of one JK FF to J&K input of next FF respectively.


The output of final FF is connected to the input of first FF. To start the counterthe first
FF is set by using preset facility and the remaining FF are reset input. When the clock arrives
the set condition continues to shift around the ring ,

As it can be seen from the truth table there are four unique output stages for this counter. The
modulus value of a ring counter is n, where n is the number of flip flops. Ring
counter iscalled divided by N counter where N is the number of FF

Page 20
DCD LABORATORY II B.Tech I Sem

RESULT:

COCLUSION:

VIVA QUESTIONS:

1. What do you mean by Counter?

2. What is the ring counter?

3. What are the types of Counters? Explain each

4. Why asynchronous counters are called as ripple counters?

5. What are the applications of asynchronous counters?

Page 21
DCD LABORATORY II B.Tech I Sem

Exp No: Date:


JOHNSON’S COUNTER

AIM: Design a four bit Johnson’s counter using D Flip-Flops/JK Flip Flops.

APPARATUS REQUIRED:

Desktop Computer, Synapticad Tool for Verilog Programming

THEORY:

Ring counter and Johnson counters are basically shift registers

Johnson counter (Twisted ring counter)

The modulus value of a ring counter can be doubled by making a small change in the ring counter circuit.
The Q‟ and Q of the last FFS are connected to the J and K input of the first FFrespectively. This is the
Johnson counter.

Initially the FFs are reset. After first clock pulse FF0 is set and the remaining FFs are reset.
After the eight clock pulse all the FFS are reset. There are eight different conditions creating a
mode 8 Johnson counter. Johnson counter is called a twisted ring counter or divide by 2N
counter.

Page 22
DCD LABORATORY II B.Tech I Sem

LOGIC DIAGRAM:

FIG: JOHNSON COUNTER

Page 23
DCD LABORATORY II B.Tech I Sem

RESULT:

COCLUSION:

VIVA QUESTIONS:

1. What is the Johnson counter?

2. What is the difference between the counting sequence of an up counter and a


down counter?

3. What down you mean by down counter?

4. What is the advantage of Ripple counter over Synchronous Counter?

5. What are the applications of the counters?

Page 24
DCD LABORATORY II B.Tech I Sem

LOGIC DIAGRAM:

FIG: UNIVERSAL SHIFT REGISTER DIAGRAM

Page 25
DCD LABORATORY II B.Tech I Sem

Exp No: Date:


UNIVERSAL SHIFT REGISTER

AIM: Verify the operation of 4-bit Universal Shift Register for different Modes of operation.

APPARATUS REQUIRED: Desktop Computer, Synapticad Tool for Verilog Programming

THEORY:

Shift registers are the sequential logic circuits that can store the data temporarily and provides
the data transfer towards its output device for every clock pulse. These are capable of
transferring/shifting the data either towards the right or left in serial and parallel modes. Based
on the mode of input/output operations, shift registers can be used as a serial-in-parallel-out shift
register, serial-in-serial-out shift register, parallel-in-parallel-out shift register, parallel-in-
parallel-out shift register. Based on shifting the data, there are universal shift registers and
bidirectional shift registers. Here is a complete description of the universal shift register.
What is a Universal Shift Register?
Definition: A register that can store the data and /shifts the data towards the right and left along
with the parallel load capability is known as a universal shift register. It can be used to perform
input/output operations in both serial and parallel modes. Unidirectional shift registers and
bidirectional shift registers are combined together to get the design of the universal shift register.
It is also known as a parallel-in-parallel-out shift register or shift register with the parallel load.
Universal shift registers are capable of performing 3 operations as listed below.
 Parallel load operation – stores the data in parallel as well as the data in parallel
 Shift left operation – stores the data and transfers the data shifting towards left in the
serial path
 Shift right operation – stores the data and transfers the data by shifting towards right in
the serial path.
Hence, Universal shift registers can perform input/output operations with both serial and parallel
loads.
 Serial input for shift-right control enables the data transfer towards the right and all the
serial input and output lines are connected to the shift-right mode. The input is given to
the AND gate-1 of the flip-flop -1 as shown in the figure via serial input pin.
 Serial input for shift-left enables the data transfer towards the left and all the serial input
and output lines are connected to shift-left mode.
 In parallel data transfer, all the parallel inputs and outputs lines are associated with the
parallel load.
 Clear pin clears the register and set to 0.
 CLK pin provides clock pulses to synchronize all the operations.
 In the control state, the information or data in the register would not change even though
the clock pulse is applied.
 If the register operates with a parallel load and shifts the data towards the right and left,
then it acts as a universal shift register.
 From the above figure, selected pins the mode of operation of the universal shift register.
Serial input shifts the data towards the right and left and stores the data within the
register.
Page 26
DCD LABORATORY II B.Tech I Sem

FIG: UNIVERSAL SHIFT REGISTER DESIGN

FUNCTION TABLE:

S0 S1 Mode of Operation
0
0 Locked state (No change)
0
1 Shift-Left
Shift-Right
1 0
Parallel Loading
1 1

Page 27
DCD LABORATORY II B.Tech I Sem

 Clear pin and CLK pin are connected to the flip-flop.


 M0, M1, M2, M3 are the parallel inputs while F0, F1, F2, F3 are the parallel outputs of
flip-flops
 When the input pin is active HIGH, then the universal shift register loads / retrieve the
data in parallel. In this case, the input pin is directly connected to 4×1 MUX
 When the input pin (mode) is active LOW, then the universal shift register shifts the data.
In this case, the input pin is connected to 4×1 MUX via NOT gate.
 When the input pin (mode) is connected to GND (Ground), then the universal shift
register acts as a Bi-directional shift register.
 To perform the shift-right operation, the input pin is fed to the 1st AND gate of the 1st
flip-flop via serial input for shit-right.
 To perform the shift-left operation, the input pin is fed to the 8th AND gate of the last
flip-flop via input M.
 If the selected pins S0= 0 and S1 = 0, then this register doesn’t operate in any mode. That
means it will be in a Locked state or no change state even though the clock pulses are
applied.
 If the selected pins S0 = 0 and S1 = 1, then this register transfers or shifts the data to left
and stores the data.
 If the selected pins S0 = 1 and S1 = 0, then this register shifts the data to right and hence
performs the shift-right operation.
 If the selected pins S0 = 1 and S1 = 1, then this register loads the data in parallel. Hence
it performs the parallel loading operation and stores the data.

Page 28
DCD LABORATORY II B.Tech I Sem

RESULT:

CONCLUSION:

VIVA QUESTIONS:

1. What do you mean by shift register?

2. Explain the operation of a left shift register & a right shift register?

3. What is the difference between a register and shift register?

4. What is meant by universal shift register?

5. Explain the various modes in which the data can be entered or taken out from a register?

Page 29
DCD LABORATORY II B.Tech I Sem

Exp No: Date:


MOD-8 RIPPLE COUNTER

AIM: Draw the circuit diagram of MOD-8 ripple counter and construct a circuit using T-Flip-Flops
and Test It with a low frequency clock and sketch the output waveforms.

APPARATUS REQUIRED:
Desktop Computer, Synapticad Tool for Verilog Programming

THEORY:

Asynchronous counter:

A digital counter is a set of flip flop. An Asynchronous counter uses T flip flop to perform a
counting function. The actual hardware used is usually J-K flip-flop connected to logic 1.
In ripple counter, the first flip-flop is clocked by the external clock pulse & then each successive
flip-flop is clocked by the Q or /Q‘ output the previous flip-flop. Therefore in an asynchronous
counter the flip-flop are not clocked simultaneously. The input of MS-JK is connected to VCC
because when both inputs are one output is toggled. As MS-JK is negative edge triggered at each
high to low transition the next flip-flop is triggered. On this basis the design is done for MOD-8
counter.

1) Up Counter:

Fig shows 3 bit Asynchronous Up Counter. Here Flip-flop A act as a MSB Flip-flop and Flip-
flop C can act as a LSB Flip-flop. Clock pulse is connected to the Clock of flip-flop C. Output of
Flip-flop C (Qc) is connected to clock of next flip-flop(i.e. Flip-flop B) and so on. As soon as
clock pulse changes output is going to -change(at the negative edge of clock pulse) as a Up count
sequence. For 3 bit Up counter Truth table is as shown below.

2) Down Counter:

Fig shows 3 bit Asynchronous Down Counter. Here Flip-flop a act as a MSB Flip-flop
and Flip-flop C can act as a LSB Flip-flop. Clock pulse is connected to the Clock of flip-flop C.
Output of Flip-flop C (Qc‘) is connected to clock of next flip- flop (i.e. Flip-flop B) and so on.
As soon as clock pulse changes output is going to change(at the negative edge of clock pulse) as
a down count sequence. For 3 bit down counter Truth table is as shown below.

Page 30
DCD LABORATORY II B.Tech I Sem

Truth Table:

Up Counter Down Counter


Counter States F/F Output
Counter States F/F Output
QA QB QC
QA QB QC
7 1 1 1
0 0 0 0
6 1 1 0
1 0 0 1
5 1 0 1
2 0 1 0
4 1 0 1
3 0 1 1
3 0 1 1
4 1 0 0
2 0 1 0
5 1 0 1
1 0 0 1
6 1 1 0
0 0 0 0
7 1 1 1

LOGIC DIAGRAM:

FIG: 3- BIT ASYNCHRONOUS UP COUNTER

FIG: 3- BIT ASYNCHRONOUS DOWN COUNTER

Page 31
DCD LABORATORY II B.Tech I Sem

TIMING DIAGRAM:

1. 3 Bit Asynchronous Up Counter

CLK

Qa
0 0 0 0
3 1 1 1

Qb
0 0 1 1 0 0 1 1

Qc
0 0 0 0 1 1 1 1

2. 3 Bit Asynchronous Down Counter:

CLK

Qc
0 0 0 0
1 1 1 1

Qb
0 1 1 0 0 1 1 0

Qa
0 0 0 0
1 1 1 1

Page 32
DCD LABORATORY II B.Tech I Sem

RESULT:

CONCLUSION:

VIVA QUESTIONS:

1. What do you understand by counter?

2. What is asynchronous counter?

3. What is synchronous counter?

4. Which flip flop is used in asynchronous counter?

5. Which flip flop is used in synchronous counter?

Page 33
DCD LABORATORY II B.Tech I Sem

Exp No: Date:


MOD–8 SYNCHRONOUS COUNTER

AIM: To Design MOD–8 synchronous counter using T Flip-Flop.

APPARATUS REQUIRED:
Desktop Computer, Synapticad Tool for Verilog Programming

THEORY:

A counter in which each flip-flop is triggered by the output goes to previous flip-flop.As all
the flip-flops do not change states simultaneously in asynchronous counter, spike occur at the
output. To avoid this, strobe pulse is required. Because of the propagation delay the operating
speed of asynchronous counter is low. This problem can be solved by triggering all the flip-flops
in synchronous with the clock signal and such counters are called synchronous counters.

Page 34
DCD LABORATORY II B.Tech I Sem

MOD 8 COUNTER:

LOGIC DIAGRAM:

FIG: 3 BIT SYNCHRONOUS COUNTER

TRUTH TABLE:

Present count Next count


QC QB QA
0 0 0 QC QB QA QC QB QA
0 0 1 0 0 0 0 0 1
0 1 0 0 0 1 0 1 0
0 1 1 0 1 0 0 1 1
1 0 0 0 1 1 1 0 0
1 0 1 1 0 0 1 0 1
1 1 0 1 0 1 1 1 0
1 1 1 1 1 0 1 1 1
0 0 0 1 1 1 0 0 0

T-FLIPFLOP EXCITATION TABLE:

States Input
Present Next T
0 0 0
0 1 1
1 0 1
1 1 0

Page 35
DCD LABORATORY II B.Tech I Sem

RESULT:

CONCLUSION:

VIVA QUESTIONS:

1. What are synchronous counters?

2. What are the advantages of synchronous counters?

3. What is an excitation table?

4. Write the excitation table for D, T FF?

5. Design mod-5 synchronous counter using T FF?

Page 36
DCD LABORATORY II B.Tech I Sem

LOGIC DIAGRAM:

Fig: 1- BIT COMPARATOR


TRUTH TABLE

INPUTS OUTPUTS
A>B = A B A B A>B A=B A<B
_ 0 0 0 1 0
A<B = A B
0 1 0 0 1 _ _

1 0 1 0 0 A=B = A B +AB
1 1 0 1 0

Page 37
DCD LABORATORY II B.Tech I Sem

Exp No: Date:


A. COMPARATOR

AIM: Draw the circuit diagram of a single bit comparator and test the output.

APPARATUS REQUIRED:
Desktop Computer, Synapticad Tool for Verilog Programming

THEORY:
Magnitude Comparator is a logical circuit, which compares two signals A and B andgenerates
three logical outputs, whether A > B, A = B, or A < B. IC 7485 is a high
speed 4-bit Magnitude comparator , which compares two 4-bit words . The A = B Inputmust be
held high for proper compare operation.

Page 38
DCD LABORATORY II B.Tech I Sem

RESULT:

CONCLUSION:

VIVA QUESTIONS:

1. What is a comparator?

2. What are the applications of comparator?

3. Derive the Boolean expressions of one bit comparator and two bit comparators.

4. How do you realize a higher magnitude comparator using lower bit comparator

5. Design a 2 bit comparator using a single Logic gates?

Page 39
DCD LABORATORY II B.Tech I Sem

Exp No: Date:


B. 7 SEGMENT DISPLAY

AIM: Construct 7 Segment Display Circuit Using Decoder and7 Segment LED and test it.

APPARATUS REQUIRED:
Desktop Computer, Synapticad Tool for Verilog Programming

THEORY:

The functions of LT, RBI, RBO and BI are given below. LT This is called the LAMP TEST
terminal and is used for segment testing. If it is connected to logic ‘0’ level, all the segements of
the display connected to the decoder will be ON. For normal decoding operation, this terminal is
to be connected to logic ‘1’ level. RBI For normal decoding operation, this is connected to logic
‘1’ level. If it is connected to logic ‘0’, the segment outputs will generate the data for normal 7-
segment decoding, for all BCD inputs except Zero. Whenever the BCD inputs correspond to
Zero, the 7-segment display switches off. This is used for zero blanking in multi-digit displays.
BI If it is connected to logic ‘0’ level, the display is switched-off irrespective of the BCD inputs.
This is used for conserving the power in multiplexed displays. RBO This output is used for
cascading purposes and is connected to the RBI terminal of the succeeding stage.

Page 40
DCD LABORATORY II B.Tech I Sem

CIRCUIT DIAGRAM:

FIG: SEVEN SEGMENT DISPLAY


TRUTH TABLE :

Display
D C B A a b c d e f g
Number

0 0 0 0 0 0 0 0 0 0 1

0 0 0 1 1 0 0 1 1 1 1

0 0 1 0 0 0 1 0 0 1 0

0 0 1 1 0 0 0 0 1 1 0

0 1 0 0 1 0 0 1 1 0 0

0 1 0 1 0 1 0 0 1 0 0

0 1 1 0 1 1 0 0 0 0 0

0 1 1 1 0 0 0 1 1 1 1

1 0 0 0 0 0 0 0 0 0 0

1 0 0 1 0 0 0 1 1 0 0

Page 41
DCD LABORATORY II B.Tech I Sem

RESULT:

CONCLUSION:

VIVA QUESTIONS:

1. What are the applications of seven segment display?

2. Can you use the segments outputs of 7448 decoder directly to drive a 7-Segment LED?
If not suggest a suitable interface?

3. Describe the operation performed by the decoder?

4. What is the function of RBI input?

5. What is the difference between common anode & common cathode display?

Page 42
DCD LABORATORY II B.Tech I Sem

Exp No: Date:

12. BINARY TO GRAY AND GRAY TO BINARY CONVERSIONS

AIM: Construct 7 Segment Display Circuit Using Decoder and7 Segment LED and test it.

APPARATUS REQUIRED:
Desktop Computer, Synapticad Tool for Verilog Programming

Binary to Gray conversion :


The Most Significant Bit (MSB) of the gray code is always equal to the MSB of the given binary code.
Other bits of the output gray code can be obtained by Ex-ORing binary code bit at that index and previous
index.

There are four inputs and four outputs. The input variable are defined as B3, B2, B1, B0 and the output
variables are defined as G3, G2, G1, G0. From the truth table, combinational circuit is designed.The logical
expressions are defined as :
B3 = G 3

B2 ⊕ B 3 = G 2

B1 ⊕ B 2 = G 1

B0 ⊕B1 =G0

Figure-1: Binary to Gray Code Converter Circuit

Page 43
DCD LABORATORY II B.Tech I Sem

Figure-2: Binary to Gray Code Converter Truth Table

Gray to binary conversion :

The Most Significant Bit (MSB) of the binary code is always equal to the MSB of the given binary number.
Other bits of the output binary code can be obtained by checking gray code bit at that index. If current gray code bit is
0, then copy previous binary code bit, else copy invert of previous binary code bit.

There are four inputs and four outputs. The input variable are defined as G3, G2, G1, G0 and the output variables are
defined as B3, B2, B1, B0. From the truth table, combinational circuit is designed. The logical expressions are defined
as :

G 0 ⊕ G1 ⊕ G2 ⊕ G3 = B 0

G 1 ⊕ G2 ⊕ G3 = B 1

G 2 ⊕ G3 = B 2
G3 =B3

Figure-3: Gray to Binary Code Converter Circuit

Page 44
DCD LABORATORY II B.Tech I Sem

Figure-4: Gray to Binary Code Converter Truth Table

RESULT:

Page 45

You might also like