Hi
I'm supposed to design a 2 bit binary counter with an extra input, x, to decide whether it should count up or down (x=1 counts up). The design uses two D-flip-flops.
To help I got a couple of truth tables to fill in. The first is for both flip-flops, D1 and D2. Then this one is split to two separate tables, for each flip-flop.
q1 is the output of the D1 flip-flop and so forth.
This is how I filled the tables:
When I collect the ones to make the boolean functions, I get:
But D2 equals 1, so I must have made an error somewhere. Please help.
I'm supposed to design a 2 bit binary counter with an extra input, x, to decide whether it should count up or down (x=1 counts up). The design uses two D-flip-flops.
To help I got a couple of truth tables to fill in. The first is for both flip-flops, D1 and D2. Then this one is split to two separate tables, for each flip-flop.
q1 is the output of the D1 flip-flop and so forth.
This is how I filled the tables:
Rich (BB code):
q1q2|x=0|x=1
____|___|___
00 | 11|01
____|___|___
01 | 00|10
____|___|___
11 | 10|00
____|___|___
10 | 01|11
____|___|___
D1 D2
q1q2|x=0|x=1
____|___|___
00 | 1| 1
____|___|___
01 | 0| 0
____|___|___
11 | 0| 0
____|___|___
10 | 1| 1
____|___|___
D1
q1q2|x=0|x=1
____|___|___
00 | 1 |0
____|___|___
01 | 0 |1
____|___|___
11 | 1 |0
____|___|___
10 | 0 |1
____|___|___
D2
Rich (BB code):
D1 = q1' + q2'
D2 = x'q1'q2' + xq1'q2 + x'q1q2 + xq1q2'