Von Neumann Architecture
- Uses one memory location for both data and instructions.
- Requests next instruction/data from memory with unidirectional address bus.
- Data or instructions are sent to the CPU via the data bisectional bus. The SPU can send data to be stored in memory via this.
Harvard Architecture
- Memory and data are stored/treated separately. Can also have different caches for instructions and data - generally only split on L1 level. L2 is for both.
The CPU
- ALU
- Performs calculations.
- Control Unit (CU)
- Fetches and decodes instructions.
- Issue control signals to hardware.
- Regulate timing using clock.
- Clock
- Rapidly alternate between 1 and 0 to sync all CPU operations.
- Registers
- Program Counter - Stores memory address of next instruction.
- Memory Address Register - contains address of memory that is to be read or written.
- Current Instruction Register - stores the current instruction whilst executing.
- Memory Data Register - stores the data which is fetched from memory.
- Accumulator - stores results from ALU.
- CPU also has general purpose registers - typically 8.
- Bus - Collection of parallel wires to pass data between components.
- Address bus
- Connects CPU specifically the MAR to RAM to fetch memory.
- Data bus
- Where memory is transferred to and from RAM on.
- Control bus
- Sends different control signals to various components.
- Sends read/write signal to RAM.
- Address bus
Fetch, Decode, Execute Cycle
- Fetch
- The PC is copied to the MAR.
- A read signal is sent across the control bus and the data in the MAR is sent across the address bus.
- The program counter is incremented by 1 to point to the next instruction.
- Instruction from RAM returns to CPU via the data bus arriving at the MDR.
- The MDR is copied into CIR.
- Decode
- The instruction in the CIR is decoded by the decoder in the CU.
- Execute
- The instruction is then executed - either by the ALU and/or will fetch memory.
Memory and Storage
SSD
- Uses flash memory consisting of parallelly wired NOR gates or serially wired NAND gates.
- Comprised of floating gate transistors.
- Current is passed along the bit and word line to activate flow of electrons from source to drain.
Magnetic
- Contains platters/discs.
- Coated in a special magnetic coating.
- Binary data represented by changing magnetic orientation.
- Read write head for each side of the plater.
Optical
- Data is stored on a single spiral track.
- Disk rotates at a high speed.
- Laser head moves across the radius of disc.
- Made of pits and land.
- Change form pit to land or vice versa is a 1 as light is reflected differently.
CISC vs. RISC
CISC - complex instruction set computer. It is an architecture of CPU with many