The notes for Computing Machinery - Basic Computer Architectures

Basic Computer Architectures


Control Unit (CU)

Directs the execution of instructions

  1. Loads an Operation Code (opcode) from memory (RAM) into an instruction register.
  2. Decodes opcode to ideantify the operation.
  3. If necessary, transfers data between memory and registers.
  4. If necessary, directs the ALU to manipulate data in registers.

Arithmetic Logic Unit (ALU)

Performs arithemtic and logical operations on data stored in registers.

  • E.g. Add numebers stored in 2 source registers, and store the result in a destination register.
  • E.g. Do a bitwise AND using data in 2 registers

Internal Registers

Binary Storage Units within the CPU

  • May Contain:

    • data
    • addresses
    • instructions
    • status information
  • E.g. The Program Counter (PC) contains the address in aRAM of the current instruction

    • Is incremented to perform the next instruction
  • E.g. The Status Register (SR) contains information about the result of the previous instruction
    • i.e. Overflow, or Carry

  • Basic CPU Architectures
    • Stack Machines
    • Accumulator Machines
    • Load / Store Machines

Stack Machines

//Pic Here

  • Operands for an instruction are poped from the top of stack
  • Results are pushed onto the top of the stack
  • Memory can be loaded through the MDR to the top of the stack, and vice versa

Accumulator Machines

//Pic Here

  • Operands for instruction come from the ACC and from a single location in RAM
  • Results are put into the ACC
  • The ACC can be loaded or stored to or from memory

Load / Store Machines

// Pic Here

  • Most instructions operate on Registers. not RAM
    • Registers are more quikckly accessed then RAM
  • Typical sequence
    • Load Registers from memory
    • Execute an instruction using towo source registears, putting the result into a destination register
    • Store the result back into memory

Instruction Cycle

  • Also called the fetch-execute or fetch-decode-execute cycle
  • The CPU executes each instruction in a series of small steps
    1. Fetch the next instruction from memory into the Instruction Registers(IR)
      • Programs Counter(PC) contains its address in RAM
    2. Increment PC to point to the next instruction
    3. Decode the instruction

System Clock

  • Generates a Clock Signal to Synchronize the CPU and other clocked devices
  • Typical rate: 1 GHz

Random Access Memory (RAM)

  • Acts as Primary Memory for computer
    • can read from and written to
    • Is VOLATILE (data disappears when power off)
    • Is used to store program instructions and program input, output, and temporary (scratch) values
  • Consists of a sequence of addressable memory locations
    • Each location is typically ONE BYTE LONG
      // Pic Here
  • Typical Size: 2 GB
  • In a Von Neumann Architecture, RAM contains both data and programs (instructions)
    • A Harvard Architecture uses seperate memories for data & programs


  • Is a set of parallel data / signal lines
  • Is used tO transfer information between computer components
  • Often Subdivided into address, data & control busses
    // Pic Here
  1. Address Bus:
    • Specofoes a memory location in RAM, or a memory maped I/O device
    • Typical Size: 32 bits
  2. Data Bus:
    • Used for bidirectional data transfer
    • Typical Size: 32bits
  3. Control Bus:
    • Used to control or monitor devices connected to the bus
      • E.g. read/write signal for RAM
  4. An expansion bus may be connected to the computer’s local bus
    • Makes it easy to connect additonal I/O devices to the computer
    • Example bus Standards: SCSI \ Firewire

Secondary Memory

  • Is Non-Volatile, read/ write memory
  • Usedf for semi-permanent storage of data and programs
  • Usually hard disk drives are used fo secondary storage

Peripheral Devices

  • Allow communication between the computer and external environment
  • Input Devices
    • Keyboard
    • Pointing devices: mouse, trackball, joystick, etc.
    • Microphone
    • Scanner
  • Output Devices
    • Monitor
    • Printer
    • Speakers
  • I/O Devices
    • Hard Disk Drive (Typical Size: 400 GB)
    • Optical Storage devices (CD-RW, DVD-RW)
    • Modem
    • Connections to networks

To be continued…