The CPU Flashcards
What is the control bus?
The bidirectional bus used to carry control signals between the CPU and RAM
What is the address bus?
The unidirectional bus which the CPU uses to send a memory address to RAM. The RAM will then fetch the data stored at that address
What is the data bus?
The bidirectional bus that carries data around the CPU and to and from the RAM
What determines how much RAM is addressable?
The width of the address bus
What is a register?
Fast data storage used to store data temporarily
What is the stored program concept?
Programs which are currently being executed have their instructions and data stored in the RAM temporarily
What is the system clock?
Every time it clicks, an instruction is executed (in a single core)
What is the PC?
The program counter, which stores the address of the next instruction to be executed
What is the MAR?
(Memory address register) Holds the memory address of what needs to be fetched from RAM
What is the MBR?
(Memory buffer register) The memory register that temporarily stores data read from/to be written to memory
What is the CIR?
(Current instruction register) Holds the current instruction
What is the SR?
(Status register) Holds the bits output by the ALU’s calculation (e.g. overflow errors, carry values)
Describe the fetch-decode-execute cycle
- The memory address in the PC is copied to the MAR
- The contents of the MAR are sent to the RAM via the address bus, which returns the instruction stored at that address via the data bus
- The address in the PC is incremented by 1
- The instruction returned by the RAM is stored in the MBR
- The contents of the MBR are copied to the CIR
- The contents of the CIR are split into opcode and operand
- The control unit executes the instruction
How does changing the number of cores affect performance?
It means the CPU can execute multiple instructions per clock tick
[PPQ] Describe the fetch stage of the fetch-decode-execute cycle
- The memory address in the PC is copied to the MAR
- The contents of the MAR are sent to the RAM via the address bus, which returns the instruction stored at that address via the data bus
- The address in the PC is incremented by 1
- The instruction returned by the RAM is stored in the MBR
- The contents of the MBR are copied to the CIR
[PPQ] Why does the instruction have to be copied from the MBR to the CIR?
While the instruction is being executed, more information might need to be fetched from memory, and this data is stored in the MBR. The MBR is also not directly wired to the processor components that execute the instruction
[PPQ] Why is the Harvard CPU architecture sometimes used instead of the von Neumann architecture?
Instructions and data can be accessed simultaneously, which avoids delays waiting for memory fetches. However, Harvard-based CPUs are more expensive to build
[PPQ] What is an operand?
An operand is a value that will be used by an operation
[PPQ] What does the addressing mode indicate?
The addressing mode indicates how the value in the operand should be interpreted
[PPQ] What are the advantages and disadvantages of high level programming languages?
Advantages: Code is easier for humans to understand and maintain, developing programs is faster because one line of HL code can do more than one line of LL code, flow control structures are available (loops, if statements)
Disadvantages: Executes more slowly than LL code, LL code gives direct access to hardware and allows for direct manipulation of memory contents
[PPQ] What are the differences between serial and parallel communication?
Serial sends one bit at a time while parallel sends multiple bits at the same time
[PPQ] Why do computer peripherals only use serial communication?
The distance between the PC and the peripherals is too large to use parallel communication, which could result in data skew
[PPQ] What is baud rate?
Number of signal changes per second
[PPQ] Why is the final version of a program translated using a compiler?
So that users do not require a compiler to run it
So that the users cannot access the source code