Fundamentals of computer organisation and architecture

Table of Contents

Author: Mrs Ellis

1 Internal hardware components of a computer

Learn It - Internal hardware components of a computer

Objective: Have an understanding and knowledge of the basic internal components of a computer system.

Internal components

The internal components of a computer normally include CPU, components within a CPU, main memory, buses and I/O controllers. The following block diagram shows how different components of a computer working together as a functional system. Computer-Components.png

Processor, ALU, Control Unit,Registers, Memory

Objective: understand the role of the following components and how they relate to each other:

  • Processor

    The processor is made up by the control unit, the arithemetic logic unit(ALU) and several registers.

  • The control unit
    • The control unit controls and coordinates all operations.
    • It works through a cycle of fetch, decode, and execution.
      • fetch operation fetches the next instruction from the main memeory
      • decode operation outputs what the ALU needs to perform on the data
      • execution operation causes the instruction to be carried out
    • The role of control unit can be summarised as below:
      • To fetch / decode / execute instructions;
      • To synchronise operation of processor;
      • To marshal/control operation of fetch-execute cycle;
      • To send control signals/commands to other components of fetch-execute cycle;
  • Registers
    • Registers are small but very fast memory to hold data before and after being processed by the CPU.
    • All ALU operations are accomplished within registers.
  • ALU

    ALU performs addition, subtraction, multiplication, division, comparison(logical ops), and bitwise operations (more later).

  • Memory
    • Memory is used to hold temporary instructions and data for manipulation while the system is running.
    • When a block of code or data that is held in memory, it is directly accessible to the CPU for manipulation.
    • Memory is organised in units called words. A word is the maximum number of bits a CPU can process in a single instruction. Typical word size are 8, 16, 32, or 64 bits.
    • Each word has its own address in the memory.

Buses - data bus, control bus and address bus

Objectives: Understand the need for, and means of, communication between components. In particular, understand the concept of a bus and how address, data and control buses are used.

Components communicate with each other using buses. A bus is a set of parallel wires connecting different coomponents. The processor is connected to the main memory by three separate buses. The three types of buses:

  • Address bus
    • Address bus is a pathway or a set of parallel wires that carries the location of the data to be read from or written to. An address bus is one directional only - from the processor to the memory or an I/O controller.
    • The number of lines for the address bus determines the maximum number of bits it can carry, and in turn determines the maximum possible memory capacity of the computer. To understand this, think if the postal office only allows 3 digits for house numbers, then the maximum addressable houses will be 999. So, if the computer has a 32-bit bus, the maximum addressable memory locations will be 232, which is 4GB, assuming each memory location stores on byte of data.
  • Data bus
    • Data bus is a bi-directional pathway or wires that carries data or instructions between computer components.
    • The width of data bus is a key factor in determining the overall computer performance. Typical data bus is 8, 16, 32 or 64 bits wide. If a computer has a word size of 32 but with a 16-bit data bus, then the data bus has to fetch the word twice from the main memory.
  • Control bus
    • Control bus is a bi-directional pathway that carries command, timing and specific status information among components. The following are some of the control information a control bus may carry:
      • write to mempry
      • read from memory
      • write to I/O port
      • read from I/O port
      • request for data bus
      • grant for data bus
      • sync clock
      • reset all components
  • I/O controllers
    • An I/O conyroller is a device (an electronic circuit board) that manages the communication between the processor and the I/O device.
    • Each I/O device has a separate controller which connects to the control bus.
    • I/O controllers receive input and output requests from the pocessor, then send device specific control signals to the device.
    • I/O controllers manage the data flow from and to the device.

The von Neumann and Harvard architectures

Objectives: Be able to explain the difference between von Neumann and Harvard architectures and describe where each is typically used.

  • von Neumann architecture and the stored program concept

    Computer pioneer John von Neumann invented a machine that would hold the instruction and the data to be processed in one single store, the main memory. All computers since then have been built on the same principle.


    • In this architecture, the CPU performs the basic computing operations (add, subtract, etc.).
    • The CPU gets its data from an external memory, and writes back the results to the memory.
    • The memory is also used to hold the program instructions, which control the processing unit and tell it how to manipulate the data.
    • The idea of keeping both the data and the instructions in the memory is the essence of the stored-program architecture.
    • von Neumann architecture used for general purpose computers.
  • Harvard architecture - physical separation of data and instructions
    • In this architecture of computers, the data and instructions are stored at two physically different memories. This separation allows some systems to have a read only instruction memory and read-write for data memory. If a system has more instructions than data, then wider address bus can be used for the instruction memory and less wide bus for the data memory.
    • Harvard architecture can be faster than von Neumann architecture because data and instructions can be fetched simultaneously.
    • Embedded systems such as digital signal processing (DSP) systems use Harvard architecture processors extensively.
    • In embedded systems, instructions may be held in read-only memory while data are held in read-write memory.
    Harvard architecture" by Nessa los - Own work. Licensed under CC BY-SA 3.0 via Commons

Understand the concept of addressable memory.

2 The stored program concept

Learn It - describe the stored program concept

The stored program concept has the following properties:

  1. A machine has the instructions and data being held in the same memory.
  2. Machine code instructions stored in main memory are fetched, decoded and executed by a processor one at a time.

3 Structure and role of the processor and its components

Learn It - The processor and its components

Objective: Explain the role and operation of a processor and its major components:

  • arithmetic logic unit: A circuit inside a CPU performs the following functions:
    • Arithmetic(signed bit patterns) and logic shift(unsigned bit patterns) on instructions within a register
    • Performs logical operations such as AND, XOR, OR, NOT.
  • control unit:
    • It controls and coordinates the activities within the CPU and control the flow of data in and out of CPU.
    • It takes an instruction and decodes it into opcode and operands.
    • It manages the execution of the decoded instrcutions, fetches data from location and stores the resultst in memory or registers.
  • clock:
    • The system clock is used to synchronise CPU operations.
    • It generates series of signals of alternating 0 and 1.
    • The CPU takes at least one cycle of time (from 0 to 1 or from 1 to 0) to perform one instruction.
  • general-purpose registers:
    • Registers are very fast and small memory inside CPU to hold data before, during and after being processed by the CPU
    • Typically, a CPU can have up to 16 registers
    • Some CPUs only have one general purpose register, called accumulator.
  • dedicated registers, including:
    • program counter(PC): a special purpose register that holds the address of the next instruction.
    • current instruction register(CIR or IR): holds the currently being executed instruction.
    • memory address register(MAR): holds the memory address of an instruction to be fetched or written to.
    • memory buffer register(MBR): a.k.a. memory data register(MDR), holds the data fetched from or written to memory.
    • status register(SR): holds the bits to indicate the results of the execution of an instruction, such as oervflow, negative, zero or carry over.


Learn It - The Fetch-Execute cycle and the role of registers within it

Objective: Explain how the Fetch-Execute cycle is used to execute machine code programs, including the stages in the cycle (fetch, decode, execute) and details of registers used.

When each instruction of a program is being processed by the CPU, it goes through the cycle of three stages:

  1. fetching: retrieves a program instruction from its memory
  2. decoding: determines what actions the instruction requires
  3. executing: carries out the decoded actions

Registers' roles in the fetch-decode-execution cycle can be illustrated in the following flowchart.(You should get familar with the flowchart).

Learn It - The processor instruction set

Understand the term ‘processor instruction set’ and know that an instruction set is processor specific.

  • Processor instruction set means “all the instructions supported by its hardware”
  • different processors have different instruction sets
  • typical instruction set includes the following common operations:
    • LOAD, STORE - data handling and memory operations
    • ADD, SUBTRACT, DIVID, MULTIPLY etc - arithmetic operations
    • >, <, = etc - comparison operations
    • AND, OR, XOR, NOR, NOT etc - logical operations
    • Control flow operations - conditional or unconditional
    • Logical shifts
    • Halt

Know that instructions consist of an opcode and one or more operands (value, memory address or register).

  • machine instruction is made of two parts:
    • opcode: the operation to be performed, and a 2-bit code indicate addressing mode used for the operation
    • operands: the value, memory address or register to be operated on

Learn It - Addressing modes

Understand and apply immediate and direct addressing modes.

  • machine instruction is made of two parts:
    • opcode: the operation to be performed
    • a 2-bit code indicate addressing mode used for the operation
  • addressing modes
    • immediate addressing: the operand is the actual value to be operated on.
    • direct addressing: the operand holds the memory address of the value to be operated on.
Suppose that the opcode 010 means LOAD and the addressing mode 1 indicates direct addressing.
Describe the operation that will be performed by the following machine code instruction:
0101 1100

The above instruction means: LOAD the value from the memory location at 12.

Learn It - Machine-code/assembly language operations

  • Understand and apply the basic machine-code operations of:
    • load
    • add
    • subtract
    • store
    • branching (conditional and unconditional)
    • compare
    • logical bitwise operators (AND, OR, NOT, XOR)
    • logical
      • shift right
      • shift left
    • halt.

    Use the basic machine-code operations above when machine-code instructions are expressed in mnemonic form- assembly language, using immediate and direct addressing.

Learn It - Factors affecting processor performance

Objective: Explain the effect on processor performance of:

  • multiple cores
  • cache memory
  • clock speed
  • word length
  • address bus width
  • data bus width.

4 External hardware devices

Learn It - Input and output devices

  • Know the main characteristics, purposes and suitability of the devices and understand their principles of operation.
    • barcode reader
    • digital camera
    • laser printer
    • RFID

Learn It - Secondary storage devices

Explain the need for secondary storage within a computer system.

Know the main characteristics, purposes, suitability and understand the principles of operation of the following devices:

  • hard disk
  • optical disk
  • solid-state disk (SSD) SSD = NAND flash memory + a controller that manages pages, and blocks and complexities of writing. Based on floating gate transistors that trap and store charge. A block, made up of many pages, cannot overwrite pages, page has to be erased before it can be written to but technology requires the whole block to be erased. Lower latency and faster transfer speeds than a magnetic disk drive.

Compare the capacity and speed of access of various media and make a judgement about their suitability for different applications.

5 Past exam questions

Question 1: Jun 2013

State the full names of two of the special purpose registers that are used in the fetch part of the fetch-execute cycle.

Question 2: Jun 2013

Figure 1 below is an incomplete diagram of the fetch-execute cycle. Describe the missing steps 1, 2b and 4 using either register transfer notation or a written description. Steps 2a and 2b occur at the same time. 3-7-figure-1.png

Question 3: Jan 2012

Provide the full names for the components numbered 1 to 3 in Figure 4. 3-7-figure-4.png

Question 4: Jan 2012

  1. What is the role of the Control Unit?
  2. State the full name of the processor component that would perform subtraction and comparison operations.
  3. What is meant by the term register?
  4. State one example of when the status register might have a bit set