MEG 202 · Basic Software Engineering
Our notes
2 min readThe von Neumann architecture
Almost all general-purpose computers follow the stored-program design described by John von Neumann (1945):
- A CPU (control unit + ALU + registers).
- A single memory holding both instructions and data.
- Input and output devices.
- Buses connecting them.
Instructions are fetched from memory one after another unless a jump changes the order. The single path between CPU and memory limits speed: the von Neumann bottleneck. The Harvard architecture uses separate memories for instructions and data (common in microcontrollers and DSPs).
The CPU
- ALU: performs arithmetic (add, subtract) and logic (AND, OR, NOT, compare).
- Control unit: decodes instructions and sends control signals.
- Registers: tiny, very fast storage: the program counter (PC) (address of the next instruction), the instruction register (IR), the memory address register (MAR), the memory data register (MDR), the accumulator and general-purpose registers, and a status (flags) register (zero, carry, overflow, negative).
- Clock: sets the pace; speed in GHz (billions of cycles per second).
The fetch-decode-execute cycle
- Fetch: PC → MAR; the instruction at that address comes to the MDR and then the IR; PC increases to point to the next instruction.
- Decode: the control unit works out the operation and operands.
- Execute: the ALU computes, data moves, or the PC changes (for a jump).
- Repeat.
Modern CPUs pipeline this (fetch the next instruction while executing the current one) and execute several instructions at once.
Buses
- Address bus: carries memory addresses (one-way, CPU to memory). Its width sets how much memory can be addressed: 32 bits → 2³² = about 4.3 billion locations.
- Data bus: carries data (two-way); its width is the word size (32 or 64 bits).
- Control bus: carries signals (read, write, clock, interrupt).
The memory hierarchy
| Level | Speed | Size | Cost per byte |
|---|---|---|---|
| Registers | fastest | bytes | highest |
| Cache (L1, L2, L3) | very fast | KB to MB | high |
| Main memory (RAM) | fast | GB | moderate |
| Secondary storage (SSD, HDD) | slow | hundreds of GB to TB | low |
| Archive (tape, cloud) | slowest | very large | lowest |
Cache works because programs reuse nearby data and instructions (locality of reference).
Instruction sets
- CISC (complex instruction set, such as x86 in most PCs): many complex instructions.
- RISC (reduced instruction set, such as ARM in phones and many embedded chips): few simple instructions, each fast.
Performance
Depends on clock speed, instructions per cycle, number of cores, cache size, memory speed and software. A higher GHz figure alone does not mean a faster computer.
Exams usually ask
- Draw and explain the von Neumann architecture.
- Describe the fetch-decode-execute cycle with the registers involved.
- Explain the memory hierarchy and why cache improves speed.
Common mistake
Thinking RAM keeps data when the power is off. RAM is volatile; files must be saved to secondary storage.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Best pick Introduction to Computer Science, 5.1 Computer Systems Organization
(opens openstax.org in a new tab)
OpenStax, Introduction to Computer Science, 5.1 Computer Systems Organization, CC BY-NC-SA 4.0 · licence
-
Introduction to Computer Science, 5.6 Processor Architectures
(opens openstax.org in a new tab)
OpenStax, Introduction to Computer Science, 5.6 Processor Architectures, CC BY-NC-SA 4.0 · licence
-
Von Neumann architecture
(opens en.wikipedia.org in a new tab)
Wikipedia, Von Neumann architecture, CC BY-SA 4.0 · licence
-
Central processing unit
(opens en.wikipedia.org in a new tab)
Wikipedia, Central processing unit, CC BY-SA 4.0 · licence
-
NOUN CIT 317: Computer Architecture and Organization
NOUN course book (PDF, about 2.7 MB). Processor, memory and number representation.
(opens nou.edu.ng in a new tab)
-
OpenStax, Introduction to Computer Science (whole free textbook)
The whole book, free to read online or download as a PDF (the PDF is large: Wi-Fi).
(opens openstax.org in a new tab)
OpenStax, OpenStax, Introduction to Computer Science (whole free textbook), CC BY-NC-SA 4.0 · licence
Watch
-
Introduction to Computer Organization and Architecture (COA)
7 min · ≈ 32 MB · about ₦18
(opens youtube.com in a new tab)
-
Intro to Computer Architecture
4 min · ≈ 18 MB · about ₦10
(opens youtube.com in a new tab)
-
CPT 301: Computer Organization and Architecture - Introductory Lecture
29 min · ≈ 131 MB · about ₦74
(opens youtube.com in a new tab)
-
COA | Introduction to Computer Organisation & Architecture | Bharat Acharya Education
24 min · ≈ 108 MB · about ₦61
(opens youtube.com in a new tab)
-
Lecture -1 Introduction to Computer Architecture
53 min · ≈ 239 MB · about ₦134
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.