CSE370 Quiz 5 (6 December)


1. Below is a data-path and a corresponding Mealy state machine for the Shell Game machine. It has three inputs (A, B, C) which are mutually exclusive (only one occurs at any one time). A pair of inputs determines which two registers will have their values exchanged. Complete the state diagram below by adding conditions and outputs for the two shaded states.



2. Given the partial state table below, write the logic equation for AtoB and AtoC. Specify the state encoding you would use if three state bits are used to represent the state.

State = [ bit1, bit2, bit3 ]

S0 = [ ___ , ___ , ___ ]
SA = [ ___ , ___ , ___ ]
SB = [ ___ , ___ , ___ ]
SC = [ ___ , ___ , ___ ]
AtoB := 
AtoC :=

inputs c.s. n.s.            outputs
A B C            AtoB AtoC BtoA BtoC CtoA CtoB

1 0 0   S0   SA    0    0    0    0    0    0
0 1 0   S0   SB    0    0    0    0    0    0
0 0 1   S0   SC    0    0    0    0    0    0

1 0 0   SA   S0    0    0    0    0    0    0
0 1 0   SA   S0    1    0    1    0    0    0
0 0 1   SA   S0    0    1    0    0    1    0


Comments to: cse370-webmaster@cs.washington.edu (Last Update: )