EXAM QUESTIONS · A LEVEL 9618

Hardware & Virtual Machines (A2) Exam-Style Questions with Answers (A Level 9618)

Original exam-style questions on RISC and CISC, pipelining, parallel processing architectures, virtual machines, Boolean algebra, half and full adders and flip-flops for Cambridge AS & A Level Computer Science 9618 (Paper 3). There are 25 marks in total. Try each question on paper first, then press Show answer to see the mark scheme. Answers that can be calculated mark themselves.

Question 1[4 marks]

Compare RISC and CISC processors.

Show answer

Any four from:

  • RISC has a small set of simple instructions; CISC has a large set of complex instructions.
  • RISC instructions usually take one clock cycle; CISC instructions can take several.
  • RISC uses fixed-length instructions, which makes pipelining easier.
  • RISC needs more instructions/RAM for a program; CISC programs are shorter.
  • RISC uses hard-wired control; CISC often uses microprogramming.
  • RISC has more general-purpose registers.
Question 2[3 marks]

A processor uses a 5-stage pipeline. Each stage takes one clock cycle.

  1. Calculate how many clock cycles are needed to complete 5 instructions with pipelining. [1]
  2. Calculate how many cycles are needed without pipelining. [1]
  3. Explain why the actual improvement is often smaller. [1]
Show answer
  1. 9 cycles (5 for the first instruction + 1 for each of the other 4) [1]
  2. 25 cycles (5 × 5) [1]
  3. A branch/jump or an interrupt means the instructions already in the pipeline may have to be discarded (flushed), and some instructions depend on the results of earlier ones. [1]
Question 3[4 marks]

Describe SIMD and MIMD architectures and give a use of each.

Show answer
  • SIMD: one instruction is carried out on many data items at the same time [1], e.g. graphics processing / array processing / image editing. [1]
  • MIMD: several processors each carry out different instructions on different data at the same time [1], e.g. multi-core processors running different programs / supercomputers. [1]
Question 4[4 marks]

Give two benefits and two drawbacks of using virtual machines.

Show answer
  • Benefits (any two) [2]: several operating systems can run on one computer; software for an older system can be run (emulation); a guest OS can crash without affecting the host; saves hardware cost; easy to test software safely.
  • Drawbacks (any two) [2]: slower than running directly on hardware; needs a powerful host with lots of RAM; can be complex to set up; may not give full access to hardware.
Question 5[3 marks]

Simplify the Boolean expression A.B + A.B̅. Show your working.

Show answer
  • = A.(B + B̅) [1]
  • B + B̅ = 1 [1]
  • = A.1 = A [1]
Question 6[4 marks]

A half adder adds two bits A and B, producing a sum S and a carry C.

  1. Complete the truth table for S and C. [2]
  2. State the logic gate used for S and for C. [2]
Show answer
ABSC
0000
0110
1010
1101
  1. Truth table as shown [2]
  2. S uses an XOR gate [1]; C uses an AND gate [1]
Question 7[3 marks]

Describe the purpose of an SR flip-flop and one problem with it.

Show answer
  • A flip-flop stores one bit of data / is used as a basic memory element. [1]
  • S (set) makes the output Q = 1; R (reset) makes Q = 0; with S = R = 0 the output stays the same. [1]
  • Problem: when S = 1 and R = 1 at the same time the output is invalid/unpredictable (this is solved by the JK flip-flop). [1]

Frequently asked questions

What is pipelining?

Pipelining lets the processor work on different stages (fetch, decode, execute and so on) of several instructions at the same time, increasing the number of instructions completed per clock cycle.

Are these past paper questions?

No. These are original exam-style questions written by a Computer Science teacher in the Cambridge style.

Revise the topic: 9618 hardware and virtual machines notes · 9618 flashcards · All exam-style questions