loading...

CS302 Assignment No 4 Spring 2012 solution

 

Q1  State diagram of a Moore machine is given below; draw the next state table of this Moore machine (starting from state 101).

 

Present State                                                                Next State

Q2 Q1 Q0                                                                     Q2 Q1 Q0
101                                                                             100

100                                                                                   001

0 0 1                                                                                010

010                                                                                  101

This is the table of Next-State Table for a 3-bit Up-Counter

Solution:

Present state Next state
Q2 Q1 Q0 Q2 Q1 Q0
1 0 1 1 0 0
1 0 0 0 0 1
0 0 1 0 1 0
0 1 0 1 0 1

 

 

 

 

Q2 Give the input tables for both 4 bit up counter and 4 bit down counter consisting of D type flip flops.

Up Counter

Present state Next state  X=0 D flip-flop inputs
Q3 Q2 Q1 Q0 Q3 Q2 Q1 Q0 D3 D2 D1 D0
0 0 0 0 0 0 0 1 0 0 0 1
0 0 0 1 0 0 1 0 0 0 1 0
0 0 1 0 0 0 1 1 0 0 1 1
0 0 1 1 0 1 0 0 0 1 0 0
0 1 0 0 0 1 0 1 0 1 0 1
0 1 0 1 0 1 1 0 0 1 1 0
0 1 1 0 0 1 1 1 0 1 1 1
0 1 1 1 1 0 0 0 1 0 0 0
1 0 0 0 1 0 0 1 1 0 0 1
1 0 0 1 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 1 1 0 1 1
1 0 1 1 1 1 0 0 1 1 0 0
1 1 0 0 1 1 0 1 1 1 0 1
1 1 0 1 1 1 1 0 1 1 1 0
1 1 1 0 1 1 1 1 1 1 1 1
1 1 1 1 0 0 0 0 0 0 0 0

Down Counter

Present state Next state X=1 D flip-flop inputs
Q3 Q2 Q1 Q0 Q3 Q2 Q1 Q0 D3 D2 D1 D0
0 0 0 0 1 1 1 1 1 1 1 1
0 0 0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 1 0 0 0 1
0 0 1 1 0 0 1 0 0 0 1 0
0 1 0 0 0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 0 0 1 0 0
0 1 1 0 0 1 0 1 0 1 0 1
0 1 1 1 0 1 1 0 0 1 1 0
1 0 0 0 0 1 1 1 0 1 1 1
1 0 0 1 1 0 0 0 1 0 0 0
1 0 1 0 1 0 0 1 1 0 0 1
1 0 1 1 1 0 1 0 1 0 1 0
1 1 0 0 1 0 1 1 1 0 1 1
1 1 0 1 1 1 0 0 1 1 0 0
1 1 1 0 1 1 0 1 1 1 0 1
1 1 1 1 1 1 1 0 1 1 1 0
DOWNLOAD SOLUTION HERE
loading...