3.2 Inside the CPU Flashcards
Arithmetic Logic Unit (ALU)
- Carries out calculations (arithmetical processing) - to find the numerical answer to mathematical problems
- Carries out logical operations - to find the true/false answer to logical deductions
- Holds temporary/interim values during calculations in a register called the accumulator (ACC)
Control Unit
- Controls operation of memory, processor and input/ output
- INSTRUCTIONS are interpreted
- Sends signals to other components telling them “what to do”
- Has a timer to send control signals in the right order, giving each action time to finish before sending the next signal
Registers
Small areas of fast memory inside the CPU
Accumulators
Used as fast memory to hold partial results in a calculation
Program Counter (PC)
Holds address of the next instruction to fetch
- Can change to a different location by some instructions
- Peripherals can change PC to interrupt CPU
Memory Address Register (MAR)
Holds address to read from/write to
Instruction Register (IR)
Holds instruction currently being executed
Memory Data Register (MDR)
stores data/instructions THAT IS IN USE from address in MAR
Buses
Short wire connections
Address bus
- carries an address/location…
- … of the next item to be fetched
- data travels in one direction (unidirectional)
Data bus
- carries data…
- … that is currently being processed
- data travels in both directions (bidirectional)
Control bus
- carries signals
- controls the actions of the CPU/processor
- can be either unidirectional or bidirectional
Describe the purpose of a logic gate in a logic circuit.
- to carry out a logical operation
- to control the flow of electricity through a logic circuit
- to alter the output from given inputs
7 stages in a Von Neumann fetch-execute cycle
- PC (program counter) contains the address of the next instruction to be fetched
- Address contained in the PC is copied to the MAR (memory address register) via the address bus
- The instruction is then copied from the memory location contained in the MAR and is placed in the MDR (memory data register) using the data bus
- The entire instruction is then copied from the MDR and placed in the CIR (current instruction register)
- Value in the PC is then incremented so that it points to the next instruction to be fetched
- The address part of the instruction, if any, is placed in the MAR
- The instruction is finally decoded and is then executed
Stored program concept
- Program instructions and data are stored temporarily in main memory
- Instructions are then fetched, decoded and executed by the processor ONE AFTER ANOTHER
Fetch-execute cycle (3 steps)
- The Program Counter (PC) in the CPU specifies where the next instruction to be executed is stored. The control unit (CU) fetches the next instruction to be executed from main memory.
- The CU decodes the instruction so it knows what action to carry out.
- The CU sends the instruction to the ALU. The ALU carries out the action. The PC is updated to point to the next instruction.
- The process is repeated.
Handshaking
The exchange of pre-determined signals between a computer and input/output device to assure proper synchronisation
Polling
The checking of the status/readiness of the external device
Buffer
A temporary storage area in the main memory for data before the data is processed
Interrupt
A signal sent from a device that halts the running of the processor to service the interrupt
- interrupts have different priorities
Checksum
A verification check used to detect errors in data after transmission