Logic Lab
Digital Computer
The parts of a digital computer, the instruction cycle, and how storage grows from a bit to a register to memory.
Block diagram of a digital computer
Tap any block, or step through the instruction cycle, to see what each part does and which parts are busy.
A digital computer works with signals that are either on or off, so everything inside it (numbers, text, instructions) is stored as binary. Two levels are easy to tell apart and very reliable, which is why the rest of this course builds gates, adders and flip-flops that work on 0s and 1s.
Storage: from one bit to memory
One flip-flop holds one bit, 0 or 1.
A row of flip-flops sharing a clock holds a word: here 4 bits.
Many registers, each with an address. A decoder switches on one of them.
| Address | Word | Decimal |
|---|---|---|
| 000 | 0101 | 5 |
| 001 | 1100 | 12 |
| 010 | 0000 | 0 |
| 011 | 1001 | 9 |
| 100 | 0000 | 0 |
| 101 | 0000 | 0 |
| 110 | 0011 | 3 |
| 111 | 1111 | 15 |
Set the address switches (or tap a row), set the data switches and press Write to store a word. The lamps always read the word at the chosen address. A real memory does the same with a 3-to-8 decoder that switches on one register, so 3 address bits reach 2³ = 8 words.