Subtopic Notes
3.1 - Computer architecture
3. Hardware
Central Processing Unit (CPU): Processes instructions and data that are input into the computer so that the result can be output
Microprocessor: A type of integrated circuit on a single chip
Von Neumann Machine
- Data and programs are indistinguishable, allowing them to share the same memory
- Operates with a single processor which rely on registers
- Follows a linear sequence of fetch, decode, and execute operations for processing instruction
Registers: Smallest unit of storage within the CPU used to hold data or instructions temporarily during processing
CPU Components
Units
- Arithmetic Logic Unit (ALU): Carries out arithmetic calculations & logical decisions
- Control Unit (CU): Controls the operation of the memory, processor and input/output devices by using the fetch-decode-execute cycle
Registers
- Program Counter (PC): Holds the memory address of next instruction to be executed
- Memory Address Register (MAR): holds the address from which data will be fetched or to which data will be sent.
- Memory Data Register (MDR): Temporarily stores data that is being transferred to CIR by the MAR.
- Current Instruction Register (CIR): Holds the instruction currently being executed by the CPU
- Accumulator (ACC): Stores intermediate arithmetic and logic results during processing
Buses
A set of parallel wires that connects multiple components and facilitate communication among them
- Address Bus: Unidirectional bus that carries memory addresses from the CPU to other memory, input or output locations.
- Data Bus: Bidirectional bus that carries data between the CPU, memory, and other peripherals.
- Control Bus: Bidirectional bus that transmits control signals from the CPU to coordinate and manage the operations of various components.
System Clock
A timing device connected to the processor that synchronizes the execution of the fetch-execute cycle
The Fetch-Decode-Execute Cycle
Fetch Stage
-
The Program Counter (PC) holds the address of the next instruction to be fetched from main memory.
-
The address stored in the PC is copied to the Memory Address Register (MAR) using the address bus.
MAR ← [PC] -
The address in MAR is sent to main memory through the address bus.
-
The Control Unit (CU) sends a read signal through the control bus to tell main memory to read from that address.
-
The instruction stored at the address in MAR is copied from main memory to the Memory Data Register (MDR) using the data bus.
MDR ← [[MAR]] -
The instruction in MDR is copied to the Current Instruction Register (CIR).
CIR ← [MDR] -
The Program Counter (PC) is incremented so that it points to the next instruction.
PC ← [PC] + 1
Decode Stage
- The CU works out what is required from the instruction
Execute Stage
- CPU will carry out the decoded instruction
- ALU: Performs the calculation
- CU: Coordinates with the appropriate components to store data or results back into main memory or retrieves data from a different memory location
Key Points
- This process cycles which happens billions of times per second
[ ]denote value currently in that register[[-]]means the CPU must do a logical operation then copy this value
Performance of Computer System Factors
Bus Width
- Determines the number of bits that can be simultaneously transferred
- Increasing width increases data transfer rate
Clock speed
- Determine the clock cycle that synchronizes all computer operations
- Increasing clock speed increases the number of operations per second
- This doesn’t necessarily lead to better performance
- Overclocking: Using a higher clock speed than designed. This may lead to operations becoming unsynchronized (causing crashes) or cause overheating of CPU
Cache
- Small, high-speed memory
- Stores frequently accessed data and instructions
- Located inside the CPU
- Larger cache memory size leads to better CPU performance
Number of Cores
- Most CPU chips are multi-core
- Each core processes different instructions using multithreading
- Higher core number improves performance
Instruction Set
List of all the commands that can be processed by a CPU, and the commands are machine code
Embedded System
- A combination of hardware and software designed to carry out a dedicated function
- This is different to a general purpose computer that is used to perform many different functions
- May contain
- Microcontrollers - CPU, RAM, ROM and other peripherals on a single chip
- Microprocessor - Integrated circuit with CPU only
- System on Chips (SoC) - Microprocessor with I/O ports, storage and memory
- Process
- User gives input that is sent to microprocessor
- ADC may be required to convert the input
- Data from the user interface is also transmitted to the microprocessor
- The microprocessor processes the data and sends signals to actuators which are the output
- Non-programmable devices needs replacing for software update
- Programmable devices may be updated by
- Connecting the device to a computer to download the update
- Automatic updates via a satellite, cellular or Wi-Fi
- Applications
- Domestic appliances
- Cars
- Security Systems
- Lighting Systems
- Vending machines.
- GPS systems
- Washing Machines
- ATM (Automated Teller Machine)
- Microwave
| Advantages | Disadvantages |
|---|---|
| Designed for a single dedicated task. | Increases garbage when thrown away |
| Small size | Harder to upgrade |
| Responds rapidly to changing inputs | Might be thrown away when upgrade required or faults are found |
| Low power consumption | Needs specialized technicians to fix |
| Low production cost | May have confusing interface |
| Can be operated remotely | Might be prone to malware and attacks |
