Advanced level 2024 South West regional mock computer science 2
Advanced level 2024 South West regional mock computer science 2
(i) (a) Add the decimal numbers 18 and -72 using 8-bit two’s complement. (4 marks)
(b) Apply a binary shift two places to the right on the bit pattern 10101000. Convert the binary number obtained
to decimal and state the arithmetic effect of applying a right binary shift of two to a binary number. (3 marks)
(ii) A combinational logic circuit has three inputs A, B and C, and two outputs X and Y. Output X is the sum bit when
the values of A, B and C are added and output Y is the carry bit when they are added.
(a) What is meant by a combinational logic circuit? (2 marks)
(b) Draw a truth table for this circuit with inputs A, B, C, and outputs X and Y. (4 marks)
(c) Draw a logic circuit diagram for the Boolean expression Q= A•B+ (4 marks)
2. (i) (a) RAM may be either SRAM or DRAM. Describe the difference between these. (2 marks)
(b) State two advantages of solid-state drives over hard disk drives. (2 marks)
(c) A computer’s memory is composed of 8K words of 32 bits each. Determine the number of bits that are required
to address each memory location if the smallest addressable memory unit is a word. (2 marks)
(d) Draw a diagram to represent the memory hierarchy you might expect to find in a typical high performance
personal computer. (4 marks)
(ii) An instruction format uses five bits to represent 32 basic machine operations, one bit for the addressing mode and
ten bits for the operand field, as shown in Figure 1 below.
Opcode
Basic machine Operand
operation
Addressing
mode
0 0 0 0 1 1 0 0 1 1 1 0 1 1 0 1
Figure 1
(a) How many different opcodes is the machine potentially capable of supporting? (2 marks)
(b) What is an addressing mode? How many addressing modes can this instruction format support? (2 marks)
(c) Explain what indirect addressing is and then determine the number of memory locations that can be addressed
using the instruction format above. (2 marks)
(d) State one application of indexed addressing in computing. (1 mark)
3. (i) (a) What is meant by CPU scheduling? (1 mark)
(b) Explain the difference between pre-emptive and non-pre-emptive scheduling. (2 marks)
(c) Explain when preemption takes place in each of shortest remaining time next and round-robin scheduling
algorithms. (2 marks)
(d) What is convoy effect? In which scheduling algorithm is a convoy effect likely to occur? (2 marks)
(ii) (a) What is cache memory? How is cache memory different from virtual memory in terms of purpose? (3 marks)
(b) Explain why excessive use of virtual memory can degrade the performance of a computer. (3 marks)
(c) Explain the difference between a placement policy and a replacement policy in memory management, stating
an example of each. (4 marks