Computer components
The CPU
Central Processing Unit
The Central Processing Unit (CPU) is what drives the fetch, execute, decode cycle. It consists of two principle parts: ?
Link to original
Datapath
The datapath consists of an [[Arithmetic Logic Unit]] and [[Register|registers]] that are connected to each other, and to memory, by a **data bus**.
Link to originalControl Unit
The control unit sends timing and control signals to activate various components within the CPU to perform sequenced operations.
A control unit determines what actions should be carried out according to the values in the [[Program Counter (register)|Program Counter]] and a [[Status (register)]].
Link to original
Memory
Computer Memory
Computer memory consists of a linear array of addressable storage cells.
Word (Memory)
The storage cells of memory are of a regular and fixed size known as a word. In exams, take a word to be .
Link to original
Word-addressable memory
Memory is commonly word-addressable: processor identifies a particular [[Word (Memory)|word]] when it needs to read and write data
Link to originalByte-addressable memory
Memory can be byte-addressable: processor is able to address different sizes of memory compared to the word size
Link to original- Modern PC architectures have a word size of 32-bit or 64-bit.
Link to originalRandom Access Memory
Random Access Memory (RAM) stores actively running programs and any data currently in use.
RAM chips are often referred to in terms of length $\times$ width.
Link to original
- If the word size is , then a RAM chip gives us 16-bit memory locations.
I/O
IO Subsystem
The I/O (input/output) subsystem is used by a computer to interact with the outside world.
I/O devices can be connected to the CPU through various interfaces: ?
Link to original
- Memory mapped: the device behaves like main memory from the point of view of the CPU
- Instruction mapped: where the CPU has specific instructions for controlling the device
System Bus
System Bus
A bus is an array of wires, that simultaenously convery convey a single bit along each line.
Two types of buses are commonly found in computer systems: ?
- Point-to-point: bus is connected to just two components
- Multi-point: many components can access the one bus
The system bus consists of: ?
- Data lines: Convey bits from one device to another.
- Control lines: Determine the direction of data flow and when each device can access the bus.
- Address lines: Determine the data source or destination location.
A typical multi-point bus configuration looks like:
Link to original
Clock
System clock
A system clock is used to synchronise all internal components, the clock outputs a steady high-frequency signal.
Link to original
- A fixed number of clock cycles are required to carry each data movement or computational operation.
Clock frequency
The clock frequency, measured in Hertz, determines the speed with which all operations are carried out. Clock cycle time is the reciprocal of frequency.
A clock has a cycle time of .
Link to original- The CPU time required to run a program is given by the general performance equation: We can improve CPU throughput if we reduce:
- Number of instructions per program.
- Number of cycles per instruction.
- Number of seconds per clock cycle.
Interrupts
Interrupt
An interrupt allows us to alter the normal flow of execution of a program when an event of higher priority occurs. They can be triggered by different sources:
- I/O requests
- Arithmetic errors (e.g. div 0)
- Encountering invalid instructions
Each interrupt is associated with a procedure (Interrupt Service Routine) that directs the actions of the CPU to handle the events.
Link to original
