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.
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
Prefix
Symbol
Value
Power
tera-
T
1,000,000,000,000
1012
giga-
G
1,000,000,000
109
mega-
M
1,000,000
106
kilo-
K
1,000
103
Prefix
Symbol
Value
Power
milli-
m
0.001
10−3
micro-
\micro
0.000001
10−6
nano-
n
0.000000001
10−9
pico-
p
0.000000000001
10−12
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.
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).
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.
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.