Learning Rooms/□ Level 4 · Systems Engineer/Computer architecture
8-bit CPU control logic: Part 1
Ben Eater · Length: see YouTube · captions on YouTube · nothing loads until you press play
By the end you can…
- Describe fetch, decode and execute as register transfers.
- List the control signals asserted in each step of an instruction.
- Explain microcode as a table of control signals stored in memory.
Watch it all: no segment has been checked by hand for this video yet.
1.Predict before you press play
During the fetch step, which transfer happens?
Pick one before you press play. A wrong guess is fine: it is what makes the video stick.
2.See the idea first
Play with this diagram for a minute. It gives you something to hang the video on.
Loading the interactive…
Can't use the diagram? Read a description instead
Stepping 'Double twice', every instruction starts with fetch (rom_read, ir_load: IR ← ROM[PC]) and decode (pc_inc: PC ← PC + 1). Execute differs: LOAD asserts ram_read, alu_pass, a_load, flags_load; ADD asserts ram_read, alu_add, a_load, flags_load; STORE asserts ram_write; HALT asserts halt.
3.Watch, actively
On a real breadboard computer, works out which control signals must be on during each step of fetch and execute: register-transfer design you can touch.
Length: see YouTube · captions on YouTube · source
Nothing loads from YouTube until you press play.
Watch for…
- → Watch for the table of steps and which control lines are on in each step: it is the same table you are building from the stepper.
Pause whenever you like. Rewatching a hard minute is a good habit, not a failure.
Can't stream it? Read the idea instead
Each instruction is carried out as a few small steps, and in each step the control unit switches on exactly the signals that move data between registers and the bus. Fetch is the same for every instruction; execute differs. The control unit is a state machine stepping through that table.
What the video covers (our own note, written when we verified it): On a real breadboard computer, works out which control signals must be on during each step of fetch and execute: register-transfer design you can touch.
Written by Tactiverge in our own words, not a transcript. The full lesson below explains the idea without the video.
Read it instead
- Lesson: The control unit is a state machine · The full lesson explains the idea in text, worked examples and diagrams, with no video needed.
- Engineering Atlas: Register-transfer-level design · Chip designers write processors as register transfers in languages like Verilog before any transistor is laid out.
- Field Guide: Multiplexer · A short reference entry on the same idea.
Jot down one thing that surprised you and one question you still have.
4.Practise what you just saw
These come from the lesson that use this video and are checked on the server. Wrong answers get a hint and another try.
Practice 1
A microcoded machine has 16 opcodes, 4 steps per instruction and a 12-bit control word. How many bits of microcode ROM?
Practice 2 · a fresh version every time
An 8-bit register R starts at 238. Each clock edge performs R ← (R + 25) mod 256. What does R hold after 4 cycles?
Practice 3
During JNZ's execute step with Z = 1, what happens?
Practice 4
In the stepper's model, what does the decode step change?
5.Try it yourself
No simulation models this idea yet. The lesson below has an interactive diagram instead.
6.Where engineers use it
Modern x86 processors still contain microcode for complex instructions, and vendors ship microcode updates to fix bugs found after chips are manufactured.
From the applied view in the lesson The control unit is a state machine. Checked by automated tests only.
7.Build something with it
Follow-up project
Write the full control table (opcode × step → signals) for the five Nibble instructions. Then add a new instruction of your choice and the rows it needs.
Where this video lives
- The control unit is a state machine · Level 4, week 26
In the course catalogue: ARCH-420 Processor design
The video is by Ben Eater, embedded from YouTube with privacy-enhanced mode and never autoplayed. The room around it (prompts, notes, practice, projects) is Tactiverge's, written with AI assistance and checked by automated tests only.