Computer Architecture
Learn it by playing
Answer these questions to earn energy, then fish and explore. No account needed.
Notes
CPU & Microprocessors
- The **CPU** (Central Processing Unit) is the brain of the computer; its purpose is to **fetch**, **decode**, and **execute** instructions.
- A **microprocessor** is a single-chip integrated circuit that contains the CPU and may also include memory controllers and I/O interfaces.
- The CPU processes data by taking input, executing instructions, and producing output.
Von Neumann Architecture
- Proposed by John Von Neumann in the 1940s; most general-purpose computers are based on this design.
- Key components: **Control Unit (CU)**, **Arithmetic Logic Unit (ALU)**, and **registers**.
- **ALU** performs arithmetic operations (e.g., ADD) and logical decisions (e.g., IF X > 5).
- **CU** coordinates data movement and decodes instructions fetched from memory.
- Registers are extremely small, fast memory inside the CPU; each has a specific purpose.
- Five main registers: **PC**, **MAR**, **MDR**, **CIR**, **ACC**.
- **PC** (Program Counter) holds the address of the next instruction to be executed; increments by 1 each cycle.
- **MAR** (Memory Address Register) holds the address of data/instruction to be fetched from memory.
- **MDR** (Memory Data Register) stores data/instruction fetched from memory.
- **CIR** (Current Instruction Register) stores the instruction currently being decoded/executed.
- **ACC** (Accumulator) stores results of calculations from the ALU.
Buses
- A **bus** is a set of parallel wires connecting components; transmits data/signals.
- **Address bus** – unidirectional; carries memory addresses (locations).
- **Data bus** – bidirectional; carries data or instructions.
- **Control bus** – bidirectional; carries commands/control signals (e.g., read/write).
Fetch-Decode-Execute Cycle
- The CPU repeats the **fetch-decode-execute** cycle billions of times per second.
- **Fetch**: PC address → MAR → address bus → memory → data bus → MDR → CIR; PC increments.
- **Decode**: CU splits instruction into **opcode** (what to do) and **operand** (data/address).
- **Execute**: CPU carries out the instruction (e.g., calculation, store result, fetch new data).
- The cycle then repeats with the next instruction.
Characteristics of the CPU
- **Clock speed** – measured in Hz (GHz); number of FDE cycles per second. Higher speed = more instructions per second.
- **Cache size** – small, fast memory on/near CPU; stores frequently used instructions/data. Larger cache reduces fetches from RAM, improving speed.
- **Number of cores** – each core is an independent processing unit. Multi-core CPUs can execute multiple instructions simultaneously (parallel processing).
- Example: Quad-core at 3 GHz can process up to 12 billion instructions per second.
CPU Instruction Sets
- An **instruction set** is the list of all commands a CPU can execute; each command has a binary **machine code**.
- Instructions have a **mnemonic** (e.g., ADD, SUB, LDA, STA, HLT) and a binary code.
- After decoding, the CPU matches the instruction to its set to know the operation.
- Instruction sets are **machine-specific**; a program for one CPU (e.g., Intel) won't run on another (e.g., ARM).
Embedded Systems
- An **embedded system** is a computer system dedicated to a single function inside a larger mechanical unit.
- Examples: washing machines, car engine management systems, traffic lights, heating thermostats.
- Properties: small size, low power consumption, low cost.
- They are not general-purpose computers; they have a microprocessor and perform a specific task.
Von Neumann architecture showing CPU, memory, input/output, and buses.
Fetch stage of the FDE cycle: address flows from PC to MAR to memory; instruction returns via data bus to MDR and CIR.
CPU characteristics: clock speed, cache size, and number of cores affect performance.
Practice questions
Free preview — 8 of 40 questions. Sign up to see them all.
1.What is the purpose of the Central Processing Unit (CPU)?
Easy- ATo fetch, decode and execute instructions
- BTo store data permanently
- CTo manage input and output devices only
- DTo provide a user interface
2.Which component of the Von Neumann architecture performs arithmetic operations and logical decisions?
Easy- AControl Unit (CU)
- BArithmetic Logic Unit (ALU)
- CMemory Address Register (MAR)
- DAccumulator (ACC)
3.During the fetch stage of the fetch-decode-execute cycle, what happens to the Program Counter (PC)?
Medium- AIt is decremented by 1
- BIt is incremented by 1
- CIt is reset to zero
- DIt remains unchanged
4.Which register holds the memory address of the next instruction to be fetched?
Medium- AMemory Address Register (MAR)
- BProgram Counter (PC)
- CMemory Data Register (MDR)
- DCurrent Instruction Register (CIR)
5.Which bus is unidirectional and carries only memory addresses?
Hard- AData bus
- BControl bus
- CAddress bus
- DSystem bus
6.What is the role of the control unit during the fetch stage?
Medium- AIt sends a signal on the control bus to start a read operation
- BIt places the instruction on the data bus
- CIt increments the Program Counter
- DIt stores the fetched instruction in the CIR
7.A computer has a quad-core processor running at 3 GHz. How many instructions can it theoretically execute per second?
Hard- A3 billion
- B12 billion
- C4 billion
- D7 billion
8.Which of the following is an example of an embedded system?
Easy- ALaptop
- BDesktop computer
- CWashing machine
- DSmartphone
Unlock all 40 questions, slides & more
Create a free account to see every question, the slides, flashcards and revision notes for this topic.
Past papers
Past-paper practice for this topic is coming soon.