Time left2:30:00 Answered 0 of 47 140 marks
OCR H446/01 2 hours 30 minutes 140 marks Full length paper

A Level Computer Science Paper 1 B: Computer Systems

Instructions

Time allowed
2 hours 30 minutes
Total marks
140
Calculator
You must not use a calculator.
  • Answer all the questions.
  • The 9 and 12 mark questions earn a mark for each relevant point here; the real exam marks them in levels.
  • SQL answers are run against the tables printed in question 7, so they must be valid SQL.

Questions

140 marks
1(a)Tick (✓) one box in each row to identify the register described.4 marks
PCMARMDRCIR
Holds the address of the next instruction to be fetched
Holds the address of the memory location about to be read from or written to
Holds the data or instruction just fetched from memory, or about to be written to it
Holds the instruction that is currently being decoded and executed

Tick one box in each row.

Mark scheme0 / 4
  • LHolds the address of the next instruction to be fetched: PC
  • LHolds the address of the memory location about to be read from or written to: MAR
  • LHolds the data or instruction just fetched from memory, or about to be written to it: MDR
  • LHolds the instruction that is currently being decoded and executed: CIR
Model answer

The program counter points to the next instruction, the MAR holds an address, the MDR holds what travels on the data bus, and the CIR holds the instruction being worked on.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

1(b)Describe how pipelining improves the performance of a processor, and explain why a conditional branch instruction can reduce the benefit.4 marks
Describe

Mark scheme0 / 4
  • LThe fetch, decode and execute stages of different instructions overlap
  • LSo the parts of the processor are not left idle and more instructions are completed each second
  • LAfter a branch, the instructions already fetched and decoded may not be the ones that run next
  • LSo the pipeline has to be flushed and refilled, wasting clock cycles
Model answer

Pipelining overlaps the stages of the fetch-decode-execute cycle: while one instruction executes, the next is being decoded and the one after that fetched. No part of the processor sits idle, so more instructions complete per second. A conditional branch is not resolved until it executes, by which time the instructions after it have already been fetched and decoded. If the branch is taken those instructions are the wrong ones, so the pipeline must be flushed and refilled, wasting the cycles spent on them.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

1(c)Tick (✓) one box in each row to show whether each statement describes a CISC or a RISC processor.2 marks
CISCRISC
Has a large set of complex instructions, some taking many clock cycles
Has a small set of simple instructions, each completing in one clock cycle
A program compiles to fewer machine code instructions, so it takes up less memory
Pipelining is easier, because every instruction takes the same time

Tick one box in each row.

Mark scheme0 / 2
  • L1 mark for both: Has a large set of complex instructions, some taking many clock cycles: CISC; Has a small set of simple instructions, each completing in one clock cycle: RISC
  • L1 mark for both: A program compiles to fewer machine code instructions, so it takes up less memory: CISC; Pipelining is easier, because every instruction takes the same time: RISC
Model answer

CISC does more per instruction with more complex hardware; RISC keeps instructions simple and uniform, which suits pipelining.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

1(d)Explain why a graphics processing unit (GPU) can carry out some tasks much faster than a CPU.3 marks
Explain

Mark scheme0 / 3
  • LA GPU has a very large number of simple cores
  • LThey carry out the same instruction on many pieces of data at the same time (SIMD)
  • LSo tasks made of many independent calculations, such as rendering images or training machine learning models, are much faster
Model answer

A GPU contains thousands of simple cores designed to carry out the same instruction on many items of data at once. Tasks made of large numbers of independent, identical calculations, such as working out the colour of every pixel in an image or the matrix arithmetic in machine learning, can be split across all of those cores, so they complete far faster than on a CPU's few powerful cores.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

2(a)Three processes arrive in the ready queue at the same time, in the order A, B, C. Process A needs 5 ms of processor time, B needs 3 ms and C needs 4 ms. The operating system uses round robin scheduling with a time slice of 2 ms. State the time at which each process finishes.3 marks

Mark scheme0 / 3
  • L12 ms
  • L9 ms
  • L11 ms
Model answer

A runs 0-2, B 2-4, C 4-6, A 6-8, B 8-9 and finishes, C 9-11 and finishes, then A 11-12 and finishes.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

2(b)Which one of these scheduling algorithms can leave a long process waiting indefinitely (starvation)?1 mark

Tick one box.

Mark scheme0 / 1
  • LB Shortest job first
Model answer

Shortest job first always picks the shortest process, so if short ones keep arriving a long one may never run.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

2(c)Describe the differences between paging and segmentation.4 marks
Describe

Mark scheme0 / 4
  • LPaging splits memory into blocks of a fixed size, called pages
  • LSegmentation splits memory into blocks of variable size, called segments
  • LPages are physical divisions, made without regard to the program's structure
  • LSegments are logical divisions, matching parts of the program such as a subroutine or a data structure
Model answer

Paging divides memory into equal, fixed-size pages. The divisions are physical: a page boundary can fall in the middle of a subroutine. Segmentation divides memory into segments of different sizes, and the divisions are logical, so each segment holds a complete part of the program, such as a subroutine or a data structure.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

2(d)Explain how a processor deals with an interrupt.5 marks
Explain

Mark scheme0 / 5
  • LAt the end of each fetch-decode-execute cycle the processor checks the interrupt register
  • LIf the interrupt has a higher priority than the current task it is serviced; otherwise it waits
  • LThe contents of the registers, including the program counter, are saved onto a stack
  • LThe address of the interrupt service routine is loaded into the program counter and the ISR runs
  • LWhen it finishes, the saved values are popped from the stack and the original task resumes
Model answer

At the end of every fetch-decode-execute cycle the processor checks the interrupt register. If an interrupt is waiting and its priority is higher than the current task, the processor saves the contents of its registers, including the program counter, onto a stack. The address of the matching interrupt service routine is loaded into the program counter, so the ISR runs. When it finishes, the saved values are popped back off the stack and the interrupted task carries on exactly where it stopped. An interrupt of lower priority waits until the current task allows it.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

2(e)Tick (✓) one box in each row to show the type of operating system described.2 marks
Real-timeDistributedMulti-userEmbedded
Must respond to inputs within a guaranteed time, such as a car's anti-lock brakes
Shares the processing of one task across several networked computers
Lets several people use the resources of one computer at the same time
Built into a device with limited resources to control one function

Tick one box in each row.

Mark scheme0 / 2
  • L1 mark for both: Must respond to inputs within a guaranteed time, such as a car's anti-lock brakes: Real-time; Shares the processing of one task across several networked computers: Distributed
  • L1 mark for both: Lets several people use the resources of one computer at the same time: Multi-user; Built into a device with limited resources to control one function: Embedded
Model answer

Guaranteed response times are real-time, work spread over networked computers is distributed, many users of one machine is multi-user, and an OS built into a device is embedded.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

3(a)Tick (✓) one box in each row to show the stage of compilation described.4 marks
Lexical analysisSyntax analysisCode generationOptimisation
Whitespace and comments are removed and the code is split into tokens
The tokens are checked against the rules of the language and an abstract syntax tree is built
Object code is produced from the abstract syntax tree
Code is removed or changed so the program runs faster or uses less memory

Tick one box in each row.

Mark scheme0 / 4
  • LWhitespace and comments are removed and the code is split into tokens: Lexical analysis
  • LThe tokens are checked against the rules of the language and an abstract syntax tree is built: Syntax analysis
  • LObject code is produced from the abstract syntax tree: Code generation
  • LCode is removed or changed so the program runs faster or uses less memory: Optimisation
Model answer

Lexical analysis tokenises, syntax analysis checks the grammar and builds the tree, code generation produces object code and optimisation improves it.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

3(b)Explain the difference between static and dynamic linking of libraries.4 marks
Explain

Mark scheme0 / 4
  • LStatic linking copies the library code into the executable file when it is built
  • LSo the executable is larger, but self-contained: it runs without the library being present
  • LDynamic linking loads the library from a separate file when the program runs, and it can be shared by several programs
  • LSo executables are smaller and library updates apply to them automatically, but the program fails if the library is missing or the wrong version
Model answer

With static linking the linker copies the library code the program uses into the executable. The file is larger, but it is self-contained and always has the version of the library it was built with. With dynamic linking the executable only holds a reference, and the library, a separate file such as a DLL, is loaded when the program runs and can be shared by many programs. Executables are smaller and pick up library updates automatically, but the program will not run if the library is missing or an incompatible version is installed.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

3(c)Tick (✓) one box in each row to show the development methodology described.4 marks
WaterfallRapid application developmentSpiral modelExtreme programming
Each stage is completed and signed off before the next one begins
Prototypes are built quickly and refined with constant feedback from users
Each cycle of development starts by identifying and resolving the biggest risks
Programmers work in pairs, and the code is tested continually and refactored

Tick one box in each row.

Mark scheme0 / 4
  • LEach stage is completed and signed off before the next one begins: Waterfall
  • LPrototypes are built quickly and refined with constant feedback from users: Rapid application development
  • LEach cycle of development starts by identifying and resolving the biggest risks: Spiral model
  • LProgrammers work in pairs, and the code is tested continually and refactored: Extreme programming
Model answer

Sequential sign-off is waterfall, repeated prototypes are RAD, risk-driven cycles are the spiral model, and pair programming with continual testing is extreme programming.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

3(d)A start-up company is developing a mobile banking app. The client's requirements are expected to change as the app is tried out with customers, and the app must be secure and reliable.Evaluate the suitability of the waterfall model and of an agile methodology, such as extreme programming, for this project.9 marks
Evaluate

Mark scheme0 / 9
  • LWaterfall has clear stages, documentation and sign-off, so it is easy to plan and manage
  • LBut waterfall fixes the requirements at the start, so changing them later is difficult and expensive
  • LIn waterfall the client sees the product only near the end, so problems are found late
  • LAgile works in short iterations, each producing a working version
  • LAgile welcomes changing requirements, with regular feedback from the client and customers
  • LExtreme programming's pair programming and continual testing give high quality code
  • LA banking app must be secure and reliable: frequent, rigorous testing supports this, and documentation helps to show it meets regulations
  • LAgile's drawbacks: less documentation, the client must stay closely involved, and the final cost and time are harder to estimate
  • LA justified conclusion: an agile methodology suits this project better because its requirements will change
Model answer

The waterfall model completes each stage, from analysis to maintenance, before the next begins, with documentation signed off at each step. That makes the project easy to plan and manage, and the thorough documentation helps a bank show regulators how the app was designed and tested. Its weakness here is that the requirements are fixed at the start: the client expects them to change as customers try the app, and in waterfall going back to change the design is slow and expensive. The client also sees a working product only near the end, so a misunderstanding may be discovered when it is most costly to fix. An agile methodology such as extreme programming builds the app in short iterations, each producing a working version that the client and real customers can try. Their feedback shapes the next iteration, so changing requirements are expected rather than a problem. Extreme programming also suits the need for security and reliability: programmers work in pairs, so every line is reviewed as it is written, and tests are written first and run continually, so faults are caught early and the code is refactored to stay clean. The drawbacks are that agile projects produce less documentation, which a bank may need for compliance, the client must stay closely involved throughout, and the final cost and delivery date are harder to predict. Overall an agile methodology is more suitable, because the requirements will certainly change, but the team should keep enough documentation of its security design and testing to satisfy the regulators.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

4(a)Give the denary number -73 as an 8-bit binary integer in each representation.2 marks

Mark scheme0 / 2
  • L10110111
  • L11001001
Model answer

73 is 0100 1001. In two's complement, invert to 1011 0110 and add 1: 1011 0111. In sign and magnitude, set the sign bit: 1100 1001.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

4(b)A floating point number uses an 8-bit mantissa and a 4-bit exponent, both in two's complement. Convert the floating point number 0.1011000 0011 into denary. Show your working.2 marks

Mark scheme0 / 2
  • LCorrect answer, full marks: 5.5
  • LMethod: The exponent is 3, so the binary point moves 3 places right: 0101.1000
Model answer

The exponent 0011 is 3, so the binary point moves 3 places right: 0101.1000, which is 4 + 1 + 0.5 = 5.5.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

4(c)Normalise the floating point number 0.0011010 0010, which uses an 8-bit mantissa and a 4-bit exponent, both in two's complement.2 marks

Mark scheme0 / 2
  • L0.1101000
  • L0000
Model answer

The mantissa must start 0.1, so shift it 2 places left to 0.1101000 and reduce the exponent by 2, from 2 to 0: 0000. Both represent 0.8125.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

4(d)Convert the floating point number 1.0110000 0010, which uses an 8-bit mantissa and a 4-bit exponent, both in two's complement, into denary. Show your working.2 marks

Mark scheme0 / 2
  • LCorrect answer, full marks: -2.5
  • LMethod: The exponent is 2, giving 101.10000, or the mantissa is found to be -0.625
Model answer

The exponent 0010 is 2, so the binary point moves 2 places right: 101.10000. In two's complement that is -4 + 1 + 0.5 = -2.5.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

4(e)Give the result of each bitwise operation.3 marks

Mark scheme0 / 3
  • L00000110
  • L10110101
  • L01010101
Model answer

AND with 0000 1111 keeps only the low four bits: 0000 0110. OR with 1000 0000 sets the top bit: 1011 0101. XOR with 1111 1111 flips every bit: 0101 0101.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

4(f)Explain why floating point numbers are normalised.2 marks
Explain

Mark scheme0 / 2
  • LTo give the greatest precision possible for the number of bits in the mantissa
  • LSo that each number has only one representation
Model answer

A normalised mantissa has no wasted leading bits, so every bit of the mantissa adds precision. It also means each number can be written in only one way, which makes numbers easy to compare.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

4(g)State the smallest and largest denary values that can be represented in 8-bit two's complement.2 marks

Mark scheme0 / 2
  • L-128
  • L127
Model answer

1000 0000 is -128 and 0111 1111 is 127.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

5(a)A stack is empty. These operations are carried out in order: push(5), push(9), pop(), push(3), push(7), pop(), push(1). Complete the table to show the contents of the stack.2 marks
PositionValue
Top
Middle
Bottom

Mark scheme0 / 2
  • LTop: 1
  • LMiddle and bottom: 3, 5
Model answer

After push(5), push(9) and pop() the stack holds 5. push(3) and push(7) give 5, 3, 7, and pop() removes 7. push(1) gives 5, 3, 1 from bottom to top.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

5(b)A circular queue is held in an array with positions 0 to 5. The front pointer points to the first item and the rear pointer to the last item. The front pointer is 4 and the rear pointer is 1. State how many items are in the queue.1 mark

Mark scheme0 / 1
  • L4
Model answer

The items are in positions 4, 5, 0 and 1, wrapping round: 4 items.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

5(c)The values 50, 30, 70, 20, 40, 60, 80, 35 are inserted, in that order, into an empty binary search tree. Complete the table to show the order in which the nodes are visited by each traversal.3 marks
Traversal1st2nd3rd4th5th6th7th8th
Pre-order
In-order
Post-order

Mark scheme0 / 3
  • LRow 1: 50, 30, 20, 40, 35, 70, 60, 80
  • LRow 2: 20, 30, 35, 40, 50, 60, 70, 80
  • LRow 3: 20, 35, 40, 30, 60, 80, 70, 50
Model answer

50 is the root, with 30 and 70 as its children, 20 and 40 under 30, 60 and 80 under 70, and 35 as the left child of 40. Pre-order visits the root first, in-order visits it between its subtrees, giving the values in order, and post-order visits it last.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

5(d)State how many nodes are compared with 35 when the tree in 5(c) is searched for 35.1 mark

Mark scheme0 / 1
  • L4
Model answer

50, then 30, then 40, then 35: four comparisons.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

5(e)Describe how a hash table stores a record and finds it again, and how a collision can be dealt with.4 marks
Describe

Mark scheme0 / 4
  • LA hashing function is applied to the record's key to give its position (index) in the table
  • LTo find it, the same function is applied to the key, and that position is read directly
  • LA collision is when two keys hash to the same position
  • LDealt with by storing the record in the next free position (linear probing), or by chaining in a linked list at that position
Model answer

A hashing function is applied to the record's key to calculate its position in the table, and the record is stored there. To find it again, the same function is applied to the key, which leads straight to the right position without searching. If two keys hash to the same position, a collision, the second record can be put in the next free position, which is then searched in order, or each position can hold a linked list of every record that hashes to it.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

5(f)Cherry is to be added to the linked list in Figure 1, in alphabetical order, using position 5. State the new value of each pointer.2 marks

Figure 1: a linked list held in an array. The start pointer is 1, the next free position is 5, and -1 marks the end of the list.

IndexDataNext
0Kiwi4
1Apple3
2Fig0
3Banana2
4Mango-1
5

Mark scheme0 / 2
  • L2
  • L5
Model answer

Cherry belongs between Banana and Fig. Cherry takes Banana's old pointer, 2, so it points to Fig, and Banana's pointer changes to 5, Cherry's position.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

5(g)Which one data structure is used to hold the return addresses when subroutines are called?1 mark

Tick one box.

Mark scheme0 / 1
  • LA Stack
Model answer

The most recent call must return first, which is last in, first out: a stack.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

6(a)Simplify the Boolean expression (A ∧ B) ∨ (A ∧ ¬B).1 mark

Mark scheme0 / 1
  • LA
Model answer

A ∧ (B ∨ ¬B) = A ∧ 1 = A.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

6(b)Which one expression is equivalent to ¬(A ∨ B)?1 mark

Tick one box.

Mark scheme0 / 1
  • LD ¬A ∧ ¬B
Model answer

De Morgan's law: negate each term and change OR to AND.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

6(c)Complete the Karnaugh map for Q = (A ∧ ¬B) ∨ C.2 marks
ABC = 0C = 1
00
01
11
10

Mark scheme0 / 2
  • LRows 00 and 01: 0, 1, 0, 1
  • LRows 11 and 10: 0, 1, 1, 1
Model answer

Every cell where C is 1 is 1. A ∧ ¬B adds the cell where AB is 10 and C is 0.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

6(d)Which one expression is represented by the Karnaugh map in Figure 2?1 mark

Figure 2: a Karnaugh map. AB labels the rows and CD the columns.

AB \\ CD00011110
000100
010100
111111
100100

Tick one box.

Mark scheme0 / 1
  • LC (A ∧ B) ∨ (¬C ∧ D)
Model answer

The row AB = 11 is all 1s, giving A ∧ B, and the column CD = 01 is all 1s, giving ¬C ∧ D.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

6(e)Complete the truth table for a half adder.2 marks
ABSumCarry
00
01
10
11

Mark scheme0 / 2
  • LSum column: 0, 1, 1, 0
  • LCarry column: 0, 0, 0, 1
Model answer

Sum is 1 when exactly one input is 1. Carry is 1 only when both are 1.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

6(f)Tick (✓) one box in each row to show the logic gate that produces each output of a half adder.2 marks
ANDORXORNOT
Sum
Carry

Tick one box in each row.

Mark scheme0 / 2
  • LSum: XOR
  • LCarry: AND
Model answer

Sum = A XOR B and Carry = A AND B.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

6(g)Describe the purpose and operation of a D-type flip-flop.3 marks
Describe

Mark scheme0 / 3
  • LIt stores a single bit, so it is used as memory, for example in registers
  • LThe output Q takes the value of the data input D when the clock pulse rises (on the rising edge)
  • LThe output then stays the same, whatever D does, until the next rising edge
Model answer

A D-type flip-flop stores one bit, so it is a building block of registers and memory. On each rising edge of the clock, the output Q takes the value of the data input D. Between rising edges Q holds that value, however D changes.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

7(a)A vet stores data in the three tables shown in Figure 3. Tick (✓) one box in each row to show the type of key.2 marks

Figure 3

Owner

OwnerIDSurnamePhone
10Patel01632 960101
11Okafor01632 960245
12Byrne01632 960377
13Novak01632 960412

Pet

PetIDNameSpeciesOwnerID
1BiscuitDog12
2LunaCat10
3ThumperRabbit11
4ZiggyDog12
5CloverRabbit13
6MochiCat12
7PepperRabbit10

Visit

VisitIDPetIDCost
101145.00
102218.50
1034120.00
104315.00
105632.00
106119.99
107760.00
108520.00
Primary keyForeign key
PetID in the Pet table
OwnerID in the Pet table
PetID in the Visit table
VisitID in the Visit table

Tick one box in each row.

Mark scheme0 / 2
  • L1 mark for both: PetID in the Pet table: Primary key; OwnerID in the Pet table: Foreign key
  • L1 mark for both: PetID in the Visit table: Foreign key; VisitID in the Visit table: Primary key
Model answer

Each table's own ID is its primary key. OwnerID in Pet and PetID in Visit link to other tables, so they are foreign keys.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

7(b)Write an SQL query to return the Name and Species of every pet belonging to the owner with OwnerID 12, in alphabetical order of Name.4 marks
query.sql

Mark scheme0 / 4
  • LSELECT Name, Species
  • LFROM Pet
  • LWHERE OwnerID = 12
  • LORDER BY Name (ASC)
An answer that scores full marks

ORDER BY sorts in ascending order unless DESC is given.

SQL
SELECT Name, Species
FROM Pet
WHERE OwnerID = 12
ORDER BY Name
Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

7(c)Write an SQL query to return the Surname of the owner and the Name of the pet for every pet whose Species is Rabbit.4 marks
query.sql

Mark scheme0 / 4
  • LSELECT Surname, Name
  • LFROM Owner, Pet, or an INNER JOIN of the two tables
  • LJoins the tables: Owner.OwnerID = Pet.OwnerID
  • LOnly the rabbits: Species = 'Rabbit'
An answer that scores full marks

The join condition pairs each pet with its own owner. An INNER JOIN ... ON Owner.OwnerID = Pet.OwnerID with WHERE Species = 'Rabbit' is equally correct.

SQL
SELECT Surname, Name
FROM Owner, Pet
WHERE Owner.OwnerID = Pet.OwnerID
AND Species = 'Rabbit'
Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

7(d)Write an SQL statement to delete every visit that cost less than £20.00.3 marks
query.sql

Mark scheme0 / 3
  • LDELETE FROM Visit
  • LWHERE Cost < 20: every visit costing less than £20.00 is removed
  • LEvery visit costing £20.00 or more is kept, including the one costing exactly £20.00
An answer that scores full marks

Visit 108 cost exactly £20.00, so it must stay: the condition is < 20, not <= 20.

SQL
DELETE FROM Visit
WHERE Cost < 20
Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

7(e)Explain how record locking prevents an update being lost when two users edit the same record at the same time.3 marks
Explain

Mark scheme0 / 3
  • LWhen one user starts to edit a record, the record is locked
  • LNo other user can change it until the first user's transaction is complete and the lock is released
  • LSo the second change is made to the up-to-date record, instead of overwriting the first user's change
Model answer

When the first user opens the record to edit it, the record is locked. A second user cannot change it until the first user's transaction has been completed and the lock released. The second user then works on the updated record, so their change is added to the first rather than overwriting it.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

8(a)Tick (✓) one box in each row to show the layer of the TCP/IP stack that carries out each task.4 marks
ApplicationTransportInternetLink
Splits the data into numbered packets and adds the port number
Adds the source and destination IP addresses, which routers use to forward each packet
Adds MAC addresses and sends the data as signals over the physical connection
Uses the protocol for the program in use, such as HTTP or SMTP, to format the data

Tick one box in each row.

Mark scheme0 / 4
  • LSplits the data into numbered packets and adds the port number: Transport
  • LAdds the source and destination IP addresses, which routers use to forward each packet: Internet
  • LAdds MAC addresses and sends the data as signals over the physical connection: Link
  • LUses the protocol for the program in use, such as HTTP or SMTP, to format the data: Application
Model answer

Application formats, transport packetises and numbers, internet addresses and routes, link transmits.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.

Think this answer or mark scheme is wrong? Report it

8(b)Describe how the domain name in a URL is resolved into an IP address.4 marks
Describe

Mark scheme0 / 4
  • LThe computer first checks its own cache for the IP address
  • LOtherwise the request is sent to a DNS server
  • LIf that server does not know it, the request passes to other DNS servers in the hierarchy: the root, then the top level domain, then the authoritative server
  • LThe IP address is returned, and the browser uses it to connect to the web server
Model answer

The browser first checks its local cache in case the address was looked up recently. If not, it asks a DNS server. If that server does not hold the record, the query is passed up the hierarchy: a root server points to the server for the top level domain, such as .uk, which points to the domain's authoritative server, which holds the IP address. The address is returned to the browser, cached, and used to connect to the web server.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

8(c)Compare packet switching with circuit switching.4 marks
Compare

Mark scheme0 / 4
  • LCircuit switching sets up a dedicated path for the whole communication
  • LPacket switching splits the data into packets that can take different routes
  • LPackets may arrive out of order and are reassembled using their sequence numbers
  • LPacket switching shares the network efficiently and routes round failures; circuit switching suits real-time data because the path and order are guaranteed
Model answer

Circuit switching sets up a dedicated path between the two ends for the whole communication, so data arrives in order with a constant delay, which suits real-time voice, but the path is reserved even when nothing is being sent. Packet switching splits data into numbered packets that each take the best route available, so the links are shared efficiently and packets can be rerouted around a failure. The packets may arrive out of order, and are reassembled using their sequence numbers.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

8(d)PageRank uses the formula PR(A) = (1 - d) + d × (PR(T1) / C(T1) + ... + PR(Tn) / C(Tn)), where T1 to Tn are the pages that link to page A, and C(T) is the number of links out of page T.Pages B and C are the only pages that link to page A. PR(B) = 2 and B links to 4 pages. PR(C) = 1 and C links only to A. Using d = 0.85, calculate PR(A). Show your working.2 marks

Mark scheme0 / 2
  • LCorrect answer, full marks: 1.425
  • LMethod: Works out 2 / 4 + 1 / 1 = 1.5
Model answer

2 / 4 + 1 / 1 = 1.5. 0.85 x 1.5 = 1.275. 0.15 + 1.275 = 1.425.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

9(a)Explain how dictionary coding compresses a text file.3 marks
Explain

Mark scheme0 / 3
  • LWords or patterns that occur often are stored once in a dictionary
  • LEach occurrence in the file is replaced by a short reference to its dictionary entry
  • LThe references take fewer bits than the words, and the file is rebuilt exactly from the dictionary, so it is lossless
Model answer

Dictionary coding builds a dictionary of the words and patterns that appear in the file. Each occurrence is replaced by its short index in the dictionary, which takes far fewer bits than the word itself. The dictionary is stored with the file, so the original can be rebuilt exactly: the compression is lossless.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

9(b)Describe how asymmetric encryption allows a customer to send their card details securely to an online shop.3 marks
Describe

Mark scheme0 / 3
  • LThe shop has a key pair: a public key it shares and a private key it keeps secret
  • LThe customer's browser encrypts the card details with the shop's public key
  • LOnly the shop's private key can decrypt them, so anyone who intercepts the data cannot read it
Model answer

The shop publishes its public key and keeps the matching private key secret. The customer's browser encrypts the card details with the shop's public key. Data encrypted with that key can only be decrypted with the private key, which only the shop holds, so anyone intercepting the data in transit cannot read it.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

9(c)Explain why a website stores the hashes of its users' passwords rather than the passwords themselves.2 marks
Explain

Mark scheme0 / 2
  • LA hash cannot be reversed, so if the database is stolen the passwords are not revealed
  • LWhen a user logs in, the password they enter is hashed and compared with the stored hash
Model answer

Hashing is one-way, so even if attackers steal the database they cannot turn the hashes back into passwords. The site never needs the password itself: it hashes whatever is typed at login and checks that it matches the stored hash.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

10A police force plans to use live facial recognition cameras in a city centre, comparing the face of everyone who walks past with a database of wanted people.Discuss the legal, moral and ethical issues raised by this plan.12 marks
Discuss

Mark scheme0 / 12
  • LIt can help catch wanted criminals and find missing people, improving public safety
  • LEveryone's face is scanned without their consent, including innocent people, which affects their privacy
  • LFaces are biometric data, special category personal data under the Data Protection Act 2018 and UK GDPR
  • LThe data must be processed lawfully, kept only as long as necessary and kept secure
  • LSurveillance by public bodies is governed by the Regulation of Investigatory Powers Act 2000
  • LFalse matches mean innocent people may be stopped or wrongly accused
  • LSystems trained on unrepresentative data can be less accurate for some ethnic groups, which is discriminatory
  • LPeople may feel watched and avoid protests or public places, a chilling effect on freedom
  • LFunction creep: the system could be extended to track ordinary people's movements
  • LThe database could be hacked or leaked, an offence under the Computer Misuse Act 1990
  • LSafeguards: a human checks every match, signs warn the public, and there is independent oversight
  • LReaches a balanced, justified conclusion
Model answer

Supporters argue that live facial recognition helps the police find wanted criminals and missing people quickly, and that its presence may deter crime, making the city centre safer. Legally, a face is biometric data, which the Data Protection Act 2018 and UK GDPR treat as special category personal data. The police need a clear lawful basis, must show the use is necessary and proportionate, must delete the images of people who do not match straight away and must keep the data secure. Covert surveillance by public bodies is also governed by the Regulation of Investigatory Powers Act 2000, and anyone who hacked the system or leaked the watch list would commit an offence under the Computer Misuse Act 1990. Morally, everyone who walks past is scanned without their consent, though nearly all of them are innocent, which is a serious intrusion on privacy. No system is perfectly accurate: a false match can lead to an innocent person being stopped and searched in public. Systems trained on unrepresentative data have been shown to be less accurate for some ethnic groups and for women, so the harm of false matches falls unequally, which is discriminatory. Culturally, people who know they are being watched may change their behaviour, for example avoiding a lawful protest, which has a chilling effect on freedom of expression and assembly and can damage trust between the public and the police. There is also the risk of function creep, in which a system introduced to find wanted criminals is gradually extended to track the movements of ordinary people. On balance the technology can be justified only with strong safeguards: a narrow watch list, a trained officer checking every match before anyone is stopped, clear signs telling the public it is in use, independent oversight and published accuracy figures. Without those, the harm to privacy and fairness outweighs the benefit.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.

Think this answer or mark scheme is wrong? Report it

Machine mark 0 / 140