Digital Logic Questions
Digital Logic Questions
h PD Verification Binary
Number
Digital Eletcronics (Q&A) Digital Electronics Q&A
h PD Analysis 5
Systems
Basic Gates Physical Design MCQs
and Boolean Binary Number Systems
h PD Essentials 5
STA Numericals
Algebra
K-Maps PD Verification
h Discontinuity 5
Q1) Define: (a) bit (b) nibble (c) byte (d) word
Combinational
logic
Answer:
Videos flip-flops
Finite State
a. Bit: Binary digit (Either logic-1 or logic-0)
b. Nibble: 4-bits together is called a nibble
Logic Synthesis
Machines –
c. Byte: 8 bits or 2 nibbles
STA Numericals Synchronous
Sequential
d. Word: 16 bits or 2 bytes PD Inputs
design
Q&A 5 Setup time
and Hold time
FloorPlan
PowerPlan
h Extras Counters and
Shift Registers
Q2) What is weighted code? Give example.
Fault Analysis Answer: Placement
and Hazards The weighted code will have a fixed weight for each
Digital position. For example, in normal binary system, the CTS
Integrated decimal equivalent can be obtained by multiplying
Circuits the position value with position weight and adding
Routing
Memories, them together.
FIFO and
Programmable STA
devices
Answer: Analysis
Unlike weighted code, non-weighted codes will not
any weights. For example, Excess-3 code and Gray
Power Analysis
code. So the numbers that are represented using
non-weighted code can not be directly converted to
decimal equivalents. IR Analysis
Issues in PD
Q4) What is the key feature of Excess-3 code?
Cells in PD
Answer:
Self-complementing: The 9’s complement of an IO Design
excess 3 number can be obtained simply by
replacing its 1’s with 0’s and 0’s with 1’s. Delay Models
ECO
Q5) In how many different ways can number 5 be Types of Std
represented using 2-4-2-1 code?
cells
Answer:
2-4-2-1 represents the weights corresponding to bit
positions. DFM/DFY
So the two possible ways are: 1011, 0101
MC/MM/OCV
Answer:
0, 1, 8 and 9 (Only these 4 numbers will have
unique representations).
Answer:
As BCD numbers range from 0 to 9, there are 5
unused combinations in 7-4-2-1 code.
They are: 1011, 1100, 1101, 1110 and 1111.
self-complementary?
Answer:
A weighted code is self-complimentary if the sum of
the weights equals to 9.
E.g.: 2-4-2-1 code. Sum of the weights = 2+4+2+1 =
9
Answer:
(a) Binary: 011 101 010 001
Octal: 3 5 2 1
(b) Binary: 0111 0101 0001
Hex: 7 5 1
Answer:
Consider (Xn-1 Xn-2 ……..X3 X2 X1 X0) a n bit base 3
number.
The corresponding decimal equivalent is given by,
3n-1 Xn-1 + 3n-2 Xn-2 ….. + 33 X3 + 32X2 + 31X1 +
3 0X 0
= 9(n-2)/2 (3 Xn-1 + Xn-2) + .............+ 91(3 X3 + X2) +
90(3X1 + X0)
So take every to digits of base-3 number from LSB
side, find their decimal equivalent, it will be the
corresponding base-9 digit. (Similar to the
procedure of converting a binary number to octal or
hex)
Answer:
Base-3:(2 11 10 12 22 21 11 22)3
Base-9: 2 4 3 5 8 7 4 8
Q12) A number N has ‘n’ digits in a r-radix number
complement?
Answer:
(rn – 1)-N , (rn – N)
number 752?
Answer:
999 – 752 = 247
binary code?
Answer:
Conversion from gray to binary: Retain the MSB as
it as. XOR the current input bit with the previous
output bit to get the new output bit. In this case,
given gray code number is 11001
Answer:
Binary to Gray code conversion: Retain MSB. XOR
Current bit of Binary input with the previous bit of
Binary input to get new bit of Gray code Output.
Answer:
(a) 101101
(b) To get BCD: Represent each digit separately in
binary 0100 0101
(c) Excess-3: Add 3 to each digit and then represent
them separately in binary 0111 1000
(d) Gray code: First convert to Binary and use the
procedure shown in Q15: 111011
method?
Answer:
–(2 n – 1) to +(2 n – 1 – 1)
Answer:
(2 n – 1 – 1) > 23 => 2 n – 1 > 24 => 2 n – 1 = 32 => n-
1 = 5 => n = 6 bits
number?
Answer:
2’s compliment of the binary number
E.g.: Consider 10010, Its 2’s compliment is given by
01110
Answer:
78B in hex = 01111.0111000 (5 integral bits and 7
fractional bits)
= 15.4375
Answer:
0.95 x 2 = 1.90 ---- 1
0.90 x 2 = 1.80 ---- 1
0.80 x 2 = 1.60 ---- 1
0.60 x 2 = 1.20 ---- 1
0.20 x 2 = 0.40 ---- 0
0.40 x 2 = 0.80 ---- 0
0.80 x 2 = 1.60 ---- 1 ……….
So, 0.95 = 0. 11 1100 1100 1100 1100....
Answer:
AB16 – 3E16 = (171) – (62)
= (109) = 6D16
Answer:
) 2x2+ x + 1 = 56 + 50 = 106 => x (2x+1) = 105 = 7 x
15 => x = 7
Answer:
(78)9 = 63 + 8 = (71)10
(135)12 = 144 + 36 + 5 = (181)10
(71)10 - (181)10 = (110)10 = (156)8
So, X = 156
addition?
Answer:
BCD addition is similar to any binary addition. But if
the result is above 9, to get valid BCD result, we
need to add 6 to the result.
Answer:
1001
0110
----------------
1 1 1 1 (>9)
6,0 1 1 0
----------------
10101
So, the result is 0001 0101 = (1 5)
Answer:
NAND and NOR gates are called universal gates.
Because any other logical gate like AND, OR, NOT,
XOR, XNOR etc. or any other Boolean function can
be implemented only with NAND or NOR gates.
for n-inputs?
Answer:
For n inputs, possible minterms/maxterms = 2n. For
example, for 2 inputs the possible 4 minterms are
A’B’, A’B, AB’, AB and maxterms are A+B, A’+B,
A+B’, A’+B’.
Answer:
(a) 6 = (0110)2 Minterm = A’BCD’, maxterm =
A+B’+C’+D (b) 15 = (1111))2 Minterm = ABCD,
maxterm = A’+B’+C’+D’
possibilities?
Answer:
A NAND gate can be converted into an inverter by
using any of the following two methods:
Answer:
N-1. For example to implement a 4 input AND gate
we need three 2-input AND gates.
Answer:
(A+B+C+D…)’ = A’.B’.C’.D’…….
(ABCD……..)’ = A’ + B’ + C’ + D’……
Answer:
(a) OR Gate.
We can conclude this from truth table. Also from
Boolean algebra as shown here :
As A=B=1, can not occur, AB = 0 always.
A XOR B = AB’ + A’B = A (AB)’ + B (AB)’ = A (0)’ +
B(0)’ = A + B
Answer:
According to Shannon’s expansion theorem any
Boolean function F(A,B,C,D….) can be represented
as F = A FA + A’ FA’ , where the cofactors FA and FA’
are given as, FA = F(1,B,C,D….) and FA’ =
F(0,B,C,D….)
Answer:
FA = BD + BCD’ and FA’ = BCD’ + B’C’
Answer:
FA = BD + BCD’ and FA’ = BCD’ + B’C’
Answer:
2^2^n For n inputs, the possible number of
minterms are, k = 2^n.
Any boolean function is combination of minterms.
So all possible Boolean functions are
kC + kC + kC + kC + ……. kC = (1 + 1)^k = 2^k
0 1 2 3 k
= 2^2^n
Answer:
First XOR gate output = X XOR X’ = 1
Second XOR output = 1 XOR X = X’
Third XOR gate output = OUT = X’ XOR X = 1
OUT = 1 irrespective of X
Answer:
A XOR B = A’B + AB’ = A(AB)’ + B(AB)’
same time.
same time.
required?
Answer:
6
A = Switch B=Sensor1 C=Sensor2 D=Sensor3
Pressed or sensor activated = 1
F=Shutdown=1
If you use K-Map and simplify, you will get F = A +
BC + CD. The implementation of the same is shown
below.
input has more 1s than 0s. Show the truth table and
Answer:
Truth table for 3-input majority function is shown
below:
Answer:
Very much similar to Answer 13.
Answer:
Parity generation adds an extra bit to the data which
indicates the parity of input data. Parity generation
is of two types: Even-parity and odd-parity
generation. Even parity generator gives 1 if the
input has odd number of 1’s so that overall number
of 1’s will be even. Similarly odd parity generator
gives 1 if the input has even number of 1’s.
generators?
Answer:
XOR gate can be used as even parity generator and
XNOR can be used as odd parity generator.
parity generation?
Answer:
The following circuit shows a parity checker for 4
inputs. A, B and C is the actual data. Whereas P is
even parity bit generated at the transmitter. P = A
xor B xor C. So A, B, C and P together will have
even parity always. If all the bit sequences are
received properly, O should be zero always. O=1
indicates that some error has occurred during
transmission.
Answer:
The detailed procedure with an example for
converting gray code to binary is shown in chapter
1. The same concept is shown with the XOR gates
here.
Answer:
The input clock, the OUT that is needed and the
corresponding CLK_EN are shown in the following
diagram:
Q24) Which logical gate can be used to find out
Answer:
XNOR gate.
If we observe the truth tables, XNOR gate gives 1 if
both the inputs are same.
Similarly XOR gives 1 if both the signals are
different.
Answer:
Answer:
Dual : Replacing AND (NAND) with OR(NOR) and
OR (NOR) with AND(NAND) in a given boolean
equation gives the dual.
Answer:
a) iv
b) iii
c) ii
d) i
K-Maps
Q1) Define: SOP from and POS form?
Answer:
SOP: Sum Of Products : OR of all ANDs Eg: F
(A,B,C) = A + BC
POS: Product Of sums: AND of all ORs Eg:
F(A,B,C) = (A’+B’) (A’+C’)
Q2) When is a SOP/POS form is called standard or
canonical?
Answer:
A SOP is called standard if each term is a minterm.
Similarly a POS is called standard if each term is a
maxterm.
Is it canonical?
Answer:
circuits using
Answer:
(a) SOP form
(b) POS form
drawing K-Maps?
Answer:
Hamming order (Gray code)
Drawing K-maps?
Answer:
In K-Map, the Boolean simplification is done by
grouping the adjacent cells that have 1. To get the
simplified expression, the adjacent cells must have
1 bit change. So gray code is used.
K-Map?
Answer:
2n. E.g.: 3 variables, 8 cells. Similarly..4 variables 16
cells.
Q8) How many dimensions (without projections) are
Answer:
Ceiling (log2 n)
Answer:
The don’t care condition set accommodates input
patterns that never occur or outputs that will not be
observed.
Answer:
Y = A'C + AC'B' and the output will be don’t care for
A = C = 1. So the K-map will be as follows:
Q11) Y = ∑ ( 0,2,3,4,9,10,12,13)
Answer:
Answer:
Y = П (2,3,6,8,10,11,13,14,15)
Q13) If F(A,B,C,D,E) = B’E, how many terms will be
representation of F?
Answer:
8 terms, F = B’E (A + A’) (C+C’) (D+D’)
Answer:
6 – log24 = 6-2 = 4
Answer:
In 3 variable map, grouping all 8 cells will give zero
literals in the term as it is logical 1 always. Similarly,
in 4 variable map the same grouping will give 1
literals, in 5 a variable map it is 2 and so on..
So the literals in the term = N – log2k
Answer:
Q-M Method
Answer:
Checkout for the columns which has only one entry
(X), that term must be included in the simplified
expression. So, that term will be essential.
(a) So the essential prime implicants are: BC and
B’C’
(b) The simplified expression F = BC + B’C’ + CD’ =
BC + B’C’ + B’D’
Answer:
Checkout for the columns which has only one entry
(X), that term must be included in the simplified
expression. So, that term will be essential.
(a) So the essential prime implicants are: BC and
B’C’
(b) The simplified expression F = BC + B’C’ + CD’ =
BC + B’C’ + B’D’
Q17.
Answer:
Answer:
To simplify the Boolean function in POS form we
need to map for 0s and them take the compliment of
that function to get Y in POS form.
otherwise. ?
Answer:
As the input is a BCD number, the output will be
don’t care for the input combinations,
10,11,12,13,14 and 15. So the K-Map will be as
shown below:
Combinational logic
implementation?
Answer:
(a) For a 2:1 mux, whose inputs are I0,I1 and select
line S, the out put is given by the following boolean
expression:
Out = S’ I0 + S I1
The AND-OR Implementation (AOI) is shown below:
Answer:
2:1 Mux.
Answer:
Y = A’B’C + A’BC’ + AB’C’ + ABC = A XOR B XOR C
of A, B and C?
Answer:
Y = A’B’C + A’BC’ + AB’C’ + ABC = A XOR B XOR C
Answer:
xy + xz in terms of x?
this task?
Answer:
We need a 8:1 Mux at the input side and 1:8 Demux
at the receiver side. We may need an 8 bit counter
which runs at the same clock speed on both the
sides to select one of the user.
A+B, (A+B)'.
Answer:
A 2:4 decoder will have 4 O/Ps which are the
minterms of the 2 inputs : AB, AB’, A’B, A’B’. Out of
the four outputs that are needed, AB and (A+B)’ =
A’B’ are directly available. Whereas A+B can be
obtained using the extra 2 input OR gate (which is
given).
So only O/P that is needed is (AB)’.
(AB)’ = A’ + B’ = A’(B+B’) + B’(A+A’) = A’B + AB’ +
A’B’.
So use 3-input OR gate to obtain (AB)’. The whole
design is shown below.
Q9) Give the truth table for (a) half-adder and (b)
half-subtractor?
Answer:
gates?
Answer:
From the above truth table (A9(b)), we can derive
the following equations for barrow and difference:
Borrow = Bout = A’B
Difference = Diff = A XOR B
Answer:
The HA equations are, Cout = AB and Sum = A
XOR B = AB’ + A’B
Sum XOR Cout = Sum’ Cout + Cout’ Sum
= (AB+A’B’) AB + (A’+B’) (A’B+AB’)
= AB + A’B + AB’ = A + B
So to get OR gate we need two HA. The Sum and
Cout of fist HA are given as inputs to second HA.
The Sum of second HA gives the A OR B.
Answer:
Sum = A XOR B XOR C and Carry = AB + BC + AC
Full adder from 2 HA and one OR gate:
Answer:
Sum = A XOR B XOR C and Carry = AB + BC + AC
Q14) A full adder can be implemented using basic
hardware?
Answer:
The suitable equations are:
Sum = (A XOR B) XOR C
Cout = AB + (A XOR B) C
The implementation is as follows:
numbers using
Answer:
Two possible implementations of an adder are (a)
Ripple carry adder and (b) Carry Look Ahead adder.
(a) The ripple carry adder for adding two 4 bit
numbers, A and B is shown below:
Answer:
In ripple carry adder, the carry propagates from first
adder to last. As it has to pass through all the
adders, the delay in getting the final output is
considerably high. Where as it is hard-ware
efficient. The scheme for CLA is explained in the
previous question. The major advantage of CLA is
faster output. But it needs more hardware.
case of
Answer:
To perform the delay calculations, use the circuits
that are shown in above answers.
(a) For full adder the best implementation is shown
in A14.
XOR gate delay = 10ns and AND/OR gate delay =
5ns
The delay for each adder = 10 + 10 + 5 = 25ns.
For adding 4-bits, we need 4 such adders, so
overall delay = 100ns
majority function?
Answer:
The carry out of a full adder is equivalent to Majority
function.
Majority function, Y = Cout = AB + BC + AC
Q19) Give the truth table of full subtractor? Design
Answer:
The truth table for full subtractor is shown below:
F0 + F1, FF + FF, FF + F1
Answer:
F0 + F1 generates 4 carries, FF+FF and FF+F1
generates 8 carries. Whichever generates less
number of carries, that one will give the fastest
output. So F0+F1 gives fastest output.
occur?
Answer:
Case1: Unsigned Numbers:
In N-bits, we can represent numbers from 0 to (2^N)
- 1. Suppose if we are adding 2 N bit unsigned
numbers and if the result is greater than (2^N) - 1 ,
overflow will occur. To detect this, check whether
the MSB addition (Nth bit) + Carry generated from
(N-1) bit addition is generating any carry or not. If
there is carry out, there is overflow.
Answer:
Y = 3A = 2A + A. The 4-bit binary adder which is
shown in A15 (a) can be used as a block box here.
As 2A can be obtained by simple right shift
operation, one binary adder is sufficient for the
complete design.
Answer:
Note that A-B = A + (-B). That is, to subtract B from
A, just find the 2’s of B and add that to A. If A > B,
the comparator gives 1 at A>B and zero at rest of
the outputs. That 1 is used as one of the inputs to
the XOR gate, to find the 2’s compliment of B.
Similarly, in case of A < B or A = B, we need to find
2’s compliment of A. The complete design is shown
below:
Answer:
This is very much similar to the above design. The
extra feature is the indication of overflow, which we
can get from XOR of the carries C2 and C3.
Overflow = 1 indicates that overflow has occurred.
(Refer to A21) And the other logic for finding the 2’s
compliment is exactly same as A24.
a 4-bit number?
Answer:
Absolute value of a number is defined as
|A| = A if A>0,
= -A otherwise
We can use the above designed adder/subtractor
unit to accomplish this task. The MSB of A, which
will be 1 if A is negative, can be used as C.
Answer:
Answer:
The BCD addition is explained in Chapter1. If the
result is above 9, it is needed to add 6 to obtain the
result in BCD number system. So we need two 4-bit
binary adders: One is just to add the two BCD
numbers. The second one is for adding 6 or 0 to the
result. Extra combination logic is needed to identify
the overflow. The condition for detecting the
overflow can be derived as,
K = Cout + S3 S2 + S3 S1
Q28) How will you count the number of 1's that are
Answer:
The binary number that is formed from the Carry out
as MSB and Sum as LSB, gives the number of 1s of
input. The same thing is illustrated in the following
table. The sixth column shows Cout-Sum together
where as the last column shows the actually
number of 1s in the input. Note that both are exactly
same.
Q29)
above?
Answer:
(a) The circuit works as frequency doubler. That is, it
gives double the frequency at the output. But the
duty cycle depends upon the delay of the gates.
Q30) Give the truth table for 4:2 priority encoder in
Answer:
Encoder functionality is opposite of a decoder. The
output of an encoder corresponds to the binary
code of the input. There is a chance that, in the
input stream, more than one 1 may present. In that
case, to avoid clash, we need to provide the priority
to any one of the bits. Here the truth table for priority
encoder which gives, highest priority to its LSB, is
shown:
Answer:
The simple design using XOR gate is shown below.
(Similar to A29)
Answer:
For finding out whether two signals are equal or not,
the best logical gate is XOR. The design is shown
below. OUT =1 implies that the two binary numbers
are not equal.
functions:
Introduction to flip-flops
Answer:
The major applications of flip-flops are:
Data storage
Data transfer
Counting and
Frequency division
Flip flop?
Answer:
The differences between a LATCH and a FLIP-
FLOP are:
Latch is a level sensitive device where as flip-
flop is edge sensitive
Latch is sensitive to glitches on enable pin and
flip-flop is immune to glitches
Latches take less gates(also less power) than
flip-flops
Latches are faster than flip-flops.
Answer:
D-Latch is called transparent Latch. As it transfers
the data as it is to the output on enable.
Answer:
S-R Latch with clock using 2-input NAND gates is
shown below:
Answer:
(a) S=R=0
(b) S=R=1
Answer:
Transparent latch from S-R Latch:
Answer:
D-Latch using 2:1 Mux:
Latch?
Answer:
2 D-latches and an inverter are needed to get the
master-slave configuration. The major advantage of
master-slave configuration is avoiding the race-
around condition as the input changes only at the
edges.
Q9) What is race-around condition? Explain it in
Answer:
The race around condition means: the output
oscillating between 0s & 1s. This problem will occur
in Latches especially if the clock is high for long
time. In case of J-K Latch, J=K=1 gives Q(t+1) =
Q(t)' . Consider the case when clock is high for long
time and J=K=1. Then the output oscillates between
0 & 1 continuously as long as the clock is high. To
avoid this, use Master-Slave configuration which
latches the input only at clock edges. So in that
case, irrespective of the duration of clock high,
output will be just compliment of previous output.
There won’t be any oscillation as such.
for start.
Answer:
The sensor will give 1 for Black and 0 for white. First
we will draw the outputs of the sensors assuming
some position of the wheel. Assume that the initial
position of the wheel is as shown in the figure with
respect to the sensors. The output waveforms of S1
and S2 will be as follows. Both clock wise and
counter clock wise wave forms are shown here. It is
clear from the waveforms that there is an initial
delay of 22 ½ degrees between the two waveforms
(assuming the two sensors are at the same distance
from the partition).
Answer:
The characteristic table for J-K flip flop is:
and an-inverter?
Answer:
The complete design is shown here. The catch here
is to use Q as select line. You can observe the
cofactors of Q(t+1) with respect to J,K and Q(t).
Using J or K as the select line with 2:1 mux will not
do.
Answer:
T-flip flop using DFF:
Q14) Show how to convert J-K flip flop into (a) T-flip
Answer:
T-flip flop using DFF:
Q15) What is excitation table?
Answer:
During the design process we usually know the
transition from present state to the next state and
wish to find the flip-flop input conditions that will
cause the required transition. For this reason we will
need a table that lists the required inputs for a given
change of state. Such a list is called the excitation
table.
Answer:
The excitation table for T flip flop is shown below.
Synchronous Reset?
Answer:
Synchronous reset will clear output only at clock
edge unlike asynchronous reset. At clock edge, if
syn_rst = 0, output will be 0 otherwise output will be
D. So we just need an AND gate before the DFF as
shown in the figure.
Answer:
As DFF transmits the data as it is to the output, it
can be used to provide one clock delay.
Answer:
In TFF, if T=1, output just toggles between 1 and 0.
So TFF can be used as toggle switch.
Q20) Using DFFs and minimum no. of 2×1 Mux,
Answer:
From the given characteristic table, it is clear that if
X=0, Q(t+1) = Y XNOR Z. If X =1 and if (Y XNOR
Z), Q(t+1) = Q(t), else Q(t)’. So we need two 2:1
mux to generate Y XNOR Z. One to select Q(t) and
Q(t)’ and one more to select between X=0 case and
X=1 case. Total we need 4 2:1 mux. The design is
shown here except the generation of Z’.
characteristic equation?
Answer:
described in Q20?
Answer:
a D flip-flop?
Answer:
To get D from flip-flop from AB flop, just connect
A=B=D.
We can prove this from the characteristic equation ,
Q(t+1) = D Q(t)’ + D Q(t) = D (1) = D
Q24) Draw the output waveforms Q and Q’ for a
a delay of 10ns.
Answer:
For NOR based S-R Latch, there is no change in
output for S=R=0, 0 for S=1,R=0 and 1 for S=0 and
R=1. The waveforms are drawn using this. (Delay of
NOR gate = 10ns). Assume that initially Q = 0 and
so Q’ = 1.
Answer:
Answer:
Answer:
State Machine for Serial 2’s complementer:
Logic: Starting from LSB, retain all the bits till first
one has occurred including the first one and then
complement all the following bits.
State Definition:
State a : No one has occurred
State b : After first one has occurred
State Diagram:
Q2)
sequence: 001010110110110111
Answer:
(a) INPUT Sequence : 0 0 1 0 1 0 1 1 0 1 1 0 1 1 0
111
OUTPUT Sequence : 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1
01
flop?
Answer:
State transition diagram for J-K Flip-flop:
The first bit of the two bits is J and the other is for K.
next-state equations:
A(t+1) = x’A + x B
B(t+1) = x A’ + x’B
next states?
Answer:
A(t+1) = x’A + xB
B(t+1) = xA’ + x’B
(c) Functionality:
Case (b) : 10 11 10 11 ….
(b) Implement the circuit using two J-K flip flops and
external gates?
Answer:
One of the possible FSMs is shown below:
Answer:
A state machine consists of set of states, initial
state, input symbols and transition function that
maps input symbols and current state to next state.
Answer:
State Machine for detecting “1010”:
Logic: Check for the bit pattern 1010. The end “10”
has to be reused for next pattern.
State Definition:
State a : No 1 detected state
State b : One 1 detected state
State c : 10 detected state
State d : 101 detected state
State Diagram:
Answer:
State Machine for detecting “1010”:
Logic: Check for the bit pattern 1010. The end “10”
can’t be reused. So after detection of one pattern,
just go to initial state. (Here it is State a).
State Definition:
State a : No 1 detected state
State b : One 1 detected state
State c : 10 detected state
State d : 101 detected state
State Diagram:
Q9) Draw the state diagram to output a "1" for one
sequence.
Answer:
State Machine for detecting “0110”:
Logic: Check for the bit pattern 0110. The end “0”
can’t be reused. So after detection of one pattern,
just go to initial state. (Here it is State a). That is
non overlapping case.
State Definition:
State a : No 0 detected state
State b : atleast One 0 detected state
State c : 01 detected state
State d : 011 detected state
State Diagram:
result in heads.
Answer:
State Machine for detecting “111”:
Logic: If we represent Head with logic 1 and tail with
logic 0, Checking for 3 consecutive heads is nothing
but pattern matching for “111” (overlapping)
State Definition:
State a : No 1 detected state
State b : One 1 detected state
State c : More than Two 1’s detected state
State Diagram:
Answer:
To remove a state, we need to have another state
with the same next state values and output values.
If we observe the given state table, state g has all
entries same as those of state a. So state g can be
replaced with a everywhere. Once g is replaced with
a, all the entries of f are same as those of c. Thus,
replacing f with c, makes state d same as state b.
So with all these changes the reduced state table is
shown below:
Q12) Starting from state a, write the next state and
table.
Answer:
Eg :
I/P 0 1 0 1 0 1 1 0 0 1
O/P 0 0 0 1 0 1 1 1 0 0
Answer:
State Machine for detecting more than one 1 in last
3 samples:
Logic: Check for the patterns 011, 101, 110 or 111.
These 4 patterns have more than one 1.
last 4 inputs.
Eg:
I/P 0 1 0 1 0 0 1 1 0 1 0 1 0
O/P 0 0 0 1 1 0 0 0 0 1 1 1 1
Answer:
State Machine for detecting “101” in last 4 samples:
Logic: Possible patterns are: 0101,1101,1010,1011
(overlapping)
State Definition:
State a : Continuous 0s
State b : Atleast one 1, that is “01” or “111….”
State c : 010 detected state
State d : 0101 or 1101 detected state
State Diagram:
Q15) State Machine for detecting alternative 1’s and
Eg:
I/P : 0 0 1 0 1 0 1 1 0 1 0 0 0
O/P : 0 0 0 1 1 1 1 0 0 1 1 0 0
Answer:
State Machine for detecting “101” in last 4 samples:
Logic: Check for the patterns 101 or 010 in last 3
samples.
State Definition:
State a : State a : No 1 detected state, continuous
0s
State b : One 1 detected state, “01” or “1” detected
state
State c : “10” detected state
State d : continuous 1’s detected state
State Diagram:
Eg:
I/P : 0 1 0 0 1 1 0 1 1 0 0
O/P : 0 0 0 0 0 1 1 1 1 1 0
Answer:
State Machine for eliminating short length pulses:
Logic: The 1 after two successive 0’s will be made
0. Similarly the zero after two successive 1’s will be
made 1. If you are continuous 1s state, minimum 2
0’s zeros are needed to switch to continuous 0s
state and vice versa.
State Definition:
State a : Continuous 0s
State b : One 1 in between 0s
State c : Continuous 1s
State d : One 0 in between 1s
State Diagram:
Q17) What is one-hot method? List the advantages
and disadvantages?
Answer:
One-Hot encoding of FSM uses one flip-flop per
state. Only one flip-flop is allowed to have 'logic 1' at
anytime. For example, for a five state FSM, the
states are "00001", "00010", "00100", "01000",
"10000". All other states are illegal. One-Hot
encoding trades combinational logic for flip-flops.
One hot reduces the next state and output logic
complexity. Its good for 'flip-flop' rich implementation
technologies. Because the combinational logic is
reduced, the length of the critical path can be
reduced resulting in a faster FSM. Speed increase
is more significant for larger finite state machines.
The disadvantage is we end up in using more
number of flops.
Answer:
Johnson’s method: 000,001,011,111,110,100
by using
Answer:
(a) Log2N
(b) Log2N
(c) N
(d) N/2
Q20)
be 1 for even 1’s odd 0’s, C for odd 1’s even 0’s and
above block.
Answer:
State Machine for identifying whther the 1’s and 0’s
are even or odd:
State Definition:
State a : Even 0’s Even 1’s
State b : Even 0’s Odd 1’s
State c : Odd 0’s Even 1’s
State d : Odd 0’s Odd 1’s
Outputs:
In state a, outputs are: A = 1, B = 0, C = 0, D=0.
In state b, outputs are: A = 0, B = 1, C = 0, D=0.
In state c, outputs are: A = 0, B = 0, C = 1, D=0.
In state d, outputs are: A = 0, B = 0, C = 0, D=1.
State Diagram:
Answer:
One hot method.
a : 1000, b : 0100, c : 0010, d : 0001
These values are nothing but the four outputs that
are needed. So it reduces the output logic
complexity.
Answer:
State Machine to detect whether the serial binary
number is divisible by 5 or not:
State Diagram:
continuous samples?
Answer:
State Machine to check whether the two inputs have
same value for last 3 samples:
State Definition:
State a : P is not equal to Q
State b : P=Q for last 1 sample
State c : P=Q for Atleast last 2 samples
State Diagram:
Out of the two bits that are shown on the arrows,
first 1 is for input A and second one is for input B.
Answer:
State Machine with two inputs- Number of 1’s
together multiples of 4:
State Definition:
State a : Reminder 0
State b : Reminder 1
State c : Reminder 2
State d : Reminder 3
State Diagram:
Out of the two bits that are shown on the arrows,
first 1 is for input A and second one is for input B.
Eg:
A00110010110
B00000011010
O/P 0 1 0 1 0 1 1 1 0 1 0
Answer:
State Machine with two inputs:
State Definition:
State a : Initial state
State b : A is 0 once (B can be either 1 or 0)
State c : A is 1 once (B can be either 1 or 0)
State d : A has same value for last two samples and
it is equal to logic 0
State e : A has same value for last two samples and
it is equal to logic 1
a) 0* -> 1+ -> 0+
b) 0* -> 1* -> 1*
c) 0* -> 0* -> 1
d) 0+ -> 1+ -> 0*
Answer:
State Machine with two inputs:
Q1) Define (a) setup time (b) hold time (c) clock to
Q delay.
Answer:
(a) Setup time: Setup time is the minimum
amount of time the data signal should be held
steady before the clock event so that the data is
reliably sampled by the clock.
(b) Hold time: The hold time is the minimum
amount of time the data signal should be held
steady after the clock event so that the data is
reliably sampled by the clock.
(c) Clock to Q delay: The clock to Q delay is the
amount of the propagation time required for the data
signal to reach the output (Q) of the flip flop after the
clock event.
maximum frequency?
Answer:
For a single flip flop, lesser the clock-to-Q delay,
more the operating frequency. However, the
maximum frequency of operation may be limited by
the configuration in which the flip flop is connected.
This will be clear in the later parts of the chapter.
Among the 3 flops, the first one, FF1 has less clock
to Q delay. So it can operate at maximum frequency
which is given by 1/5ns = 200MHz
Answer:
After the posedge of the clock, the output will
change after a delay of Tcq. The input of the flop will
change after further delay of “dly”. It should be
available before the Tsu of the flop.
So the T >= Tcq + Tsu + dly. The same thing is
illustrated in the following waveform.
the available clock period is (a) 5ns (b) 8ns (c) 15ns
Answer:
For FF1, Tsu + Tcq = 3 + 5 = 8ns
For FF2, Tsu + Tcq = 6 + 4 = 10ns
For FF3, Tsu + Tcq = 8 + 2 = 10ns
As dly = 0, Tsu + Tcq <= T
(a) T = 5ns, None of the flip flops has Tsu + Tcq <=
T, so no one can be used.
(b) T = 8ns, FF1 can be used
(c) T = 15ns, Anyone can be used
T_propagation = 10ns
Answer:
Using the same equation , T >= Tcq + Tsu, T >= 6 +
10. So T >= 16ns.
The maximum clock frequency = 1/16ns = 62.5MHz
detail.
Answer:
There are no hold violations in the above circuit. If
the hold time is greater than the propagation delay
then there will be hold violation for the above circuit.
In that case, buffers (even number of inverters) will
be used in the feedback path in order to delay the
signal in reaching back to the input.
Q7)
violation, if any?
frequency of operation?
Answer:
(a) Thold <= Tcq + dly. But here, 2ns > 1.5 + 0.5 =
1.7ns. So there is a hold violation in the above
circuit.
(b) dly >= Thold – Tcq = 2 – 1.5 = 0.5ns
(c) The delay of the clock buffer will not effect the
maximum frequency of operation of the circuit.
Answer:
Clock-skew: Clock skew is a phenomenon in
synchronous circuits in which the clock signal (sent
from the clock circuit) arrives at different
components at different times. This is typically due
to two causes:
1. The first is a material flaw, which causes a
signal to travel faster or slower than
expected.
2. The second is distance: if the signal has to
travel the entire length of a circuit, it will likely
(depending on the circuit's size) arrive at
different parts of the circuit at different times.
Answer:
Yes, Hold time of a flip flop can be negative. Most of
the modern flip flops will have either 0 or negative
hold time. Assume Thold = -2ns, there should not be
any transitions in the input before 2ns of the clock
event.
Answer:
For the given circuit, T >= Tcq1 + Tsu2.
To get maximum frequency T should be less. So we
should select the first flop with less clock to Q delay
and second flip flop with less setup time. So FF1
and FF3 give the maximum frequency and it is
equal to 1/7ns = 142.8MHz
hold time.
Answer:
Q12)
(a) Are there any hold time violations for FF2 in the
of Operation?
Answer:
(a) There is a hold time violation in the circuit,
because of the feedback. Tcq2 +AND gate delay is
less than thold2. To avoid this , we need to use
even number of inverters(buffers). Here we need to
use 2 inverters each with a delay of 1ns. Then the
hold time value exactly meets.
Q13)
Answer:
Tcq1 = Tcq2 = 2.5ns
Tsu1 = Tsu2 = 2ns
Thold1 = Thold2 = 1ns
delta = clock_skew = 3 - 0.5 = 2.5ns
Q14)
second FF.
Answer:
Setup time:
(T/2) + delta >= Tcq1 + dly1 + Tsu2
Hold time:
Th2 <= delta + Tcq1 + dly1
Answer:
For FF1 and FF2, T1 >= (Tsu2 + Tcq1 + dly1 –
skew1)
For FF2 and FF3, T2 >= (Tsu3 + Tcq2 + dly2 –
skew2)
T >= MAX (T1,T2)
.
Answer:
Metastable state: A un-known state in between the
two known logical states is called as Metastable
state.
Answer:
Given: Tsu = 2ns, Th = -3ns and Tcq = 5ns.
If hold time is negative and if its absolute value is
less than Tsu, only thesetup violation equation
without any modification will work. But if absolute
value of hold time is more than setup time, we need
to replace the setup time in the equation with hold
time. The modified equation is shown below:
T >= Tcq1 + dly1 + Max( Tsu2, | Th2 | )
T >= 5 + dly1 + 3
T >= 8 + dly1
Answer:
The shift register is shown below.
If C = 0, the circuit shifts from IN QA -> QB -> QC
and
If C = 1, the circuit shifts from IN QC -> QB -> QA
reappears.
clock pulses?
Answer:
Dnext = Q0 xor Q2 xor Q3
Answer:
Ripple counter is asynchronous. This means all flip
flop outputs will not change at the same time. The
output of one flop works as clock to the next flip
flop. The state changes consequently “ripple
through” the flip flops, requiring a time proportional
to the length of the counter.
Where as synchronous counters will have
same clock for all the flip flops. All flip flops will
change the state at the same time. Design of
synchronous counters is easy but needs more
hardware.
Although the asynchronous counter is easier
to implement, it is more "dangerous" than the
synchronous counter. In a complex system, there
are many state changes on each clock edge, and
some IC's (integrated circuits) respond faster than
others. If an external event is allowed to affect a
system whenever it occurs, a small percentage of
the time it will occur near a clock transition, after
some IC's have responded, but before others have.
This intermingling of transitions often causes
erroneous operations. What is worse, these
problems are difficult to test for and difficult to
foresee because of the random time difference
between the events.
needed?
Answer:
log2N
Answer:
In the problem it is not clearly mentioned whether
Answer:
The FSM for 3-bit gray counter is shown below. You
can notice the single bit change from one state to
another state.
Eg:
IN : 001110110000
OUT: 0111111000
Answer:
The FSM for 3-bit gray counter is shown below. You
can notice the single bit change from one state to
another state.
Q8) Obtain OUT1 & OUT2 from INPUT shown
Answer:
Shift register based: The synchronizer (the first flip
flop) aligns the INPUT with clock. The second flip
flop delays the input by one clock. Draw the
waveforms of output of first and second flip flops
and then try to get the relationship between those
waveforms and OUT1, OUT2. It gives the complete
solution as shown below.
Answer:
Shift register based: Assumed atleast 3 clock gaps
between next falling edge. Shift register of width 2 is
needed.
Answer:
(a) 50% duty cycle:
Waveforms:.
Design:
Q11)
above.
Answer:
Same as A10(b)
1/3rd?
Answer:
Waveforms:
Design:
In the above problem, if you observe the
waveforms, they are synchronous. So we can use
FSM to design the circuit. If you observe the
waveform clearly, output is 100,100,100 and so on.
Assume 3 states: a,b & c. Initial state is a and
output is 1 in this state. The state transition a -> b ->
c -> a. Output is 1 only for state a. The state table is
shown below:
PS NS O/P
a b 1
b c 0
c a 0
Answer:
(a) Replacing the NOR gate in the above circuit with
NAND gate gives a duty cycle of 2/3 . That is 66.67%.
(b) To get 50% duty cycle, by observing the waveforms, we can
notice that, an extra flop that works at the negative edge of the clock
is needed. ORing of the input and output waveforms of this flip flop
gives the required waveform. The complete solution is shown below:
(2/3) fin
Answer:
Waveforms:
Design:
Q15)
Answer:
From the given circuit we can derive the following
next state equations,
A(t+1) = A’ and B(t+1) = A XOR B’ = AB + A’B’
Taking initial values of A=B=0 and drawing the
waveforms with respect to the clock using above
equations, we can observe that
OUT = freq_Clock / 4 with duty cycle = 50%
Answer:
The block box can be an up-down counter, where
the “count_up_enable” is connected to the sensor at
the entrance and “count_down_enable” to the
sensor at the exit. That is if there is no one in the
room, the counter’s output will be zero. Whenever
this happens make the bulb “OFF”.
Answer:
Each BCD counter counts from 0-9.
Answer:
Ring counter: A ring counter is a circular shift
register with only one flip-flop being set at any
particular time, all others are cleared. This single bit
is shifted from one flip flop to the next to produce
the sequence of timing signals.
Answer:
Q20) To generate 8 timing signals using a ring
the counter?
Answer:
3-bit counter and 3:8 decoder
states?
Answer:
In “0” passing ring counter, at any time only one flip
flop will be set to 0 others will be 1. The given state
values are 23 and 29. The binary representations
are 10111 and 11101 respectively. So the states are
: 01111, 10111,11011,11101,11110. The decimal
values are : 15,23,27,29,30.
a = 15, b = 27 and c=30
counter?
Answer:
The states of 3-bit Johnson counter are:
000,100,110,111,011,001. So the unused states are
010 and 101
Answer:
2N
Answer:
For N-flops, the total possible states = 2^N.
The number of states of a Johnson counter = 2N
So, the number of unused states = 2^N – 2N
Q25) What is the output frequency of a 4-bit binary
Answer:
The output of last flip flop of a 4-bit counter is equal
to the input clock/16.
So output frequency = 160MHz/16 = 10MHz
Answer:
(a) 10 + 10 + 10 + 10 = 40ns
(b) 10ns
Answer:
Minimum time period of the clock = 11 x 40 + 60 =
440+60 = 500 ns So maximum clock frequency =
1/500 = 2 MHz
sequence: 0,4,2,7,0,4,2,7,0,4……?
Answer:
The present state and next state values are shown
in the table and the complete design is shown in the
following diagram.
circuit:
Answer:
Let us name the 3 flip flops as A,B and C
Q0 = A’
Q1 = A XOR B
Q2 = (AB) XOR C
Starting with A=B=C=0, the next states can be
obtained as:
000 --> 001 --> 010 --> 011 --> 100 --> 101 --> 110 -
-> 111
So the circuit works as 3-bit binary counter.
multiples of 4.
Answer:
The output should be asserted 1 if the number of
clocks is multiple of 4, that is 0, 4 , 8 and 12. The K-
Map simplification gives, OUT = Q1’Q0’ = (Q1 +
Q0)’
basic gates.
Answer:
applied?
Answer:
N-bit ring counter gives 1/N times the input
frequency at the output. Johnson’s output is 1/2N
times the input. Where as the counters output will
be 1/(2^N).
F1 = 10MHz / 10 = 1MHz
F2 = 1MHz / 20 = 50KHz
F3 = 50KHz / 16 = 3.125KHz
F4 = 3.125KHz / 8 = 390.625Hz
Answer:
The complete design using shift registers is shown
in the following figure. The main clock is gated with
the clock enable so that A and B will be shifted just
8 clocks. After 8 clocks A and B will have their
contents swapped.
Answer:
A fault in a manufactured circuit causing a node to
be stuck at a logical value of 1 (stuck-at-1) or a logic
value of 0 (stuck-at-0), independent of the input to
the circuit. If any rail during the layout gets
connected to either VDD or GND permanently, it will
lead to these stuck at problems.
Answer:
Total possible faults are 6. (3 nodes, 2faults for each
node) By single fault model, the test patterns that
are needed are: 01,10 and 11 The stuck-at-0
problems at any of the inputs and stucl-at-0 problem
at the output can not be distinguishable.
Answer:
(a) Test pattern/set : The set of all input
combinations that is needed to find out all the stuck-
at faults of a digital circuit. Eg: Test set for 2-input
AND gate: { 01, 10,11}
(b) ATPG: ATPG, or Automatic test pattern
generation is an electronic design automation tool
that generates the complete test set to distinguish
between the correct circuit behavior and the faulty
circuit behavior caused by a particular fault.
Answer:
Assume that there is only fault in the given circuit.
This is called single fault model. Now apply the
input combination such that the correct and faulty
circuits would give different outputs.
Answer:
We need to select the pattern such that none of the
inputs at AB,C& D should give 0 at any of the inputs
of NAND gate. So the possible pattern is: A = B = C
= D = 1 So we need to apply 1111 at the input, if it is
correct circuit we will get, 0 at the output and if there
is stuck-at-0 problem at P, we will get 1 at the
output.
Answer:
Single Fault method is used here.
Answer:
N+1
circuit:
Answer:
there is
Answer:
(a) F = (C+D)’ = C’D’
(b) F = AB
Answer:
If the number of nodes is more in a given circuit, it is
very difficult to derive the test pattern by using
single fault model (That is analyzing at each node).
The other method called “Path sensitized” can be
used to make the test pattern generation more
efficient. In this method, all the paths from input to
the output will be identified and the input will be
applied such that the output will be dependant only
on one particular path. And this path is called
sensitized.
“0100”?
diagram?
Answer:
(a) 0100 at the input, makes the path A-w1-F
sensitized.
So it can be used to detect the following single
stuck-at problems:
Stuck-at-1 at A or Stuck-at-0 at w1 or Stuck-at-0 at
F’
(b) Path sensitized method is used here.
To make F dependant only on w3, w1 = 0. So
A=B=1
Now for identifying the Stuck-at-0 fault at w3, we
need to apply input pattern such that we will get 1 at
w3.(C=D=1). So the required pattern is 1111.
For identifying the Stuck-at-1 fault, either C or D has
to be 0. So any of the following patterns can be
used : 1100,1101 or 1110
Q13)
(b) Show all the paths that are possible from inputs
to the output?
(c) Give the complete test set for the same using
Answer:
Q14) (a) Give the circuit for a 4-bit parity generator?
(b) Derive the minimal test set that can detect all
stuck-at-faults?
Answer:
(a) The 4-bit even parity generator is shown in the
following diagram:
Answer:
In test of logic circuits, normally the logic levels are
represented with D. This is called D-Notation. If
Logic-0 is represented with D, logic 1 will be D’ and
vice versa.
a combinational circuit?
Answer:
A Static Hazard is defined when a single variable
change at the input causes a momentary change in
another variable [the output]. A Dynamic Hazard
occurs when a change in the input causes multiple
changes in the output [i.e. from 1 to 0 and back to
1]. In either case of a Static or Dynamic hazard the
product produced is an unanticipated glitch [the
hazard]. The resulting glitches in the circuit may or
may not induce additional problems, other then
increased issues due to switching noise.
There are two types of Static hazards: the high
output transitions to a low and back high [a low
going glitch]. Or the low output transitions to a high
[1] and back low [0] [a high going glitch]. There are
also two types of Dynamic hazards: the 0 output
transitions to a 1 back to 0 and then 1 again. Or the
1 output transitions to a 0 back to 1 and then 0
again.
Answer:
(a) ii
(b) i
(c) iii
Q18) Give the characteristics of Static-zero Hazard?
Answer:
Static-zero Hazard’s characteristics: Two parallel
paths for x, one inverted and reconverge at an AND
gate.
F = A . A’
Any circuit with a static-0 hazard must reduce to the
equivalent circuit of the following figure:
Hazard?
Answer:
Static-one Hazard’s characteristics: Two parallel
paths for x, one inverted and reconverge at an OR
gate.
F = A + A’
Any circuit with a static-1 hazard must reduce to the
equivalent circuit of the following figure:
B’C’D has?
Answer:
G = AB + A’ C + B’C’D
If B = C = 0, G = A+A’ (Static-0 hazard in A)
If A = 1, C = 0, D = 1, G = B+B’ (Static-0 hazard in
B)
If A = 0, D = 1, G = C +C’ (Static-0 hazard in C)
Answer:
To avoid the static hazards, one of the possible
ways is delay matching. Suppose in the circuits
shown above (A18 & A19), we can provide buffer
whose delay is equal to that of NOT gate. But it
becomes very difficult to match the delays exactly.
If Static Hazards are removed from the design,
Dynamic Hazards will not occur. A Karnaugh map
[K-map] is the easiest way to eliminate a Static
Hazard or glitches. A Kmap for each combinatorial
logic function which has an output should be used.
Redundant prime implicants should be added to the
K-Map (circuit), which will guarantee that all single-
bit input changes are covered. Multi-level functions
will be reduced to "two-level" functions, and
analyzed by the K-map approach. The procedure
for designing a static-hazard-free network is a
straightforward application. The key is to place the
function in such a form that the transient output
function guarantees that every set of adjacent 1's in
the K-map are covered by a term, and that no terms
contain both a variable and its complement. The
former condition eliminates 1-hazards and the latter
eliminates 0-hazards.
Answer:
(b)
The boolean expression, Y = AB + A’C + BC can be
further reduced to Y = A’C + AB. But the second
expression will have hazards. So the redundant
term BC is added. You can observe the K-Map of
the same:
Answer:
F(A,B,C,D) = ∑ (0,4,11,13,15) + d(2,3,5,10)
From the K-Map shown below, the simplified
expression for F is,
F = ABD + A’C’D’ + B’C
But to make it Hazard free, we need to add the
redundant term, ACD to this.
F = ABD + A’C’D’ + ACD (Note that B’C is removed
from the equation)
Answer:
The two possible implementations are shown below:
If we compare both the implementations, in
implementation (a), the delays from the inputs to the
output, F are uniform. So there is no possibility of
glitches. Where as in the implementation (b), the
delays are not balanced properly. (a) is hazard free
and the better implementation when compared to
(b).
of 1ns.
Answer:
Y = AB + CD
Answer:
CMOS(Complementary MOS) circuits consist of
both types of MOS devices interconnected to form
logic functions as shown in the following block
diagram. The PUN(Pull up network) will charge the
output node in case of Logic-1 and the PDN(Pull
down network) will discharge by connecting the
output node to ground, in this way the out put is
connected either to VDD or GND continuously. PUN
and PDN are dual logic networks. CMOS take
advantage of the fact that both n-channel and p-
channel devices be fabricated on the same
substrate.
Q2) What are the advantages and disadvantages of
CMOS logic?
Answer:
The CMOS logic has two important advantages:
Advantages:
• No direct path in steady state between power and
ground, so no static power dissipation(except for
small power dissipation due to leakage currents)
• Full logic levels (The VTC exhibits a full output
voltage swing between 0 and VDD, and that VTC is
usually very sharp)
• High noise margins (Good noise immunity)
• Extremely high input resistance; nearly zero
steady-state input current
• Low output impedance. Always a path to Vdd or
Gnd from output node, in steady state;
• CMOS provides a greater packing density.
Disadvantages:
• CMOS processing is more complex
• Latch up problem
• Slower compared to TTL
• Higher cost
a) Ease of manufacturing
d) Low cost
Answer:
(b)
Answer:
CMOS inverter:
Answer:
Voltage Transfer Characteristics (VTC) of a CMOS
inverter:
voltage levels:
VOH,VOL,VIH,VIL.
Answer:
VOH > VIH > VIL > VOL (Refer to VTC shown in A5)
Answer:
(a) Fan_out: The fan-out of a gate specifies the
number of standard loads that can be connected to
the output of the gate without degrading its normal
operation. The fan-out is calculated from the
amount of current available in the output of a gate
and the amount of current needed in each input of a
gate.
Fan_out = Min (IOH/IIH, IOL/IIL)
Answer:
Given: VOH = 4V, VIH = 3V, VOL = 1V and VIL =
1.5V
VOH – VIH = 4 – 3 = 1
VIL – VOL = 1.5 – 1 = 0.5
Noise Margin = 0.5
2mA
Answer:
(a) Fan_out :
IOH = 1mA, IOL = 20mA, IIH = 0.05mA and IIL =
2mA
IOH/IIH = 1/0.05 = 20
IOL/IIL = 20/2 = 10
So, Fan_out = 10
fanout,
a) increases
b) decreases
c) doesn’t change
d) none of these
Answer:
(b)
NOR gates.
Answer:
(a) 2-input NAND gate:
function?
Answer:
Deriving the Pull-up network hierarichally identifying
sub nets as shown in the following figure:
The complete circuit and the output boolean
function is shown below:
Answer:
Deriving the Pull-up network hierarichally identifying
sub nets as shown in the following
digital electronics interview questions, physical
design
following circuit:
Answer:
F = ( (A+B) . (C + D))’
Q15)
NAND gates?
the same?
Answer:
(a) 4-input NAND gate from 2-input NAND gates:
Answer:
S = A XOR B XOR C and Cout = AB + BC + AC =
AB + (A+B)C
S can be rewritten as, S = ABC + (A+B+C) Cout’
For Cout, NMOS = PMOS = 6 (Total 12)
For S, NMOS = PMOS = 8 ( Total 16)
So for one bit full adder implementation, minimum
number of transistors that are required = 28
output?
Answer:
The late coming signals are to be placed closer to
the output node ie A should go to the NMOS that is
closer to the output.
Reason is, by the time A comes, B would have
turned on the bottom transistor and discharged the
intermediate node between the 2 series NMOS. So
by the time A comes, it can discharge the output
node very quickly.
Answer:
Stick diagram for CMOS inverter
it.
Answer:
Stick diagram for NOR gate
Answer:
Pass transistor logic:
• A pass transistor is a MOSFET in which an input is
applied not only to the gate but also to the drain
• Unlike static CMOS, there is no need for any static
power supplies
• More advantageous in terms of number of
transistors if the inputs and their complements are
available
• Disadvantage is : Degarded logic level as NMOS
passes weak logic-1
Answer:
The AND gate using pass transistor logic is shown
below:
Q23)
Answer:
(a) 2:1 Mux
(b) OUT = S I1 + S’ I0
(c) Pass transistor logic
(d) Degraded logic 1. To avoid we need to use both
NMOS and PMOS together ( That is transmission
gate)
Answer:
Tranmission gate consists of one n-channel and one
p-channel MOS transistor connected in parallel. The
same thing is shown in the following diagram. When
N is at VDD and P is at ground, both transistors
conduct and there is a closed path between IN and
OUT.
a transmission gate?
Answer:
Using only an NMOS will result in an poor 1.
Assume the gate voltage on NMOS is 5V. If we
connect Drain to 5V, and the source is initially at 0,
NMOS will turn on as long as Vgs >Vth, this means,
once the source reaches 4.3V (Assuming Vth=0.7),
the NMOS will turn off and there will be no more
increase in source voltage. Similarly the opposite
happens with PMOS, it doesn't give us a clean 0,
but it can give a full 5V. So we use a combination of
both NMOS and PMOS so that our signal doesn't
get degraded by Vth on either side of VDD and
GND.
Q26) Design a Transmission Gate based XOR.
Answer:
XOR Using TG:
If we observe the truth table of XOR, if A is 1, output
is B’ and if A is 0 output is B. Using this, we can
implement the following circuit.
Answer:
D-Latch using TG:
Answer:
The NMOS transmits the same voltage from drain to
source, as long as its value is less than 4V. So in
the given diagram the output and input of the
inverter are same. If we observe theVTC of an
inverter, Vout=Vin at Vth = VDD/2 = 2.5V.So if there
is no noise floor, the output will settle to 2.5V (This
is theoretical analysis). However practically the
circuit will oscillate.
collector gate?
Answer:
The 3 major applications of open-collector gate
are:
• Driving lamp or relay
• Performing wired logic
• Construction of common bus system
Q30) Using open-collector NAND gate,
Answer:
functionality?
Answer:
It forms a common bus system. We can
transmit one of the inputs A,B,C to the output Y
by making the other inputs 0. Suppose if
A=B=0, Y is C.
Answer:
Latch Up?
Answer:
Latch up: In fabricating CMOS ICs, parasitic
bipolar transistors are formed as byproducts of
CMOS processing. These parasitic pnp and
npn bipolar transistors form a SCR(Silicon
controlled Rectifier) with positive feedback and
virtually short circuit the power rail to ground.
The generation of such a low-impedance path
in CMOS chips between the power rail and the
ground rail is defined as Latch-up.
example.
Answer:
Any type of memory that requires power in
order to store information is called volatile
memory. RAM is volatile whereas ROM is non-
volatile. That means ROM can store data
without power also.
Q2) Differentiate between RAM and ROM?
Answer:
Differences between RAM and ROM:
1. ROM: Read Only Memory. RAM : Random
Access Memory
2. ROM has no write operation. RAM has both
read and write operations
3. ROMs are non-volatile and RAMs are
volatile.
Answer:
1K = 210 , Number of address lines = 10
Number of data lines = 8
256X16?
Answer:
256/16 = 16, 16X8 memories are sufficient to
get a memory of size 256 X 8. But to get 256 X
16, we need twice of that.
So, the required number of 16 X 8 memories =
16 * 2 = 32
Answer:
We need 8, 1KX8 memories. For 8KX8
memory has 13 address ( A12-A0) lines. For
each 1KX8 memory, there will 10 address
lines. So we can connect the A0-A9 address
lines directly to these 10 address lines. And the
remaining, that is from A10,A11,A12 can be
used as select lines for the decoder and the
decoders outputs will be connected to “cs” of
the ROMs. The complete design is shown
below:
Q6) Using DFF design a binary cell, which can
mem_en?
Answer:
Answer:
One-transistor Dynamic RAM cell is as follows:
Answer:
A single SRAM memory cell is shown in the
below diagram. As can be noted, six total
transistors are required for our design. Two
NMOS and two PMOS transistors are used to
construct a simple latch to store the data, plus
two more pass NMOS transistors are
controlled by Word Line to pass Bit Line and
Bit Line Bar into the cell.
Write and Read operations are performed by
executing a sequence of actions that are
controlled by the outside circuit.
Write Operation: A Write operation is
performed by first charging the Bit Line and Bit
Line Bar with values that are desired to be
stored in the memory cell. Setting the Word
Line high performs the actual write operation,
and the new data is latched into the circuit.
Read Operation: A Read operation is initiated
by pre-charging both Bit Line and Bit Line Bar
to logic 1. Word Line is set high to close
NMOS pass transistors to put the contents
stored in the cell on the Bit Line and Bit Line
Bar
Answer:
The time that is required for the data to be
available at the memory output after receiving
the new address at the input is called memory
access time. It is a measure of a memory
devices operating speed.
Answer:
SRAM is faster than DRAM
SRAM?
Answer:
DRAM has 3 main advantages over SRAM:
1. DRAM memory cell (1 transistor and
capacitor) is simple and smaller than SRAM (6
transistors).DRAM has more density (more
cells per chip). The larger memories are
always made of made of DRAMs only. ( Main
memory)
2. DRAM is cheaper than SRAM.
3. DRAM dissipates lesser power.
Disadvantages:
1. DRAM is slower than SRAM. Where speed
is critical, SRAM will be used. Eg: Cache
memory
2. DRAM requires periodic refreshing.
3. SRAM is compatible with CMOS technology
whereas DRAM is not.
DRAM?
Answer:
In DRAMs, capacitors are used for storing the
information. The capacitor discharges after
some time. So periodic refreshing is needed.
Also, whenever the cell is read, the value will
be written back to the cell. This is called read-
refresh operation.
C (in hex) ?
Answer:
(a) Size of memory = 16 X 1 (Each binary cell
is of width 1)
(b) 1010
(c) Row4, Column1
Answer:
DDR RAM or double-data-rate RAM is a type
of memory integrated circuits used in
computers. It achieves greater bandwidth than
ordinary RAM by transferring data on both the
rising and falling edges of the clock signal.
This effectively nearly doubles the transfer rate
without increasing the frequency of the front
side bus. Thus a 100 MHz DDR system has an
effective clock rate of 200 MHz when
compared to equivalent SDR RAM.
Answer:
(a) PLD : Programmable Logic Devices
(b) PLA : Programmable Logic Array
(c) PAL : Programmable Array Logic
(d) FPGA: Filed Programmable Gate Array
PAL?
Answer:
In PLA both AND and OR arrays are
programmable whereas PAL has
programmable AND array and a hardwired OR
array. When number of functions to be realized
is low, PLA is costly. For those cases, PAL is
much cheaper.
programmable OR array
programmable OR array
fixed OR array
Answer:
(a) ii
(b) iii
(c) i
F2 = A’BC + AB’C
F3 = B’C’
Answer:
F1 = A’BC + AB’C + B’C’
F2 = A’BC + AB’C
F3 = B’C’
Answer:
FIFO (First In First Out) is a special type of
storage memory where the first data bit written
into the memory is the first to be read out.
Putting in another way, FIFO is a storage
method that retrieves the data stored for the
longest time. The FIFO memory is used when
two systems of differing data rates must
communicate. Data can be entered into a FIFO
register at one end and taken out at the other
end at another rate.
a FIFO?
Answer:
A FIFO with all the necessary signal lines is
shown in the following block diagram:
Answer:
Duration of the data = 10 Microsec
Input Data rate (Master) = 200 Mega samples
Output Data rate (Slave) = 10 Mega samples
Depth of FIFO = (Output rate – Input rate) *
Duration
= (200-10) * 10 = 1900
assumptions:
mechanism.
cycles is indeterminate.
Answer:
In the problem it is given that, out of 100 clocks
the sender sends 80 words. The 80 words can
occur in any of the 100 clocks. The worst case
will be all 80 words coming continuously. So
for 10 clocks, the sender sends 10 words
where as the receiver can receive only 8
words. So we need to store 16 words in 100
cycles.
Now if we look at the process for long time, the
worst case is: During first 100 clocks the
sender is idle for 20 clocks and sends the data
in the last 80 clocks. In the immediate 100
clocks, data is sent during first 80 clocks. In
this case we need to store 32 words.
So the minimum size of FIFO required is 32
words.
Rules:
Answer:
This can be solved by taking an example.
Let the frequency of clk_B be 100MHz.
That implies, frequency of clk_A = clk_B/4 =
25MHz
Period of en_B = (1/25M) * 100 = 4 µs
As duty cycle of en_B is 25%, it will be high
for a duration of 1 µs. That means B receives
the data for 1 µs and will be idle for 3 µs.
Where as A sends the data every 0.04 µs. So
in 4 µs it can transmit 100 words. And B
receives 25 only, so we need to store the rest
of 75 words in the FIFO. So the minimum size
of FIFO required is 75 words.
Answer:
A FIFO where writes to, and read from the
FIFO buffer are conducted in the same clock
domain is a Synchronous FIFO. For
asynchronous FIFO two different and
asynchronous clocks would be used. In
Synchronous FIFO, as the read and write
pointers will be incremented with the same
clock it is easy to compare them and enable
the FULL and EMPTY signals accordingly.
Whereas for asynchronous FIFO this is slightly
complicated and involves extra logic for the
generation of FULL and EMPTY signals as the
read and write pointers are getting
incremented with two different clocks.
Copyright © 2021