Computer Architecture

What Is a Computer?; Machine Cycle: Fetch–Decode–Execute; CPU Organization

C-CAT

What Is a Computer?

A computer is an electronic machine that performs tasks by executing a stored sequence of instructions. At the architectural level, the central idea is simple: fetch an instruction, decode it, execute it and repeat until the program halts or an interrupt redirects control.

Modern computers are built from:

BlockRole
CPUExecutes instructions, performs arithmetic/logic
MemoryStores programs and data
I/OCommunicates with humans and other systems
BusesConnect CPU, memory and I/O

Understanding architecture means understanding how these blocks cooperate in time (cycles, pipelining, interrupts) and how data is stored (RAM, ROM, cache, auxiliary stores).

Machine Cycle: Fetch–Decode–Execute

Every instruction passes through a machine cycle (also called the instruction cycle). The classic three phases taught in standard textbooks are:

┌─────────┐ ┌─────────┐ ┌──────────┐
│ FETCH │───▶│ DECODE │───▶│ EXECUTE │───▶ (next instruction)
└─────────┘ └─────────┘ └──────────┘

2.1 Fetch

  • The Program Counter (PC) holds the address of the next instruction.
  • That address is placed in the MAR (Memory Address Register).
  • The memory returns the instruction opcode/operands via MDR into the CIR (Current Instruction Register).
  • PC is incremented (or updated by branch) to point to the following instruction.

2.2 Decode

  • The Control Unit (CU) interprets the opcode in CIR.
  • Control signals are generated to select ALU operation, register paths and memory/I/O access.

2.3 Execute

  • The operation runs: e.g. ADD places result in Accumulator (AC), STORE writes AC to memory, JMP loads PC.

2.4 Worked Timeline (Conceptual)

Suppose memory contains:

AddressContentMeaning
2001LOAD ALoad operand A
2002LOAD BLoad operand B
2003ADDAdd A + B
2004STORE CStore sum to C

Cycle 1: PC=2001 → Fetch LOAD A → Decode → Execute (A loaded to AC). Cycle 2: PC=2002 → Fetch LOAD B → Execute (B in register). Cycle 3: PC=2003 → ADD → result in AC. Cycle 4: PC=2004 → STORE → memory[C] updated.

This sequential story is exactly what non-pipelined machines do: one full cycle completes before the next instruction begins.

CPU Organization

Computer architecture design consists of:

  • Control Unit (CU)
  • Arithmetic and Logic Unit (ALU)
  • Memory Unit (conceptually; physically separate chips)
  • Registers
  • Input/Output devices

The CPU (Central Processing Unit) is the electronic circuit that executes program instructions. It is often called the microprocessor or processor when implemented on a single chip.

 ┌──────────────────────────────────────┐
 │ CPU │
 │ ┌────┐ ┌────┐ ┌──────────────┐ │
 │ │ CU │───│ALU │───│ Registers │ │
 │ └────┘ └────┘ └──────────────┘ │
 └───────────┬────────────┬─────────────┘
 │ Address │ Data
 │ Control │
 ┌───────────▼────────────▼─────────────┐
 │ Memory / I/O │
 └──────────────────────────────────────┘

Continue learning

Related notes

Put this topic into timed practice

Open mock tests when you want full-exam pacing, or keep drilling in practice mode.