1. What is a computer system

What is a computer system

Computer organisation

Computer organisation refers to the physical aspects of computer systems.

Link to original

  • This includes circuit design, control signals, memory types, etc

Computer architecture

Computer architecture refers to logical aspects of system implementation as seen by a programmer.

Link to original

  • This includes instruction sets, instruction formats, data types, addressing modes, etc

Contents

Basic Components

A computer consists of three basic components:

  • Processor (Central Processing Unit): interprets / executes programs
    • Consists of an ALU (to perform computations) and a control unit to signal different tasks.
    • Also contains registers which are very fast storage locations.
  • Memory: stores data and / or programs
  • I/O: a mechanism for data to / from the outside world.
Link to original

2. The computer hierarchy

The computer hierarchy

There are 7 levels we can study a computer at.

LevelNameContains
6UserExecutable Programs
5High-Level LanguagePython, Java, C++
4Assembly LanguageAssembly Code
3System SoftwareOperating System
2MachineInstruction Set Architecture
1ControlMicrocode or Hardwired
0Digital LogicCircuits or Logic Gates

Acronym: U HAS MCDonalds

6. User Level

This is the applications level, users typically interact with this level. At this level, users interact with different programs such as browsers, editors and games.

5. High-Level Language Level

This is the level at which programs written in languages such as Python, Java, and C++ exist. Programs written in high-level languages must first be compiled or interpreted then the assembly code can be executed.

4. Assembly Language Level

High-Level program instructions are translated into Assembly instructions which are then translated 1:1 to machine code (at level 2).

3. System Software Level

System software controls executing multiple processes on the system and protects system resources (e.g. from malicious software). These complex systems are referred to as operating systems.

2. Machine Level

This is also referred to as the Instruction Set Architecture, it consists of instructions that are specific to the architecture of the machine. They are not portable. Programs written in machine code do not need compilers, interpreters or assemblers.

1. Control Level

A control unit decodes and executed instructions. These can be microprogrammed or hardwired.

  • A microprogram is a program written in a low-level language that is implemented by the hardware.
  • Hardwired CUs consist of hardware that directly executed machine instructions.

0. Digital Logic

This level consists of digital circuits and microchips.

  • Digital circuits consists of gates and wires.
  • Physical components (such as transistors and resistors) implement mathematical logic.
    • These are a requirement for all the other levels.
Link to original

3. How to measure a computer system

How to measure a computer system

The processor speed refers to how fast executions can be performed within a computer, the frequency is measured in Hertz. The memory size refers to how much data can be stored, the size is measured in Bytes as data is stored in binary format.

SI Prefixes

PrefixSymbolValuePower
tera-T
giga-G
mega-M
kilo-K
PrefixSymbolValuePower
milli-m
micro-
nano-n
pico-p

Powers of 2

Typically, memory is given using SI prefixes but it is more accurate to measure memory in powers of 2 instead of powers of 10.

An additional i is used to represent powers of 2, e.g. 7895 MiB.

PrefixSymbolValuePower
tebi-Ti
gibi-Gi
mebi-Mi
kibi-Ki

Hence, .

For this course, we stick to SI prefixes.
Link to original

4. The von Neumann model

The von Neumann model

Named after John von Neumann.

In earlier electronic computers, programming was done by connecting wires to plugs, essentially programs were written by changing the layout of the hardware.

von Neumann Model

The von Neumann model is used in modern computers, where programs are stored as a series of instructions in computer memory.

  • As well as the basic components, this model specifies the capacity to carry out sequential instruction processing.
  • It also specifies a single data path between the CPU and main memory (this is known as the the von Neumann bottleneck).

Link to original

von Neumann bottleneck

von Neumann Bottleneck

The von Neumann Bottleneck is that there is only a single data path between the CPU and main memory, this can slow down the processor as we are limited by how fast instructions can be passed from memory to the CPU. In most applications, this bottleneck will not slow us down.

Link to original

FDE cycle

FDE Cycle

The fetch-decode-execute cycle is the series of steps that a computer carries out when it runs a program.

  • Fetch: The control unit fetches the next instruction from memory (this data comes through von Neumann bottleneck) and updates the program counter to determine where the next instruction is located. We first have to fetch an instruction from memory and place it into the IR.
  • Decode: Translate the instruction into signals that the ALU can interpret and execute (it is decoded to determine what needs to be done next).
  • Execute: This takes two steps.
    • Load any required data into the CPU registers. If a memory value is involved in the operation, it is retrieved and placed into the MBR.
    • Execute the instruction, placing the results in registers or memory.
Link to original

Link to original