1/35
Looks like no tags are added yet.
Three parts of the CPU?
ALU, control unit, register unit.
What does the ALU do?
Performs arithmetic operations
Performs logical operations
What does the control unit do?
Fetches and Decodes Instructions.
Sends control signals to other parts of the CPU and the system.
Coordinates the execution of instructions.
What does the Register Unit do?
Provides high speed temporary storage for data, instructions and memory addresses that the processor is actively using or calculating.
Two kinds of registers?
General-purpose (hold data)
Special-purpose (e.g., PC, IR).
What is a bus?
The pathway connecting the CPU, main memory and other units.
It allows data, instructions and control signals to be transmitted between the CPU, memory and other devices.
Describe the Stored-program concept?
A program encoded as bit patterns and stored in main memory; changing the program means changing memory contents, not rewiring the CPU.
Machine instruction vs machine language?
A machine instruction is an instruction encoded as a bit pattern the CPU recognises whereas machine language is the set of all instructions recognised by the cpu.
RISC vs CISC?
RISC and CISC are design approaches used for computer processor instruction sets.
RISC: focuses on using a smaller number of simple, efficient and fast instructions. Eg. ARM chips in smartphones.
CISC: focuses on providing a larger set of powerful and convenient instructions. Eg. Intel x86 processors used in traditional computers
Three instruction categories?
Data transfer (LOAD, STORE),
Arithmetic/logic (ADD, AND, SHIFT, ROTATE),
Control (JUMP, BRANCH)
Op-code vs operand?
The opcode and operand are the 2 parts of a vole instruction.
The opcode indicates which operation to execute. The operand provides more detail about the operation, its meaning depends on the op-code.
What is the size of a Vole instruction?
One vole instruction is 4 hexadecimal digits or 16 bits. It has a 4-bit op-code and a 12-bit operand.
What does the program counter hold?
The program counter stores the memory address of the next instruction to be fetched and executed by the computer’s CPU.
What does the instruction register hold?
The instruction register stores the current instruction that is actively being decoded or executed by the CPU.
What are the steps of the Machine Cycle?
FI - fetch instruction
DI - decode instruction
FO - fetch operand
EX - execute
WO - write operand
How does JUMP work?
Given JUMP’s opcode and operand: 0xB| RXY
The bit pattern in register R is compared with the bit pattern in register 0.
If they are equal: XY is copied into the program counter during the execute phase, so the next instruction fetched is the one at address XY.
Otherwise nothing happens and execution continues in normal sequence.
Why does the PC increment by 2 in Vole?
Each memory cell holds half an instruction, so two cells are fetched.
What is masking?
Using logic operations (AND/OR/XOR) to isolate or change selected bits of an operand.
Logical vs arithmetic shift?
Logical shift pads with 0.
Arithmetic shift pads with the sign bit.
What is a rotate?
A circular shift: bits pushed off one end re-enter at the other.
What is a controller?
A controller is a unit that handles communication between the computer and a peripheral device.
It can be specialised for one type of device, or general-purpose (e.g., USB, HDMI).
What is a port?
A port is the point at which a device connects to a computer.
What is memory-mapped I/O?
Memory-mapped I/O is a method where devices appear to the CPU as memory locations.
What is DMA?
Direct memory access: a controller accesses main memory over the bus.
Von Neumann bottleneck?
CPU and controllers compete for bus access.
What is handshaking?
Coordinating the transfer of data between the computer and a peripheral.
Parallel vs serial communication?
Parallel communication sends several signals at once on separate lines.
Serial communication sends signals one after another on a single line.
Bandwidth (in this context)?
Bandwidth in the context of data communication is the maximum available data-transfer rate.
What is pipelining?
Pipelining is a technique where the steps of the machine cycle for multiple instructions are overlapped allowing more than one instruction to be processed at the same time.
Why does pipelining work?
Each stage uses a different part of the CPU, so parts can work on different instructions at the same time (instruction-level parallelism).
Speed-up formula?
Non-pipelined time ÷ pipelined time.
SISD, SIMD, MISD, MIMD?
SISD: no parallelism.
SIMD: same program, different data.
MIMD: different programs, different data.
MISD: may be pipelined computers.
SIMD vs MIMD?
SIMD: one instruction stream applied to many data streams.
MIMD: many instruction streams on many data streams.
What happens during the FETCH stage?
The CPU reads the cell at the address in the PC and the cell after it,
puts the full instruction in the IR,
then increments the PC by 2.
What happens during the DECODE stage?
The CPU interprets the bit pattern in the IR
and splits it into the opcode and the operands.
What happens during the EXECUTE stage?
The CPU performs the action required by the instruction in the IR.
For a jump, it overwrites the PC with the new address. That is how a loop goes back.