Registers: T flip-flops
Register with T flip-flops: for simplicity, implement with 2 flip-flops
How does T flip-flop hold the value?
T = 0
How does it load?
T = 1 toggles
If (x != Q), then toggle
MUX input 1:
T = x XOR Q
What other operations could we do?
Shift is simply another form of load!
Input is from current state, rather than external
Shift left: load bit i with value of bit (i-1)
Shift right: load bit i with value of bit (i+1)
Can add more control bits to select shift operations as well as regular load
Change MUX to 4-1:
control operation
00 hold
01 parallel load
10 shift left logical 1 bit
11 shift right logical 1 bit