0% found this document useful (0 votes)
21 views4 pages

Tut 09 Qns

tutorial 9 solutions

Uploaded by

zkyiszky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

Tut 09 Qns

tutorial 9 solutions

Uploaded by

zkyiszky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CS2100 Computer Organisation

Tutorial #9: Sequential Circuits


(Week 11: 28 October – 1 November 2024)

Discussion Questions:
D1. The state table on the right describes the state transition of a circuit
x
with 4 states A, B, C and D, an input x, and an output z. For example,
0 1
if the circuit is in state A and its input x is 0, then it moves into state C
A C/0 A/1
and generates the output 0 for z.
B D/1 B/0
(a) Complete the state diagram below. The label of the arc indicates C B/1 D/0
input/output, hence 1/1 means x=1 and z=1. D C/0 D/0

x/z
1/1
A

B C

(b) Assuming that the circuit starts in state A, find the output sequence and state sequence for the
input sequence x = 100010 (read from left to right). (x = 100010 means that initially x is 1, then
in the next clock x is 0, and so on.)

D2. Match the following state diagrams to the 4 flip-flops: JK flip-flop, D flip-flop, RS flip-flop, and T flip-
flop. Don’t-care value is indicated by “x”.
(a) (b)
1 10

0 0 1 1 0x 0 1 x0

0 01

(c) (d)
1 1x

0 0 1 0 0x 0 1 x0

1 x1

AY2024/25 Semester 1 - 1 of 4 - CS2100 Tutorial #9


Tutorial Questions
1. A four-state sequential circuit below consists of a T flip-flop and a D flip-flop. Analyze the circuit.

T Q
A
Clk
Q'
p

D Q B
Clk
Q'

Clock

(a) Complete the state table and hence draw the state diagram.
(b) Assuming that the circuit is initially at state 0, what is the final state and the outputs generated
after 3 clock cycles?
A state is called a sink if once the circuit enters this state, it never moves out of that state.
(c) How many sinks are there for this circuit?
(d) Which is likely to be an unused state in this circuit?
/p
Present state Output Flip-flop inputs Next state 0 1
A B p TA DB A+ B+
0 0
0 1
1 0
1 1 3 2

AY2024/25 Semester 1 - 2 of 4 - CS2100 Tutorial #9


2. Given the state transition diagram on the right with states AB and
input x, implement the circuit using JK flip-flops and the fewest 0
number of logic gates.
0 0
Fill in the state table below and draw the circuit. You do not need to 1 1
follow the simplest SOP expression in your implementation as that 1
might not give you a circuit with the fewest logic gates. 2 1
0
Present Next
Input Flip-flop A Flip-flop B
state state
+
A B x A B+ JA KA JB KB
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

State 3 is unused. Can you complete the following state diagram with the unused state?

0
0 0 3
1 1
1
2 1
0

A circuit is self-correcting if for some reason the circuit enters into any unused (invalid) state, it is
able to transit to a valid state after a finite number of transitions. Is your circuit self-correcting, and
why?

AY2024/25 Semester 1 - 3 of 4 - CS2100 Tutorial #9


3. [AY2018/19 Semester 2 exam]
A sequential circuit goes through the following states, whose state values are shown in decimal:

1 3 5 7 9

6 4 2 15 13 11

The states are represented by 4-bit values ABCD. Implement the sequential circuit using a D flip-flop
for A, T flip-flops for B and C, and a JK flip-flop for D.

(a) Write out the simplified SOP expressions for all the flip-flop inputs.

(b) Implement your circuit according to your simplified SOP expressions obtained in part (a).
Complete the given state diagram, by indicating the next state for each of the five unused states.

(c) Is your circuit self-correcting? Why?

0 8 10 12 14

1 3 5 7 9

6 4 2 15 13 11

4. Pokemone Theme Park offers locker rental to its visitors. Visitors may purchase two types of token:
Pokemoney $1 (P$1) and Pokemoney $2 (P$2). A locker’s rental costs P$3. When a visitor deposits
P$3 into the locker’s token slot, its door will open.
Design a sequential circuit with states AB for the locker’s door using D flip-flops. The circuit consists
of 4 states representing the amount a visitor has deposited: 0, 1, 2 and 3 (or, in binary, AB = 00, 01,
10 and 11). The visitor can deposit only one token at a time. When the circuit reaches the final state
3, it remains in state 3 even if the visitor continues to put tokens into the slot. When the circuit is in
state 2 and the visitor deposits a P$2 token, the circuit goes into state 3.
The partial state diagram is shown below. The inputs x and y represent the P$1 and P$2 tokens
respectively. The label on each arrow represents xy.
(a) Draw and write the missing arrows and labels.
00 00 00

10
00 01 10 11

(b) Write the simplified SOP expressions for the flip-flop inputs DA and DB.

AY2024/25 Semester 1 - 4 of 4 - CS2100 Tutorial #9

You might also like