Exam style questions
Download a pdf version of the test
Use the space below each question or a pen and paper to write your answer. When complete click the button for the answer and mark scheme.
NOTE: Answers typed into the browser will not be retained if you leave the page or refresh
Questions
Explain the role of any 3 control lines available to the control bus (3 marks)
Any 3 from the list below:
- Memory write to write data in a specified location
- Memory read to read data from a specified location
- Interrupt request to tell the
CPU an interrupt need to be serviced
- Bus request to say something wants to use the data bus
- Bus grant to say something is clear to use the data bus
- Clock used to sunchronise components
- Reset used
to initialise components
Explain, using an example, the relationship between the width of the address bus and the memory capacity of the system. (2 marks)
The width of the address bus is the number of bits that can make up an address (1)
Suitable example e.g. a bus width of 4 can have 24 = 16 addressable memory locations (1)
State a system that may benefit from using the Harvard architecture instead of the Von Neumann architecture and explain why. (2 marks)
Any suitable system (1) based on needing one of the following advantages for the second mark:
Ability for different memories to have different characteristics e.g. bigger address bus for memory than instructions
Ability to
fetch data and instructions in parallel for systems that need to be fast (1)
Describe the use of any two dedicated special registers in the CPU. (4 marks)
1 mark per identified register and 1 mark for describing the use of each from those below:
Program counter (1) used to store the address of the next instruction (1)
Current instruction register (1) that holds the
instruction currently being worked on (1)
Memory address register (1) holds the address of the next location that data or instructions will be fetched from (1)
Memory buffer register/ memory data register (1) used to
temporarily store the data written from or to memory (1)
Status register (1) used to indicate certain events e.g. whether a calculation caused an overflow error (1)
A computer has instructions that are set out with 7 bits for the op code, 1 bit for the addressing mode and 8 bits for the operand.
a) Explain what an instruction set is and what the maximum number of instructions this
computer can handle is. (2 marks)
An instruction set is the complete set of instructions a processor can use (1)
With 7 bits for the opcode this machine can do 27 or 128 different operations (1)
A computer has instructions that are set out with 7 bits for the op code, 1 bit for the addressing mode and 8 bits for the operand.
b) 1 bit has been used to determine the addressing mode. Explain the two possible addressing
modes you need to be familiar with. (2 marks)
Direct addressing where the operand refers to a memory location that holds the value (1)
Immediate addressing where the operand is an actual value (1)
Explain what an interrupt is and how it is handled by a CPU. (4 marks)
A signal sent by software or hardware to say it requires the attention of the processor (1)
When an interrupt is received, the CPU stops what it is doing and the values of all registers are stored in a stack (1)
Then the appropriate interrupt service routine is run (1)
Before copying the values from the stack back to the registers and carrying on with the original task (1)
Explain what a computer word is and how it relates to the data bus. (2 marks)
The computer word is the number of bits the CPU can process simultaneously.
If the computer word is larger than the data bus then it will take more than one trip to acquire the data for a task slowing down the computer.
Aside from word length and bus widths, describe 3 factors that affect processor performance. (6 marks)
1 mark per factor identified 1 mark per description
Number of cores - this means additional processors running in parallel and therefore the more cores the better the CPU performance
Amount and type of cache - this is
super-fast memory on or very physically near the CPU. More of this improves performance
Clock speed - this is the number of instructions executed per core per second. The higher this is the better the CPU performance
Write the assembly code instructions which are equivalent to the following high-level code.
Comment each line of code. (Use the instruction list on the next page)