in Digital Logic
3,223 views
3 votes
3 votes

A 8-bit left-shift register and a D-flip flop are connected together as shown in the figure below and they are synchronized with the same clock.

If the D-flip-flop is initially cleared, then the circuit will act as

It will work like b7xor 0    b6 xorb5      b4 xorb3    b2xorb1 ???????

please give explain 

in Digital Logic
3.2k views

2 Answers

2 votes
2 votes

The output of XOR gate is z=bi+1⊕bi and this shift the register to left, initially z=0.
after 1st clock z = b7⊕ 0 = b7
after 2nd clock z = b7⊕b6
after 3rd clock z = b6⊕b5
after 4th clock z = b5⊕b4
So it will work as Binary to Gray Converter.

1 comment

But how? Aren't same bits are getting XORed?
0
0
0 votes
0 votes
Answer is  Binary to Gray code.

The D flip flop creates delay of one clock cycle, since the D flip flop is clear initially the 0 XOR b7 will take place of b1 with left shift at same time.

Now the one cycle is completed and D flip flop will give result of previous operation that is b7 (coz in D --> Qn+1 = D) and at this point b6 will be entering D flip flop and one of the input of XOR gate and we have b7 XOR b6 . After that it is easy to understand why it is binary to Gray code.