Skip to content
DLVSDigital Logic Visualizing System

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

Processor (CPU)InputControl unitALURegistersMemoryOutput
Instruction cycle

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

Bit

One flip-flop holds one bit, 0 or 1.

Register

A row of flip-flops sharing a clock holds a word: here 4 bits.

Memory

Many registers, each with an address. A decoder switches on one of them.

Address (3 bits)
Data in (4 bits)
0
Read D3
1
Read D2
0
Read D1
1
Read D0
AddressWordDecimal
00001015
001110012
01000000
01110019
10000000
10100000
11000113
111111115
Words × bits8 × 4
Capacity32 bits
Bytes4

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.