Professional Documents
Culture Documents
Extra Tutorial Ans
Extra Tutorial Ans
Spring 2011
Should you have any questions on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
Should you have any questions on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
ECE124 Digital Circuits and Systems, Final Review, Spring 2011
[Q1] For the following clocked sequential circuit with one input (X) and one output (Z):
1. Drive a state table and draw a state diagram for the circuit.
2. Redesign this circuit by replacing the Q1 flip-flop (i.e. the D flip-flop holding Q1 state) with a JK flip-
flop, and the Q2 flip-flop with a T flip-flop. Only show the excitation equations (or state equations) for
J1, K1, and T2.
[Q2] Draw the state diagram for the table below that describes a finite-state machine which has one input x and
one output z.
Present Next State Output (z)
State x=0 x=1 x=0 x=1
A A E 1 0
B C F 0 0
C B H 0 1
D E F 0 0
E D A 0 1
F B F 1 1
G D H 0 1
H H G 1 0
[Q3] Consider the following state diagram for a synchronous circuit with one input X and one output Z. Analyze
this state diagram and draw its circuit implementation using JK flip-flop (state Q0) and T flip-flop (state Q1) and
MUX-4x1 for Z.
[Q4] Draw a circuit diagram for non-overlapped ‘101’ detector with “D” flip-flops as a Mealy and Moore machine.
[Q5] Given a 32x8 ROM chip with an enable input, show the block level required connections to construct a 128x8
ROM with above ROM chips and a decoder. How many data and address lines these ROMs have?
Should you have any questions on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
ECE124 Digital Circuits and Systems, Final Review, Spring 2011
[Q7] Use a 3-bit binary counter with active-high load (L) and Increment (I) control inputs (load has higher priority
than increment) and implement a circuit (draw) to generate and repeat the following sequence at the output of the
counter. Initial counter value is “000”.
[Q8] Design a digital circuit that takes two 4-bit numbers A and B as input and generates output Z as follows:
Assume that you have access to as many as you need of AND, OR, INV, XOR gates and only one FULL-ADDER,
DECODER and MULTIPLEXER of any size.
[Q9] For the following Programmable Logic Array (PLA), find the function expressions for all outputs and draw the
Karnaugh-Map for function "F".
[Q10] What are three different ways of representing a signed number? Assume 7 bit numbers and represent (-15)
in each of them, then find (B-A) and (A-C) for A = 1101010, B = 0110101 and C = 0010101 in all forms.
[Q11] Find:
Should you have any questions on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
ECE124 Digital Circuits and Systems, Final Review, Spring 2011
[Q12] For the following asynchronous sequential state table, find all possible critical/non-critical races and cycles
for states “a” and “c”.
[Q13] A crypto module which transforms a secret key bit stream, K, into two other bit streams, X and Y has to be
designed. This module must be designed as an asynchronous sequential Mealy state machine. It works as
follows: if the secret key bit stream contains ‘011’, then it’s replaced with ‘10(-1)’. This transformation reduces the
number of ‘1’ bits in the key (which has significant impact on subsequent processing times in elliptic curve
algorithms). However since we cannot represent 0, 1 and -1 with a one bit output, we use two output signals, X
and Y. Whenever a m-bit sequence of 1’s is detected (where m>1), X is set to 1 for the first K=‘1’ in the sequence
and when a K=‘0’ is detected after the mth ‘1’ bit both X and Y are set to ‘1’. Construct a sequential state table for
this module.
K:000100011011110001101000
X:000100010110001001011000
Y:000000000100001000010000
[Q14] For below sequential state table, perform a race-free state assignment and complete the entire state table:
Should you have any questions on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
ECE124 Digital Circuits and Systerns, Final R.eview, Spring Z0ll
[Q1]Forthefollowing clocked sequential circuitwith one input (X)and one output (Z):
1. Drive a state table and draw a state diagram for the circuit.
2. Redesign this circuit by replacing the Qr flip-flop (i.e. the D flip-flop holding Q1 state) with a JK flip-
flop, and the Qz flip-flop with a T flip-flop. Only show ihe excitation equations (or state equations) for
J1, K1, and T2.
;i =, Xdd,y
14.
,{&l x&fx[i; &, ',.
-J il 'iil
n \-{j-* ('.
*.;
i r '")
il
10 10
,{}
1 +.1
11
11
0
1
00
10
0
I 4/ /-- )
h$
t
-_:-n '$)
f Jr = -: r 'l * x Qr +Y(2
.l
[Q2] Draw the state diagram for the table below that describes a finite-state machine which has one input x and
one output z.
,:7,:rll]g) tt;!--*{
t(:'|*:::tv xiF$ .!$**as
A E 't U
:,:::iB,:::::,,:.,,:,::
C F 0 0
B H 0 1
,rlt.$t,l E F 0 0
:i.::ffiEl ri;11; D A 0 1
::::l:;YFl,:::
B F 1 1
:rlG:i:19,; D H 0 1
Fl,, H G 1 0
''flr,
l\,r' tr,
\\
.-ffitr'tr
'l^ ,^d-
Ll )"
\J1/n
* Ja
n LJ
L,/L;)
A/t*$ ilrcgrafr
fi- { (c"srx)
Should you have any questions on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
ECE124 Digital Circuits and Systems, Final Review, $pring 2011
[Q3] Consider the following state diagram for a circuit with one input X and one output Z. Analyze this state
diagram and draw its circuit implementation using JK flip-flop (state Q0) and T flip-flop (state Q1) and MUX-4x1
for Z.
f't--'-
{1,'0
1'ff
I (i
" -. 10[]
--
;
t\ '-. ,lK sR * rfl^ .*5R
DT 44F \
]om m w l4*
1
&n
,--| --l'!- ..,_\_,1
\',0
a0 0 Qr 16,'- rr1,--
\., J
ll
\.
\..,-.-,. <
I ro
I
\. /\.,.1...
I
0t &t ]6 I
tf I c; or -' l
t$ t8 l{ I
tr&.T r[=
PS
QrQo
00
IN
X
0
QrQo
NS
00
OUT
z
0
.iK-F{:
0
I g\R
X
Y"FT
)y
0
fl u \c-
00 01 0 X il
5R. FF
1
K&
charadrrffitt tabkJ 0'1
01
0 11
01
0
0
0
0 0
rlmruff*#k tahb:
1
10 0 00 0 0 X
10 1 01 0
11 U 00 0 X 1 I
1.1
'1
0'l 1 X 0 1
00 01 .11 10 00 01 11 10
0 0 X X U 0 X 0
1 X 0 0 X
00 01 11 10
t€l
v ft
0
1
0
tt 0 il r[F r lqs
rt , Qn *{rXt ax( itttlinn f(th[w
00 01, 11 10
fi
QQ' JK 5K OT
-+-
]0
1
0
0
0
0
0
1
0
0
v./
r
w w 0x 6x &ffi
F(il. 0 0 X 0
X ffit tx t& ll
Z=X
(fr{o W xl @t 0f
il xQ x8 l8
Should you have any questions on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
EcEl?4 Digltal circuits and systems, Final Review, spring z0L1
[Q4] Draw a logic diagram for non-overlapped '101'detector (Moore machine) with D-type flip{lops.
N,,9C
I
'18', & '(&lorl
7
h D2
PS IN \Nsrr OUT
/:P '|cf 9rQi x 9r'Q z
0uf r= (ruS; 00 U 00 0
rtfiL
Joon*, 00
01
01
1
0
01
10
0
tl
n
7* I Merlre1i)
orJT;= { G-SrlruJ
1 01
1*gl
10
10
0
1
00
11
0
1
1q, {r" 1's1s;,ffyiu
11 0 00 0
11 1 01 U
'i it't. ,
l1
00 01 11 10 00 01 11 i0
0 0 {1) 0 0 0 0 0 0 0
''L 1 n n n fi) 1 -lJ
( Xt=eMe@MlN60tffi
)
? d.= @ffeoeffilhfuo0Wfu0
".,:,
1y,"1''1L'.;
Ds Qp
Jl-f I f LfL
nl
t{e
Shouldyouhaveanyquestionsonthisreview,pleasecontact@
ECEIZI|. Digital Circuits and Systems, Final Review, $prlng 201L
, 1lv',g::aia$,r.Ld,e'o t',;ir,-./{,
707
fr rr i
t=N Eit 0
fla
wvlfl8 x
Rdvl2I xl"lO
o Nu'6
I
,1
)
(I
'31
(."f uMrxbful
*i>rze x @.{'bh hk)
76' -"- t I Ro/vt
= 2
[!a'x
:L nD h6
@isreview,pleasecontactArash.[aTabibiazar@uwaterloo.ca]
ECE124 Digital Circuits and Systernsn Final Review, $pring 2011
2 00 10 s Io
3
4
00
01
11
00 {\s 1
;1
I c,dt qM
5 01
6 01
01 \v \
10 (1) c-f d
I 0t
1 01
I 10
11 F}
00
f Ia.
9 10 01 i"! *cd Tb
10 IU 10
11 10 1'l t!t! ffi lt
12 11 00 * I F€
13 11 01 i\ \ -4*-'--
14 11 10 $
15 1'1 '1 1
LIJ
Should you ha.re any questions on this review, please contact Arash. faTabibiazar@uwaterloo.ca]
ECEl2rl Digital Circuits and Systems, Final Review, Spring 2011
(L) and lncrement (l) control inputs (load has higher priority
[e7] Use a 3-bit binary counter with active-high load
ihun in"r"r"nt) and implement a circuit (drawJ to generate and repeat the following sequence at the output of the
aar rn*nr lnilicl
counter. lnitial nnr rntor rraltro
counter value ic "000".
is "OOO" qg-qu.T
^ -+
, +.
...-oo0*io"'i010-101
,OO0-001 -000-"'..
-110--1'11 -000-"'-* Afztd
I I II &L
-010*101 -110-111 LI
,Iittflu, cl,wfafuShCffi
*r',
p$ l,fs, {^,fri,tafa(*yuT
ffiu\ { H*'
lxl P
qfl&q#il Lr PrfrPa @nbp
L = qLT, T=1
Strould you have any questions on this review, please contact Arash. faTabibiazar@uwaterloo.ca]
ECE124 Digital Circuits and Systerns, Final Review, $pring 2011
Assume that you have access to as many as you need of AND, OR, lNV, XOR gates and FULL-ADDER,
DECODER and MULTIPLEXER of any size.
Z L*"rrnnqJilJi
As
bo
cx
w*ws
Xs Xo
X1 Xl
Kz X2
."-
& Xs
Stroutd you have any questions on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
ECE124 Digital Circuits and Systems, Final Review, Spring ZOL,-
programmable Logic Array (PLA), find the function expressions for all outputs and draw the
[e9] For the following
Karnaugh-Maps for function "F".
a n'*d cd
fr'6c
G.- ft/B'-r ftB!C'+&!6'+
H = fr18+8c+6C'
ts
-,--t-.2\----S
o{ rt t0
Should you have any questions on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
ECE124 Digital circuits and Systerns, Final Review, $pring 2011
I
IWIIU
NIWffi
lttM
1 : -1-
f'r4,.i, ,r:tr,, l; I .: .l-i?16^f,rtt";''i{
|i{:. t,ori',
,/{ ,i
6'lr,*u;,,1"
.* i- "
l0lm0l tl$ I@ l@ It0t0ll
tll@ .tl
4-lerr I
(rl t o t@tCIt
fi
'-"
r"':tr:Wtt
i ,a,{i ,'tff{li[J v!
| " ..
t_lrt:j
1
Should yo, har€ .ny questions on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
ECELz4 Sigital circuits and Systerns, Final Review, spring 2911
[Q11] Find:
a) *71+T+ bl x 5ql
qSLot L,r'
jg7+6 tq 03
c), uq"q5 G
-m \
@\ sb) )a'9+0{r'iib)
WT+AQ Or2
+( 53fl ^29 aff +l dl$r3)5 =3x6 + tx6'15x6
/'240.6 +l
ir( L6 +l Y'2uo'2+r \
R
= tKQ
;L{
t3 +@
-'l 3r +tt Wb;
.^{
^21a"4+@ lnt
+r-(
6 +l ^2 u @-t +@/
' \ + +9-
,a /
-) I
,s( 3+@ r\
-_/
'(-
I +2
I
btqqil{ (wntw'CI{ttro)t 53 6 6
(rssa)r
Shogld irou have any questtons on this review, please contact Arash. [aTabibiazar@uwaterloo.ca]
gcg124 sigital circuits and Systems, Final R.eview, Spring 2911
nndawntLt( tUde
Pres6ht Ndxt State
,Stat6' 00 01 11 1.0
a .'00 00] 11 01 11
rb'., .r,ri:01r, :
11 01 01 10
C.: ':l 1 10 tr 01 10
d 10 11 10 01 10
,t
t, t I
)t{l,t 'f{^, I
:,f11 &.
"
6i '-*&l -.t.
.' ir{^*;lC
$,.q 2
o,l
ffil *#*@
tO ----*@)
ffi+t8
Q2
tt --*= t@-+6,9
t@4@
cr @YJ-Yot -*4*@
6S*-*tr1
ol
Qs @*-->
@thisreview,pleasecontactArash.[aTabibiazar@uwaterloo,ca]
ECE124 Digital circuits and Systerns, Final Review, Spring 2011
a secret key bit stream, K, into two other bit streams, X and Y has to be
[O13] Acrypto module which transforms lt works as follows: i{
iesiinea. This module must be designed as a synchronous sequential Mealy state machine.
the secret key bit stream contains'0J1" then it's replaced with
'i0(-1)'. This transform.ation reduces the number of
,1,bits in the key (wfrilfr has significant impact on subsequent processing times in elliptic curue algorithms).
However since we cannot repreient 0, 1 and -1 with a one bit output, we
use two output signals, X and Y'
Whenever a m-bit sequence of 1's is detected (where m>1), X is set to 1 for the first K='f in the sequence and
Y are set to '1'. Construct a flow table for this module.
when a K=,0' is oetected atter1t," rt6 '1' bit both X and
K : 000100011011110001101000
X : 000100010110001001011000
b,,h6
*'*
Y : 000000000100001000010000
0 +l
+
-f
Irffi
,;P
0/tl
{lri
,,'-KrxY\
ilv
XY {,i"J f
00
0a
@@
perform a race-free state assignment and complete the entire state table:
[e14] For below Mealy flow table,
b d 0 j &
O,;':: @r 6)q
b a fr) c D 0 1 $f,
c by d @ 0t, 0
d a a 6, I 1 CI
.; *
{* @* @ lransficn lf
rxdz, Fr* Ta fransft c -*P h -P a'
4b: @J:'ffi-
c @ 2b:@?t*'t*b-u6)
o-il$, I* | -* o
v ,90
Na h&vetr*niref to avoid t"rrrsafffi
frw W. 5:{f o CIr' { 61A d,ss ]FTW 1
secontactArash'[aTabibiazar@uwaterloo.ca]