Sol DLD Final Spring 23
Sol DLD Final Spring 23
Serial No:
EE 1005 Final Exam (Solution)
Digital Logic Design Total Time: 03 Hours
Tuesday, May 23, 2023 Total Marks: 150
Course Instructor
________________
Engr. Aamer Hafeez Signature of Invigilator
_____________________________________________ _____________________
Student Name Roll No Section Signature
Determine
A.
below. Determine
the output
thefunction,
output function,
Z, and derive
Z as the
a minimized
truth tablefunction
of the given
of input
logic variables,
diagram and
derive the truth table of the given below logic diagram. [Marks=5+5=10]
B. Compare the NOR-based Latch with NAND based Latch on the following basis:
Structure
Working
Two Types
The SR latch is a circuit with two cross-coupled NOR gates or two cross-coupled NAND gates,
and two inputs (labelled S for set and R for reset).
NOR SR Latch
SR latch can be created with two NOR gates that have a cross-feedback loop.
NAND SR Latch
SR latches can also be made from NAND gates, but the inputs are swapped and negated. In
this case, it is sometimes called an SR’ latch.
In general (one exception, see below), the outputs are complements of each other (this is
why they are labeled Q and Q’
The SR latch with two cross-coupled NAND gates is shown in Fig. 5.4.
It operates with both inputs normally at 1, unless the state of the latch has to be changed.
C. How is master slave D Flip Flop constructed? Discuss its working with a suitable
timing diagram. [Marks=10]
• Master slave D flip flop can be designed by the series connection of two gated D
latches and connecting an inverted enable input either to of the two latches.
• Only the change in Master latch will bring change in Slave latch. So these are called
Master Slave flip flops.
• The total circuit of master slave flip flop is triggered either on the rising edge of the
clock signal or on falling edge of clock signal depending on the design
• The symbolic representation of a master slave D flip flop that responds to the clock at
its falling edge as shown below
• The Master slave D flip flop shown below is a positive edge triggered device that
means it will operate when clock input has raising edge.
• The first flip flop (master flip – flop) is connected with a negative clock signal i.e
inverted and the second flip – flop (slave flip – flop) is connected with double inverse
of clock signal i.e. normal clock signal
• A D flip flop takes only a single input, the D (data) input. The master-slave
configuration has the advantage of being edge-triggered, making it easier to use in
larger circuits, since the inputs to a flip-flop often depend on the state of its output.
The circuit consists of two D flip-flops connected together.
• Consider two latches combined together. Only one C value active at a time
CLO-02: Analyze combination logic circuits to draw truth table and sequential logic circuits
to determine the state equations, state table, and state diagram.
_________________________________________________________________________
Question 2 [Marks=35]
A. Consider the following synchronous sequential circuit and derive the following :
[Marks=5+5+5+5=20]
Output equations
State table
Output equations
• The characteristic equation for D flip-flops makes analysis a little easier than other
flip-flops
• Consider this circuit with JK flip-flops ¾Here we assume that A and B are the circuit
outputs
Flip-flop input equations
J K Q+
0 0 Q
0 1 0
1 0 1
1 1 Q’
Current A FF B FF Next
InputX State inputs inputs State
A B JA KA JB KB A+ B+
0 0 0 0 0 1 0 0 1
1 0 0 0 0 0 1 0 0
0 0 1 1 1 1 0 1 1
1 0 1 1 0 0 1 1 0
0 1 0 0 0 1 1 1 1
1 1 0 0 0 0 0 1 0
0 1 1 1 1 1 1 0 0
1 1 1 1 0 0 0 1 1
State Diagram
• Now obtain state diagram from state table Based on inputs, current state, and next
state
• Now we can analyze circuit behavior Based on initial state and input sequence
State order 00
0 X=0
AB
0
01 11 1
1 0
10
1
B. How can you show that T Flip Flop acts as a digital toggle switch? You are required
to explain in the light of the function table, characteristic table and excitation
equations. [Marks=5+5+5=15]
• A T flip flop is known as a toggle flip flop because of its toggling operation.
• It is a modified form of the JK flip flop.
• A T flip flop is constructed by connecting J and K inputs, creating a single input called T.
Hence why a T flip flop is also known as a single input JK flip flop.
• The defining characteristic of T flip flop is that it can change its output state. You can
change the output signal from one state (on or off) to another state (off or on).
• The simplest of the constructions of a T flip – flop is with JK flip – flop. The J input and K
input of the JK flip – flop are connected together and provided with the T input. The logic
circuit of a T flip – flop constructed from a JK flip – flop is shown below
• Characteristic Table
• Excitation Table
• From the Characteristic table, we can observe that, when T input is 0, there is no change in
the state. So for the state transition from the present state to the next state, i.e., from Qn = 0
to Qn+1 = 0 and from Qn = 1 to Qn+1 = 1, the excitation input require is T = 0. It is filled in the first
and the fourth row in the excitation table.
Similarly, from the Characteristic Table, we can also observe, when T = 1, the state of
the flip flop toggles or complemented. Thus, for the transition of the state from either
0 to 1 or from 1 to 0, the excitation input is T = 1. It is filled in the second and the
third row of the excitation table
A. Design a circuit that has a 3-bit binary input and a single output (Z) specified as
follows:
Z = 1, otherwise [Marks=5]
F1( A, B, C) = ∑ ( 2, 4, 7)
F2( A, B, C) = ∑ ( 0, 3)
F3( A, B, C) = ∑ ( 0, 2, 3, 4, 7)
Implement the circuit with a decoder construction with NAND gates and NAND or
AND gates connected to the decoder outputs. Use a block diagram for the decoder.
Minimize the number of inputs in the external gates. [Marks=5]
D. Implement the following Boolean function with a 4x1 multiplexer and external
gates.
E. How can you justify the statement that “Priority encoders are often used to control
interrupt requests by acting on the highest priority interrupt input”? A logic
According to Table, the higher the subscript number, the higher the priority of the
input.
Input D3 has the highest priority, so, regardless of the values of the other inputs,
when this input is 1, the output for xy is 11 (binary 3).
D2 has the next priority level. The output is 10 if D2 = 1, provided that D3 = 0,
regardless of the values of the other two lower priority inputs.
The output for D1 is generated only if higher priority inputs are 0, and so on down the
priority levels.
The simplified Boolean expressions for the priority encoder are obtained from the
maps.
The condition for output V is an OR function of all the input variables.
The priority encoder is implemented in Fig. according to the following Boolean
functions:
F. Can we use a quadruple 2:1 Multiplexer as a 4-bit register? Explanation with a logic
diagram is mandatory. [Marks=5]
A multiplexer doesn’t have any ability to store state. Data flows through it, but there’s no
feedback loop in the circuit. One needs a feedback loop to store state using only gates.
Synchronous binary counters have a regular pattern and can be constructed with
complementing flip-flops and gates
The regular pattern can be seen from the four-bit counter depicted in Fig. 6.12 .
If the enable input is 0, all J and K inputs are equal to 0 and the clock does not change the
state of the counter.
The first stage, A0, has its J and K equal to 1 if the counter is enabled. The other J and K
inputs are equal to 1 if all previous least significant stages are equal to 1 and the count is
enabled.
The chain of AND gates generates the required logic for the J and K inputs in each stage.
The counter can be extended to any number of stages, with each stage having an
additional flip-flop and an AND gate that gives an output of 1 if all previous flip-flop
outputs are 1.
B. Design a BCD counter (using T Flip Flops), which is one of the types of most widely
used digital counters and counts up to 10 with an applied clock signal.
[Marks=10]
It is a 4-bit binary digital counter, counts from 1 (0001) to 10 (1010). In practice, the BCD
counter counts from 0000 (0) to 1001 (9) in decimal form on the application of the clock
signal.
Because of the return to 0 after a count of 9, a BCD counter does not have a regular
pattern, unlike a straight binary count.
The circuit can easily be drawn with four T flip-flops, five AND gates, and one OR gate.
Synchronous BCD counters can be cascaded to form a counter for decimal numbers of any length.
Scenario:
o Source Register (A) holds 1 (4-bit) value
o Which needs to be ‘copied’ in Destination Register (B)
o ‘Copied’ means Transfer into ‘B’ and Retain in ‘A’
For Transfer (A → B):
o Connect O/p of ‘A’ into I/p of ‘B’
o Synchronize both Registers with same Clock
o Clock can be ‘anded’ with Shift Control I/p
For Retain (A → A):
o Recirculate the O/p of ‘A’ as I/p of same register
The serial transfer of information from register A to register B is done with shift registers, as
shown in the block diagram of Fig.
The serial output ( SO ) of register A is connected to the serial input ( SI ) of register B.
To prevent the loss of information stored in the source register, the information in register A
is made to circulate by connecting the serial output to its serial input.
The initial content of register B is shifted out through its serial output and is lost unless it is
transferred to a third shift register.
The shift control input determines when and how many times the registers are shifted.
For illustration here, this is done with an AND gate that allows clock pulses to pass into the
CLK terminals only when the shift control is active.
(This practice can be problematic because it may compromise the clock path of the circuit, as
discussed earlier.)
Data transfer one bit at a time
Data loopback for register A
D. Explain the working of the given below “Bit Serial adder”. [Marks=5]
• Scenario:
• Register A holds ‘Augend’
• Register B holds ‘Addend’
• Contents of A and B needs to be added serially
• Design:
• Have a Full Adder (FA) (x + y + Cin)
• Connect O/ps of A and B into FA
• What to do with Sum (S) and Carry (C) O/ps?
E. A state table of a circuit is given and you are required to reduce the number of
states to the extent possible. [Marks=5]
CLO-04: Develop larger-size RAM from smaller memory elements and program PLD
devices.
___________________________________________________________________________
Question 5 [Marks=25]
A. Suppose you have multiple 1Mx4 memory chips. How will you design the following
memory Units using these chips? [Marks=10]
1Mx8
2Mx4
gn a show
esign
binary
and combinational
anumber
combinational
the internal
equal
circuit
tocircuit
configuration
theusing
cube
using
aof
ROM
athe
of
ROM
the
which
input
which
output
binary
accepts
accepts
gates.
number.
a 3-bit
What
a 3-bit
Use
number
is number
the
block
size
and
diagram
and
ofgenerate
the
generates
generate
ROM?
ROM
for adecoder
aa
B. How can you implement a full adder using PROM? All steps are mandatory.
[Marks=10]
Logic Diagram: There are three input variables = A, B, C, therefore we will be using a
3:8 decoder.