Status: Tags: Links: Flip Flops - Nand2Tetris Project 3
Bit Register
Notes
if load (t-1) then out(t)=in(t-1) else out(t)=out(t-1)
- Only changes output when load is 1
- Uses a DFF and mux with the output being refed into the mux
- Can be expanded, with w=word width
Code
|
|
Example Truth Table
| time | in | load | out |
|---|---|---|---|
| 0+ | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 |
| 1+ | 0 | 1 | 0 |
| 2 | 0 | 1 | 0 |
| 2+ | -32123 | 0 | 0 |
| 3 | -32123 | 0 | 0 |
| 3+ | 11111 | 0 | 0 |
| 4 | 11111 | 0 | 0 |
| 4+ | -32123 | 1 | 0 |
| 5 | -32123 | 1 | -32123 |
| 5+ | -32123 | 1 | -32123 |
| 6 | -32123 | 1 | -32123 |
| 6+ | -32123 | 0 | -32123 |
| 7 | -32123 | 0 | -32123 |
| 7+ | 12345 | 1 | -32123 |
| 8 | 12345 | 1 | 12345 |
| 8+ | 0 | 0 | 12345 |
| 9 | 0 | 0 | 12345 |
| 9+ | 0 | 1 | 12345 |
| 10 | 0 | 1 | 0 |
Terms
Register State - the current state stored in the register
References: