Académique Documents
Professionnel Documents
Culture Documents
Acknowledgments
Introduction
Objectives
The Digital Kit
1. Prototyping board
2. Power Supply
3. LEDs
4. Switches
5. 7-Segment Display
6. Digital Clocks
Laboratory Exercises
0. Discrete Gates
1. Logic Gates
a. Basic Logic Gates
b. Logic Gates Applications
2. Digital Meets Analog Lab Exercise
3. Full-Adder & Full-Subtractor
a. Construction of Full-Adder
b. Construction of Full-Subtractor
4. Decoders
a. Basic Decoders
b. Decoder Applications
5. Multiplexer
6. PLD
7. Sequential Circuit
8. Counters
9. Shift Registers
10. Mini-Projects
a. Thunderbird Taillights
b. Lamp Ping-Pong
c. Other Proposal
11. IC Symbols & Pin-outs
ACKNOWLEDGMENTS
The laboratory exercises contained within this document have evolved from a set of
exercises that have been taken from the Digital Design System Laboratory Manual 2005.
Helpful comments have been made by Mr. Jose Claro Monje and Dr. Rosula Reyes who have
used the experiments in their teaching of Digital Logic Design and Switching Theory.
INTRODUCTION
The goal of this experiment manual is to introduce the fundamentals of digital electronic
components (basic gates, decoders, multiplexers, flip-flops, counters, shift registers) in a
manner suitable for Engineering students. Breadboard prototyping will be performed to
actualize digital circuits. Hopefully, this manual can serve as a systematic guide to handson experience with digital electronic concepts and devices taught in the lecture course.
OBJECTIVES
The course will provide the student with a firm foundation of the principles of digital design
by building a working knowledge of digital electronics and its applications.
By the end of the semester, the student shall have acquired the basic skill in using the digital
design kit;
Use of prototyping board.
Use of basic gates, decoders and multiplexers.
Use of PLDs
Use of flip-flops, counters and shift registers.
Use of logic probe.
1. Prototyping/ B readboard
The breadboard is used to create a circuit without the need for soldering circuit
elements together. The upper and lower halves of the breadboard contain 63 vertical rows
of 5 interconnected contacts. There are also 4 long horizontal rows of connectors (10
groups of 5 contacts each) along the upper and lower edges. These long rows of
connectors are referred to as power bus strips because they will be connected to the
power supplies to provide power connections over the entirety of the breadboard. This
breadboard socket is designed to accept integrated circuits, most common wire terminal
components, and wire interconnections.
2. POWER SUPPLY
This segme nt of the board can prov i d e a voltage of +5 V and a max i m u m current of 1
A m p e re. The 220 mains voltage is stepped do w n, rectif ie d, filtered and regulated by a +12 V
regulat o r that suppl ies the po we r t o the short circuit protect i o n branc h of this segme nt. The
+12 V is further regulated to prov i d e the +5 V that is availab le for use in whatev er circu i t that
is to be tested. Po wer is turned on by first mo v i n g the swit c h to the 'O N' positi o n and pressing
the 'RES E T / PUS H O N' button. This button is used for turni n g on the board after a short
circ ui t has happened.
3. LEDs
There are eight LE D s availab le. These are activated by suppl y i n g a T T L high to each of the
correspo n d i n g term i n a l bloc k pins.
4. SWITCHES
There are eight available switc hes in the kit, six (Sw5 to Sw0) of wh ic h are ordinar y toggle
switc hes whi le the two others are debou nc e d switc hes (Sw6 & Sw7). The com m o n node of
the single pole doub le thro w switc hes is connected to the wire holder wh i le the other two
nodes to groun d and Vc c.
5. 7-SEGMENT DISPLAY
The two seven segment displays are driven by 7447 B C D- to-seven- segme nt display
decoder/dri v ers. The said driver has 4 inputs correspo n d i n g to the binary code of the desired
deci m a l output on the seven segme nt display. Inputs not connected to any value are
considered as 'floati n g' HI G H , thus causing the display to turn off when not in use.
6. DIGITAL CLOCKS
T w o fixed cloc ks are prov i d e d by the board, one havin g a frequenc y of 100 H z and the
other 1 k H z. The frequen c y of cloc k 1 (CL K 1) can be changed by putti n g across capacit ors
in C1 and . A capacit or value of 47 uF wil l decrease the frequenc y to aroun d 2 Hz. The
frequenc y of cloc k 2 (CL K 2) can be changed by puttin g across capacit o rs in C2 and .
Laboratory Exercises
0. Discrete Gates
This laboratory exercise aims to relate logic gates with discrete electronic elements
such as diodes and transistors. By using a truth table, determine the logic function performed
by the circuits below. Assume that a voltage of 0 to 0.8V is a logic LOW and a voltage of
2.4V to 5V is a logic HIGH. Explain why you are getting the output voltage levels for each
circuit. Are these the expected values for the given circuit?
1. LOGIC GATES
Objective
To fam i l i a r i z e the students wit h the use of T T L (transistor- transistor logic) G A T E S and the
truth table.
Logic Gates
A logic gate perf or m s a logical operati o n on one or more logic inputs and prod uc es a single
logi c output. Since the output is also a logic- level value, an output of one logic gate can be
connected to the input of one or more other logic gates. The logic nor m a l l y perfor m e d is
Boo l ean logic and is most com m o n l y foun d in digital circu its
The most com m o n logic operatio ns are N O T, O R and A N D .
NOT
This logic operati o n outputs the com p l i m e n t of the operand. For exam p l e, N O T 1 = 0 and
N O T 0 = 1. The sym b o ls used to represent the N O T operati o n are the tilde ~ before the
operand ( ), a min us sign before the operand ( ), a pri m e sym b o l ( ) after the
operand or a bar over the operand ( )
Exa m p l es:
or
or
OR
This logic operat io n outputs 1 if at least one operand is equal to 1. For exa m p l e, 1
O R 0 O R 1 O R 0 = 1. The sym b o l used to represent the O R operat io n is a plus sign
bet ween operands (
).
Exa m p l e:
1
AND
This logic operati o n outputs 1 if and only if all operands are equal to 1. For exam p l e, 1 A N D
0 A N D 1 A N D 1 = 0. The sym b o ls used to represent the A N D operatio n are the ampersan d
or the dot prod uc t bet wee n operands (
).
Exa m p l e:
or
Truth tables
A truth table is a table that describes the behav i o r of a logic gate. It lists the value of the
output for every possible com b i n a t i o n of the inputs. Table 1 sho ws the truth table for a N O T
operati o n, Table 2 sho ws the truth table for a two- input A N D operatio n and table 3 sho ws the
truth table for a two- input OR operati o n.
NOT (A)
A AND B
A OR B
Logic Symbol
Note:
1A, 1B are the inputs and 1Y is the output for the first logic gate in the IC;
2A, 2B are the inputs and 2Y is the output for the second logic gate in the IC;
and so on...
Vcc is the supply voltage of the IC.
For TTL, Vcc should be +5V 5% ,i.e., 4.75V to 5.25V.
GND is the ground pin or 0V.
Two volts (2V) to five volts (5V) applied to an input of the IC is considered a high signal
(logic 1). While 0V to 0.8V is considered a low signal (logic 0). Greater than 0.8V and
lower than 2V is considered undefined. This voltage requirement is for TTL but for other
low-powered ICs like LVTTL, LVCMOS, the voltage requirements for a high signal is lower.
You can use logic switches SW0 and SW1 as your inputs. Use the logic probe or LED0 for
the output, construct the truth table for each of the ICs as shown below:
Exhaust all possible combinations of inputs and check the outputs of each.
SW0 = 1A
SW1 = 1B
1Y of 7400
SW0 = 1A
SW1 = 1B
1Y of 7402
SW0 = 1A
SW1 = 1B
1Y of 7408
SW0 = 1A
SW1 = 1B
1Y of 7432
b. Application
1.
The truth table below implements a 3-bit majority one circuit i.e. the output is 1 when
the number of 1s in the input is a majority ( 2 or more 1s). Implement the truth table given
below.
A
OUT
Write the equation for the 3-bit majority one circuit (OUT). Draw the circuit
diagram. Construct the circuit using AND-OR-NOT gates.
FYI, The NOT gate or inverter IC is 74LS04, shown below.
2.
A house alarm system has three inputs alarm enable (E), door intruder (D) sensor
and window intruder (W) sensor. The alarm (A) will turn on if the alarm is enabled (E) and
the door intruder sensor (D) or window intruder sensor (W) is activated. The alarm will not
be activated, if the alarm is not enabled even if there is an intruder coming from the door or
the window. Alarm enable is ON when E = 1. The door intruder sensor is ACTIVATED
when D = 0. The window intruder sensor is ACTIVATED when W = 0.
Construct a truth table for the house alarm system. Using the ICs provided, construct
such an alarm system. Write the equation for the alarm system (A). Draw the circuit or
schematic diagram of your designed alarm system. You may ask for additional ICs from your
instructor like the 74LS04, which is a NOT gate or an inverter.
f
1
1
1
1
0
1
1
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
0
0
0
0
0
0
1
1
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
f
1
0
1
1
0
0
0
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
1
1
1
1
0
0
0
1
Group 2
Group 3
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
f
0
0
1
0
0
0
1
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
1
1
1
1
0
0
1
1
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
f
1
0
1
0
0
1
0
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
1
0
1
1
0
1
1
1
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
f
1
0
0
0
1
1
1
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
1
0
0
0
1
1
0
0
Group 4
Group 5
Group 6
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
f
1
1
1
1
0
0
0
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
0
0
0
1
1
1
1
1
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
f
0
1
0
0
1
1
1
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
0
1
0
0
0
1
0
1
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
f
0
1
0
1
1
0
1
0
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
0
1
1
1
1
0
1
1
Group 7
Group 8
4. NAND Gates. This laboratory exercise requires the design of a simple combinational
circuits using NAND gates (i.e. 74xx00, 74xx10 or 74xx20). This exercise provides some
insight into intuitive minimization at the package level (number of ICs used) rather than the
gate level.
set A
(assigned to groups 1 & 8)
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
f
0
0
0
1
1
1
1
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
0
0
0
1
0
0
1
1
f
0
0
0
1
0
0
1
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
1
1
1
1
0
0
1
1
set B
(assigned to groups 2 & 7)
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
set C
(assigned to groups 3 & 7)
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
f
0
1
0
1
0
1
0
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
0
0
0
1
1
1
1
1
f
0
0
0
1
0
0
0
1
wxyz
1000
1001
1010
1011
1100
1101
1110
1111
f
1
1
1
1
0
1
0
1
set B
(assigned to groups 4 & 5)
wxyz
0000
0001
0010
0011
0100
0101
0110
0111
Paper Design (to be included in the lab report). Design and implement a 4-bit
majority-1 circuit using NAND gates (i.e. 74xx00, 74xx10 or 74xx20). A majority-1 circuit
is a circuit that outputs a 1 when three or four of the inputs are1.
Half-Adder
A half-Adder is a com b i n at i o n a l logic circuit that is able to perf or m the addit i o n of two bits.
It takes two input signals, X and Y, adds them and outputs a sum (S) and carry (C). This ad diti o n consists of four possible com b i n a t i o ns of inputs and outputs, namel y, 0+0=0, 0+1 = 1,
1+0= 1 and 1+ 1 = 1 0. The first three operatio ns have a sum whose lengt h is only 1 bit but the
fourt h, has a sum that consists of two digits. The carry is the higher signi f i c a n t bit of the two
digits in the fourt h possible com b i n at i o n.
The truth table belo w is deri ve d fro m this descript i o n.
INPUT
OUTPUT
X
Y
C(Carry)
0
0
0
0
1
0
1
0
0
1
1
1
S(Sum)
0
1
1
0
The Boo lean expressio n for each output can be deri ve d fro m the truth table:
The two im p le m e n t a t i o n s sho w n belo w of the half- adder circ uit are the sum of produ c ts and
produ c t of sums notatio n taken fro m the truth table above.
Sum of Produ c ts
Produ c t of Sums
Note that S is the exclus i v e- O R of X and Y. The com p le m e n t of S is the equiv ale n c e (exclu sive-N O R) of x and y.
Sum of Produ c ts
Produc t of Sums
Note: Dont dismantle the circuit, you might need it in the succeeding exercise.
4. Decoders
Objective
To fam i l ia r i z e the students wit h the use and applicat i o n of decoders in digital circ uits.
Decoders
A decoder is a mult i p l e- input, mult i p l e- output logic circu it that converts coded inputs into
coded outputs, where the input and output codes are dif fere nt such as n-to-2 n Binar y Coded
Deci m a l (BC D) decoders. Dec o ders have an enable pin, wh ic h needs to be turned on for the
decoder to funct i o n, other w i s e its outputs assume a single "disabled" output code wor d.
Deco d i n g is necessary in applicat i o ns such as data mult i p l e x i n g, 7 segment display and
me m o r y address decod i n g.
Let us consider n-to-2 n type binary decoders. These decoders are com b i n a t i o n a l circ ui ts that
convert binary inf or m a t i o n fro m 'n' nu m be r of coded inputs to a max i m u m nu m be r of 2 n
uniq ue outputs. We say a maximum number of 2 n outputs because if the 'n' bit coded
info r m a t i o n has unused bit com b i n at i o n s, the decoder wou l d have less than 2 n outputs.
A v a i l a b le decoders are the 2-to-4 decoder (74xx 1 3 9), 3-to-8 decoder (74xx 1 3 8) and 4-to-16
decoder (74xx 1 54). W e can for m a 3-to-8 decoder fro m two 2-to-4 decoders (with enable
signals). W e can for m a 4-to-16 decoder fro m two 3-to-8 decoders (with enable signals).
Lab Exercise: a. For the 3-to-8 decoder IC (74LS138) verify that it does the following
function as shown in the table below:
IN
IN
G2B' G2A'
IN
IN
IN
IN
OUT
OUT
OUT
OUT
OUT
OUT
OUT
OUT
G1
Y0'
Y1'
Y2'
Y3'
Y4'
Y5'
Y6'
Y7'
Connect inputs G2B', G2A', G1, C, B and A to switches sw5, sw4, sw3, sw2, sw1 and sw0
respectively. Connect the outputs Y0', Y1', Y2', Y3', Y4', Y5', Y6' and Y7' to LED0 to LED7
respectively.
IN
IN
G2B' G2A'
IN
IN
IN
IN
OUT
OUT
OUT
OUT
OUT
OUT
OUT
OUT
G1
Y0'
Y1'
Y2'
Y3'
Y4'
Y5'
Y6'
Y7'
b. Application:
4-to-16 decoder. Implement the following truth table using 3-to-8 decoders
(74xx138) and a 4-input NAND gate (74xx20). The inputs d, c, b and a are to be connected
to sw3, sw2, sw1 and sw0 respectively. Output f is to be connected to LED0.
set A (groups 1, 5 & 9)
dcba
0000
0001
0010
0011
0100
0101
0110
0111
f
1
0
0
0
1
0
0
1
Cont. dcba
1000
1001
1010
1011
1100
1101
1110
1111
Cont. f
0
0
0
0
0
0
1
0
f
0
1
0
0
0
0
1
0
Cont. dcba
1000
1001
1010
1011
1100
1101
1110
1111
Cont. f
f
1
0
0
0
0
1
0
0
Cont. dcba
1000
1001
1010
1011
1100
1101
1110
1111
Cont. f
f
0
0
1
0
0
0
1
0
Cont. dcba
1000
1001
1010
1011
1100
1101
1110
1111
Cont. f
0
0
1
0
0
0
0
1
1
0
0
0
1
0
0
0
0
0
0
0
1
0
0
1
5. Multiplexers
A digital multiplexer or mux is a device that performs multiplexing; it selects one of many
digital input signals and outputs that into a single line.
Example of TTL ICs: (a) dual 4-to-1 multiplexer with enable (74LS153) and
(b) 8-to-1 multiplexer with enable line (74LS151).
Truth table for a 4-to-1 multiplexer:
Selector
Selector
Strobe/Enab
le
Output
Inverted Output
G'
C0
C0'
C1
C1'
C2
C2'
C3
C3'
Application:
Tail Lights. You are to configure two multiplexers (74xx151 or equivalent) into a tail light
system. It consists of four input variables and two output variables. The four input variables
are describe as follows: (1) blinker and (3) selectors. The blinker input is connected to the
CLOCK output of the digital kit. Use an appropriate frequency setting (one where blinking
of LEDs can be observed) for the CLOCK output. The blinker is used to make the outputs
turn on and off (LEDs blink). The selector inputs (S2 = sw2, S1 = sw1 and S0 = sw0)
determine the tail light functions as follows:
S2
0
0
S1
0
0
S0
0
1
0
1
1
x
1
x
function description
do nothing
: the output LEDs are at logic low
turn right
: the right output LED is blinking while
the left output LED is at logic low.
turn left
: the left output LED is blinking while
the right output LED is at logic low
emergency
: all output LEDs are blinking
brake
: all output LEDs are at logic high
6. PL D
We will be using a PAL/PALCE/GAL16V8A (PLD with 16 programmable pins, 8 of
which are inputs and the other 8 as input/output). We will be using a PLD compiler. A
sample template accepted by the compiler is as follows:
Any line that starts with a bar ( | ) is considered as a compiler statement and any line
that does not start with a bar ( | ) is considered as a remark or a comment.
B.
C.
Example
Implement using PLD.
xyz
000
001
010
011
100
101
110
111
f
0
1
1
1
0
0
1
0
sol'n #1
| GAL16V8A in: (x,y,z), io: (f)
| f = (y & z' ) # (x' & z)
sol'n #2
| GAL16V8A in: (x,y,z), io: (f)
| table: x, y, z -> f
| { 000b -> 0
| 001b -> 1
| 010b -> 1
| 011b -> 1
| 100b -> 0
| 101b -> 0
| 110b -> 1
| 111b -> 0 }
sol'n #3
| GAL16V8A in: (x,y,z), io: (f)
| table: x, y, z -> f
| { 0 -> 0
| 1 -> 1
| 2 -> 1
| 3 -> 1
| 4 -> 0
| 5 -> 0
| 6 -> 1
| 7 -> 0 }
D.
Use of Compiler/Programmer
The compiler and programmer is located in c:\pld. So, from drive c, do the following
commands.
c:\> cd pld
c:\pld> pld example.pld
The pld.exe compiler, if no errors are encountered, will generate three (3) other files
namely *.lst, *.jed and *.vec files. These files are described as follows:
example.lst
example.jed
-- contains the fuse file in JEDEC format that will be the input file
of the PLD programmer
(a)
As a preliminary exercise, you are to find the pin assignment for the seven-segment
LED display using only a +5V supply and a 1k ohm resistor. Have a nice day!
2.
Tail Lights. You are to program a PLD into a tail light system. It consists of four
input variables and two output variables. The four input variables are describe as follows: (1)
blinker and (3) selectors. The blinker input is connected to the TTL output of the function
generator. Use an appropriate frequency setting (one where blinking of LEDS can be
observed) for the TTL output. The blinker is used to make the outputs turn on and off (LEDS
blink). The selector inputs (S2, S1 and S0) determine the tail light functions as follows:
S2
0
0
S1
0
0
S0
0
1
function description
do nothing
: the output LEDs are at logic low
turn right
: the right output LED is blinking while
the left output LED is at logic
turn left
0
1
1
x
1
x
brake
emergency
low.
3.
7. FLIP-FLOPS and
SEQUENTIAL CIRCUIT
Objective
To fam i l ia r i z e the students wit h the construc t i o n and use of dif ferent types of flip- flops in
digital circ uits.
Flip-Flops
A flip-flop maintai ns a binary state indef i n i t e l y (as long as the circuit is po were d) until it
recei v es an input signal to switc h states. There are vario us types of flip flops that dif fer in the
nu m b er of inputs they possess and ho w the inputs affect the binary state.
W he n logic high is applied to the set(S) input and a logic lo w is fed to the reset(R) input, the
botto m N O R gate outputs a logic lo w due to the logic high of the S input regardless of what
is the value of the other input. The logic lo w output of the botto m N O R gate is then fed to the
upper N O R gate, together wit h the logic lo w of the R input. The result i n g output fro m the
S=1, R=0 input com b i n at i o n is Q= 1, Q=0. The oppos ite happens when R= 1 and S=0, the
result i n g output is Q=0 and Q= 1. W he n Q= 1 and Q=0, it is said to be in the set state and
when Q=0 and Q= 1, it is in the clear state.
N A N D gates can also be used to construc t a basic flip- flop. Its dif f eren ce is that to acti vate
the set mode, a 0 must be fed to the input S whi le input t i n g a 1 to the input R, oppos ite of the
N O R im p le m e n t at i o n.
Exercise
For the N O R im p le m e n t at i o n of the basic flip- flop, do the com b i n at i o n of inputs S and R
belo w, in order and record the output into the truth table. Con nec t inputs S and R to switc hes
sw 1 and sw0 respect i v e l y. Con nec t outputs Q and Q to LE D 1 and LE D 0 respecti v e l y.
Deter m i n e wh ic h com b i n at i o n of inputs should be avoided because of its outputs.
S
1
0
0
0
1
R
0
0
1
0
1
Q
1
1
0
0
0
Q
0
0
1
1
0
RS Flip- Flop
The RS flip-flop is a mod i f i e d basic flip- flop where an addit i o na l input contro ls when the
states of the flip- flop change. The basic flip- flop changes states as soon as the inputs change
wh i l e an RS flip- flop changes states at the next cloc k pulse. The truth table for the changi n g
state of the Q output of the RS flip- flop is sho w n belo w.
Q
S
R
Q(t+1)
0
0
0
0
0
0
1
0
0
1
0
1
0
1
1
Indeter m i n a t e
1
0
0
1
1
0
1
0
1
1
0
1
1
1
1
Indeter m i n a t e
W he re Q is the present state and Q(t+1) is the next state of the output. Note that whene v er S
and R are both high, the next state is indeter m i n a t e because it places zeroes into the inputs of
the basic flip- flop used and makes outputs Q and Q both high, whi c h is avoided because
both must be com p le m e n t s of each other.
Exercise
Constr uc t an RS Flip- flop by addin g two more N A N D gates to the N A N D imp le m e n t a t i o n of
the basic flip- flop circ uit. Con nec t the three input elements, CP(cloc k pulse), S(set) and
R(reset) to the pulser, sw 1 and sw0 of the digital kit respecti v e l y. Con nec t outputs Q and Q
to LE D 1 and LE D 0 respect i v e l y. Ma k e the pulsers speed lo w enoug h to observe the cloc k
pulse. The mo m e n t the cloc k pulse goes high, the logic high of either the S or R input shoul d
be fed into the inputs of the basic flip- flop. Ver i f y that the cloc k contro ls the state change by
observ i n g when the outputs change state.
D Flip-Flop
The D flip-flop addresses the proble m of the RS flip- flop about both inputs being 1 at the
same time. The sole input, D is connected to the S input wh i le its inverted value is fed into
the reset input of the RS flip- flop to ensure that only one input is high and the other, lo w at a
ti me. If D is 1, the next state of the output Q goes to 1 and when D is 0, the next state of the
output Q beco m es 0.
Exercise
Constr uc t the D flip- flop fro m the N A N D imp le m e n t a t i o n of the RS flip- flop. Co m p l e t e the
truth table of the D flip- flop belo w.
Q
D
Q(t+1)
0
0
0
1
0
1
0
1
0
1
1
1
JK Flip-Flop
The JK flip- flop is another mod i f i c a t i o n of the RS flip- flop whi c h has its ow n way of deali ng
wit h the RS flip- flops undesirab le input com b i n at i o n (when S= 1 and R= 1). The JK flip- flop
has 2 inputs J and K, each A N D e d wit h the cloc k pulse and its correspo n d i n g N O R output.
The sche m at i c for the JK flip- flop is sho w n belo w.
Exercise
Constr uc t the JK flip- flop circ uit. Observ e what happen when the inputs are J=1 and K = 1 .
Co m p l e t e the truth table for the next state output belo w.
Q
J
K
Q(t+1)
0
0
0
0
0
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
0
1
0
1
1
1
1
0
0
1
1
1
T Flip-Flop
The T flip- flop is a mod i f i c a t i o n of the JK flip- flop but it has only one input instead of two
inputs that the JK flip- flop has. The next state is depende nt on the value of the input T. W h e n
T=0, the next state output is retained but when T= 1, the next state output is the oppos ite of
the present state.
Q
T
Q(t+1)
0
0
0
0
1
1
1
0
1
1
1
0
Exercise
Dra w and construc t the sche m at i c for the T flip- flop based on the infor m a t i o n you have
gathered fro m the JK flip- flop and the descript i o n of the T flip- flop. Ver i f y your circu it using
the T flip- flops truth table.
SEQU E N T I A L CI R C U I T E X E R C I S E S
Set 1/5/9
A.
Design a counter using D flip-flops. The circuit counts 0-1-3-7-15-7-3-1-0-1-3-etc.
a.
give the state diagram & the transition table
b.
the expressions for the D inputs
c.
the expression for the output if any
d.
the logic diagram
e.
do the actual circuit implementation
-------------------------------------------------------------------------------------------------------------Set 2/6/10
C.
Design a counter using D flip-flops. The circuit counts 0-8-12-14-15-14-12-8-0-8-12etc.
a.
give the state diagram & the transition table
b.
the expressions for the D inputs
c.
the expression for the output if any
d.
the logic diagram
e.
do the actual circuit implementation
-------------------------------------------------------------------------------------------------------------Set 3/7/11
E. Design a counter using D flip-flops. The circuit counts 0-1-3-7-15-0-1-3-7-15-0-1-etc.
a.
give the state diagram & the transition table
b.
the expressions for the D inputs
c.
the expression for the output if any
d.
the logic diagram
e.
do the actual circuit implementation
-------------------------------------------------------------------------------------------------------------Set 4/8/12
F. Design a counter using D flip-flops. The circuit counts 0-8-12-14-15-0-8-12-14-15-0-8etc.
a.
give the state diagram & the transition table
b.
the expressions for the D inputs
c.
the expression for the output if any
d.
the logic diagram
e.
do the actual circuit implementation
FYI, The D-flip-flop IC is 74LS74, shown below.
PRE'
CLR'
CLK
Q'
POS
POS
Q0
Q'0
LEGEND:
0 = logic low
1 = logic high
X = don't care
POS = positive edge of clock, low to high transition.
Q0, Q'0, means previous values of Q i.e. retain old value (HOLD)
8. COUNTERS
Construct a digital circuit that counts from 00 to 99 using two BCD counters (2 x 74LS190)
and necessary gates. Use the 7-segment display of the digital design kit to show the counter
output. Use the digital kit variable clock for the clock input of the counter. Use an
appropriate frequency. You can connect CTEN' input to sw0 to make it an up or down
counter.
CTEN'
D/U'
CLK
LOAD'
A B C D
QA
QB
QC
QD
RCO' MAX/
MIN
a b c d
**
POS
X X X X
Count
down
Count
down
Count
down
Count
down
**
POS
X X X X
Count
up
Count
up
Count
up
Count
up
**
X X X X
QA0
QB0
QC0
QD0
**
LEGEND:
0 = logic low
1 = logic high
X = don't care
POS = positive edge of clock, low to high transition.
QA0, QB0, QC0, QD0 means previous values of Q i.e. retain old value
Count down means if previous count is 7, new count is 6
Count up means if previous count is 7, new count is 8
* = during the UP count MAX/MIN goes HIGH at count 9, during the DOWN count
MAX/MIN goes HIGH at count 0.
** = during the UP count RCO goes LOW at count 9, during the DOWN count RCO
goes LOW at count 0.
9. SHIFT REGISTER
Construct a digital circuit that counts 0,1,3,7,15,31,63,127,255 then back to zero using two
universal shift registers (2 x 74LS194) and necessary gates. Use the 8 LEDs to display
output. Use the digital kit variable clock for the clock input. Use an appropriate frequency.
MODE
INPUTS
CLR'
S1 S0
CLK
X X
OUT- PUTS
SL SR
A B C D
QA
QB
QC
QD
X X X X
X X
X X X X
QA0
QB0
QC0
QD0
1 1
POS
a b c d
0 1
POS
X X X X
Qan
Qbn
QCn
0 1
POS
X X X X
Qan
Qbn
QCn
1 0
POS
X X X X
Qbn
Qcn
Qdn
1 0
POS
X X X X
QBn
QCn
Qdn
0 0
X X X X
QA0
QB0
QC0
QD0
LEGEND:
0 = logic low
1 = logic high
X = don't care
POS = positive edge of clock, low to high transition.
QA0, QB0, QC0, QD0 means previous values of Q i.e. retain old value
L
0
0
R
0
1
function
do nothing
turn right
turn left
0
1
1
1
0
0
1
0
1
emergency
brake
brake + right
turn
parked light
description
the output LEDs are at logic low
the 4 rightmost output LEDs should
cycle as shown in figure 1 while the
4 leftmost output LEDs are at logic
low.
the 4 leftmost output LEDs should
cycle as shown below while the 4
rightmost output LEDs are at logic
low.
all output LEDs are blinking
all output LEDs are at logic high
the 4 rightmost output LEDs should
cycle as shown below while the 4
leftmost output LEDs are at logic
high.
the 4 leftmost output LEDs should
cycle as shown below while the 4
rightmost output LEDs are at logic
high.
all output LEDs are on
LED Pattern:
Left turn: 0000 -> 0001 -> 0011 -> 0111 -> 1111 -> 0000 and so on
Right turn: 0000 -> 1000 -> 1100 -> 1110 -> 1111 -> 0000 and so on
0 = LED off
1 = LED on