Computer architecture: Digital CPU design lecture 5a Charles Fox University of Lincoln
Overview
Charles Fox explains how classical CPU components work together to execute programs, from assembly language and machine-code instructions through the fetch, decode, execute cycle. Using the Manchester Baby, Babbage’s Analytical Engine, and the 6502 as historical reference points, he connects program counters, registers, an arithmetic logic unit, and a clocked control sequencer to the digital logic that implements them.
Key takeaways
- A CPU repeatedly fetches an instruction using the program counter, decodes its opcode, executes it, and normally increments the program counter to reach the next instruction.
- Machine code encodes both an operation and its operand; in Charles Fox’s example, two opcode bits choose among load, store, add, and branch.
- Registers store words inside the CPU, and a register can be constructed from one D-type flip-flop per bit with a shared update signal.
- An ALU combines arithmetic circuits and uses decoder and multiplexer logic to select an operation and route its result; status flags can report overflow or division by zero.
- A clocked counter and decoder form a sequencer: the counter tracks the current step, while the decoder activates the corresponding control signal.
- Classical CPU concepts appear in both Babbage’s mechanical designs and modern digital systems, even though the components differ from gears and punch cards to flip-flops and electrical buses.
Chapters
- A CPU runs instructions in series, unlike a GPU that performs many operations in parallel.
- The lecture assembles digital-logic components into a CPU and uses the Manchester Baby and 1980s 6502 as examples.
- Classical architectures provide a foundation for understanding how modern CPUs differ from earlier designs.
- A compiler translates high-level code such as C into assembly, where each line specifies a simple operation such as loading, adding, or storing.
- An assembler turns assembly instructions into executable patterns of zeros and ones, with each instruction corresponding to machine code.
- Charles Fox uses Alan Turing’s Manchester Baby test programs to illustrate machine instructions and a short Python assembler.
- Assembly remains useful for performance-sensitive work; Fox discusses NVIDIA GPU PTX and cites DeepSeek as an example of renewed interest in low-level programming.
- A machine-code word encodes an operation and its operand, much like a row of punch-card holes encodes an instruction.
- In Fox’s simple example, the first two bits select one of four opcodes: load, store, add, or branch.
- The program counter tracks the current instruction address, analogous to the position of a punch-card deck as it moves through a machine.
- During fetch, the CPU copies the instruction at the program counter’s address into the instruction register.
- During decode, the opcode is interpreted; during execute, the selected operation acts on data or memory.
- The example loads the value 3 from address 50, adds the value 2 from address 51, and stores the result, 5, back to address 50.
- After a normal instruction, the program counter increments; branch instructions can change the next address instead.
- A register stores one word inside the CPU; the program counter and instruction register support CPU operation, while the accumulator holds programmer-visible data in the example.
- Harvard architecture separates program and data memories, while von Neumann architecture treats them as one memory space.
- An 8-bit machine typically uses 8-bit registers, memory words, and data paths, although real architectures can mix widths.
- A register can be built from D-type flip-flops, with one flip-flop storing each bit and a shared update signal capturing the word.
- The arithmetic logic unit combines circuits such as adders, subtractors, multipliers, and dividers.
- In the example, two control bits select among four operations; a decoder activates a choice and a multiplexer routes its result to the output.
- An ALU can produce status flags for conditions such as arithmetic overflow or division by zero.
- The ALU’s input and result are 32-bit words in the illustrated design.
- The control unit coordinates registers and the ALU, generating the signals that carry out fetch, decode, and execute.
- A clock provides discrete ticks that let the CPU sequence operations in a defined order.
- Babbage’s Analytical Engine used a rotating barrel and pins to time and trigger mechanical actions.
- Modern digital control replaces that mechanism with logic that tracks timing and activates the required operations.
- A digital sequencer combines a counter with a decoder: a 3-bit counter cycles through eight states, and the decoder activates the corresponding output.
- The same counter-decoder pattern can sequence traffic-light states or control CPU operations.
- Charles Fox pauses the lecture at about 40:00; the remaining transcript is dominated by classroom conversation and audio checks rather than additional technical explanation.
Transcript excerpt
0:01 Welcome back to computer architecture. Today we are going inside the CPU. This is an important point in the module. So it's really important to understand today's lecture. Uh we have a reading week next week, which is a very good time for you to consolidate everything. This is where we bring together everything we've learned so far, especially these simple machines we learned about last week. But we constructed out of digital logic. We're going to put those simple machines together now to build larger structures, which together comprise a CPU, which is able to run programs. So we will talk today about what a CPU is.
0:50 Roughly it is a device that runs programs of instructions in series. That means one instruction at a time. That is distinct from a GPU, for example, which does many things at the same time in parallel. To understand a GPU, you first got to understand the CPU, cuz roughly a GPU is just a whole bunch of little tiny, very simple CPUs. So let's learn how one of them works first. Uh we'll talk about the subcomponents of a CPU. These are things like registers, arithmetic logic unit, control unit. Um we'll study that control unit in detail. That's the thing that deals with jumping around in the code. And then we'll see how it all comes together in a couple of relatively simple examples.
1:36 That's the Manchester Baby and the the 1980s 6502 8-bit processor. So everything we do today is basic or classical CPU design. Okay? This covers the standard architecture that existed all the way from 1836, the Analytical Engine, up to around 1990, which is when things started to get more complicated. Um so that that covers the baby, it covers the 6502. The The aim of lecture
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Charles Fox.