Docsity

Solved Problems for Homework 3 - Logic Design | EE 120A, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
CS/EE 120A – Homework #3
Summer 1 2002. Prof. Hwang
Given July 19, 2002. Due July 25, 2002 at the beginning of class.
1. Complete the timing diagram below based on the following loop-back circuit. The numbers
inside each gate denote the delay time in ns. For each signal change, draw an arrow from the
cause of the signal change to the resulting signal change and the amount of time between the
two events. (5)
4
4
6
6
R
E
S
Q
Q'
S
R
Q
Q'
E
Answer
S
R
Q
Q'
E
10 4 10 410 10 10 10 4444
pf3
pf4
pf5
pf8

Partial preview of the text

Download Solved Problems for Homework 3 - Logic Design | EE 120A and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

CS/EE 120A – Homework

Summer 1 2002. Prof. Hwang

Given July 19, 2002. Due July 25, 2002 at the beginning of class.

1. Complete the timing diagram below based on the following loop-back circuit. The numbers

inside each gate denote the delay time in ns. For each signal change, draw an arrow from the

cause of the signal change to the resulting signal change and the amount of time between the

two events. (5)

R

E

S

Q

Q'

S

R

Q

Q'

E

Answer

S

R

Q

Q'

E

  1. Analyze the following FSM circuit by constructing the next-state/output table and state diagram. (5)

Clk

D 0

Q' 0

Q 0

Clk

D 1

Q' 1

Q 1

Clk

D 2

Q' 2

Q 2

A

Clk

B

X

Y

Answer Excitation equations:

D 2 = Q 1 A' + Q 2 Q 0 B D 1 = Q 0 'A + Q 2 B' + Q 1 'B D 0 = Q 2 'Q 1 'Q 0 '

Output equations:

X = ( Q 2 ' ⊕ Q 1 ) Q 0 = Q 2 'Q 1 'Q 0 + Q 2 Q 1 Q 0 Y = Q 1 ' + Q 0

000 /

001 /

010 /

011 /

100 /

101 /

110 /

111 /

00

00, 10 01, 11 01, 10, 11

10, 11

10, 11

00, 01

00, 01

00, 10 xx

01, 11

00

10, 11

00 01, 11

01

10

  1. Derive two FSMs based on the following state diagram. Use only D flip-flops for one and only SR flip-flops for the other. Show all your work including the next-state/output table, implementation table, next-state functions, output functions, and final complete circuit. Use K-maps when necessary to reduce equations to standard form. Determine which FSM is smaller in terms of the number of 2-input gates. Assume that the D and SR flip-flops are the same size. (5)

000 011

100 010

AB =

AB =10 AB =

AB =

AB =

AB =00^ AB =

Answer Next-state table:

Next State Q 2 next Q 1 next Q 0 next

Current State AB Q 2 Q 1 Q 0 00 01 10 11 0 0 0 011 100 (^) ××× ××× 0 0 1 (^) ××× ××× ××× ××× 0 1 0 (^) ××× ××× 100 ××× 0 1 1 (^) ××× 010 ××× 100 1 0 0 (^000) ××× ××× 011 1 0 1 (^) ××× ××× ××× ××× 1 1 0 (^) ××× ××× ××× ××× 1 1 1 (^) ××× ××× ××× ×××

Implementation table using SR flip-flops:

Next State S 2 R 2 S 1 R 1 S 0 R 0

Current State AB Q 2 Q 1 Q 0 00 01 10 11 0 0 0 (^0) ×1010 100× 0 × ×××××× ×××××× 0 0 1 (^) ×××××× ×××××× ×××××× ×××××× 0 1 0 (^) ×××××× ×××××× 10010 × ×××××× 0 1 1 (^) ×××××× 0 ×× (^001) ×××××× 100101 1 0 0 (^010) × 0 × ×××××× ×××××× 011010 1 0 1 (^) ×××××× ×××××× ×××××× ×××××× 1 1 0 (^) ×××××× ×××××× ×××××× ×××××× 1 1 1 (^) ×××××× ×××××× ×××××× ××××××

Q 1 Q 0

AB Q 2 = 1

Q 2 = 0

S 2

× ×

× × ×

×

×

×

× ×

× × ×

× × × ×

× × × × × ×

×

×

Q 1 Q 0

AB Q 2 = 1

Q 2 = 0

R 2

× ×

× × ×

×

×

×

× ×

× × ×

× × × ×

× × × × × ×

×

×

×

S 2 = Q 2 'A + Q 1 'B R 2 = Q 2

Q 1 Q 0

AB Q 2 = 1

Q 2 = 0

S 1

× ×

× × ×

×

×

×

× ×

× × ×

× × × ×

× × × × × ×

×

×

×

Q 1 Q 0

AB Q 2 = 1

Q 2 = 0

R 1

× ×

× × ×

×

×

×

× ×

× × ×

× × × ×

× × × × × ×

×

×

× ×

S 1 = Q 2 'A'B' + Q 2 A R 1 = Q 2 'A

Q 1 Q 0

AB Q 2 = 1

Q 2 = 0

S 0

× ×

× × ×

×

×

×

× ×

× × ×

× × × ×

× × × × × ×

×

×

Q 1 Q 0

AB Q 2 = 1

Q 2 = 0

R 0

× ×

× × ×

×

×

×

× ×

× × ×

× × × ×

× × × × × ×

×

×

× ×

×

S 0 = S 1 R 0 = Q 0

A

Clk

Clk

S 2

R 2 Q' 2

Q 2

Clk

S 1

R 1 Q' 1

Q 1

Clk

S 0

R 0 Q' 0

Q 0

B

equivalent to 7 2-input gates.

Using SR flip-flops requires two fewer 2-input gates.