Loading....
|
Press & Hold to Drag Around |
|||
|
Click Here to Close |
|||
Question 1 Report
A museum uses an electronic display to show visitor numbers. The display controller has an 8-bit unsigned register containing 11001001. It performs a left shift by one position to calculate a test value for its diagnostic algorithm.
(a) Give the 8-bit result of the left shift. [2]
(b) State the bit that is lost from the register. [1]
(c) State whether overflow has occurred. [1]
A marine research vessel labels samples with a 5-bit binary number. Sample 10110 is followed by the next sample number. The onboard computer uses an increment algorithm rather than converting each value to denary first.
(a) Give the binary number for the next sample. [2]
(b) State the denary value of sample 10110. [1]
(c) State the denary value of the next sample. [1]
Display controller
Sample labels
Display controller
Sample labels
Question 2 Report
Fig. 1 shows test data from a drone survey. The computer must arrange image file sizes in ascending order before uploading them over a network. The diagram compares the number of adjacent comparisons made by bubble sort in successive passes. The final pass has no red swap arrows.
(a) State the sorted array shown at the end of Fig. 1. [1]
(b) Give the total number of swaps shown. [2]
(c) State the pass on which an optimised bubble sort can stop. [1]
(d) Explain why no further pass is needed at this point. [2]
(e) Give the maximum number of comparisons an unoptimised bubble sort makes when sorting five values. [3]
Bubble sort repeatedly compares adjacent values. For ascending order, a pair is swapped when the left value is larger than the right value.
Bubble sort repeatedly compares adjacent values. For ascending order, a pair is swapped when the left value is larger than the right value.
Question 3 Report
The computer in an automated pet feeder releases food when the hopper contains food and either the feeding time has arrived or the owner has used the app. It must not release food if a bowl sensor reports that the bowl is full. The Boolean names are foodAvailable, feedingTime, appRequest and bowlFull.
(a) Give a Boolean expression for releaseFood. [4]
(b) State the output when foodAvailable is true, feedingTime is true, appRequest is false and bowlFull is true. [1]
(c) State the output when foodAvailable is true, feedingTime is false, appRequest is true and bowlFull is false. [1]
(d) State the output when foodAvailable is false, feedingTime is true, appRequest is true and bowlFull is false. [1]
(e) Give one test case where changing only bowlFull changes the output from true to false. [3]
The feeder needs food, a time-based or app-based request, and a bowl that is not full.
foodAvailable AND (feedingTime OR appRequest) AND NOT bowlFull. [4]NOT bowlFull is false. The output is false. [1]foodAvailable=true, feedingTime=true, and appRequest=false. With bowlFull=false, output is true; changing only bowlFull to true makes output false. [3]The feeder needs food, a time-based or app-based request, and a bowl that is not full.
foodAvailable AND (feedingTime OR appRequest) AND NOT bowlFull. [4]NOT bowlFull is false. The output is false. [1]foodAvailable=true, feedingTime=true, and appRequest=false. With bowlFull=false, output is true; changing only bowlFull to true makes output false. [3]Question 4 Report
The emergency radio network records equipment inspections using Fig. 1. Each radio has a serial number. Inspectors complete several checks during one inspection, and the database must record the result of every check without repeating the inspection date for each item.
(a) State the relationship between Inspection and CheckResult. [1]
(b) Give two fields that could form a composite key in CheckResult. [2]
(c) State one field that should be stored in Inspection. [1]
(d) Give one advantage of this design over placing Check1, Check2 and Check3 in Inspection. [1]
(e) State a suitable data type for a pass or fail result. [1]
This design separates an inspection from its individual check results. It avoids storing a fixed set of repeating Check fields.
This design separates an inspection from its individual check results. It avoids storing a fixed set of repeating Check fields.
Question 5 Report
The art gallery uses Fig. 1 in its online catalogue to show a painting frame. A programmer writes an algorithm that converts the frame image from 8-bit grey scale to black and white. Pixels with a grey value below 128 become black; all other pixels become white.
(a) State the output colour for a pixel with grey value 45. [1]
The conversion rule is: grey values below 128 become black, while values of 128 or above become white.
The conversion rule is: grey values below 128 become black, while values of 128 or above become white.
Question 6 Report
The computer used to calibrate an electric ferry records a change in motor torque as an 8-bit two's complement binary number. During a harbour test, the engineer sees the diagnostic display in Fig. 1. A negative number means that the control algorithm must reduce torque. The computer has allocated one byte of memory for each reading.
Fig. 1
(a) State whether the number in Fig. 1 is positive or negative. [1]
(b) Give the decimal value represented by the binary number in Fig. 1. Show your working. [3]
(c) State the greatest positive decimal number that can be stored in this 8-bit two's complement format. [1]
(d) Give one reason why two's complement is used instead of storing a separate sign symbol and an unsigned binary magnitude. [1]
(a) The most significant bit is 1. In two's complement, this indicates a negative number. [1]
(b) To find the magnitude of a negative two's complement number, invert every bit and add 1:
Stored value: 10011010 Invert bits: 01100101 Add 1: 01100110
\(01100110_2=64+32+4+2=102\). Since the original value was negative, the decimal value is −102. [3]
(c) For an 8-bit two's complement number, the greatest positive value is \(2^7-1=127\). One bit is used to distinguish positive from negative values. [1]
(d) Two's complement allows addition and subtraction to use the same binary arithmetic circuitry for positive and negative values. This is an advantage over separate sign-and-magnitude storage. [1]
Examination reminder: Do not treat a negative two's complement number as ordinary unsigned binary. Invert and add 1, then apply the negative sign.
(a) The most significant bit is 1. In two's complement, this indicates a negative number. [1]
(b) To find the magnitude of a negative two's complement number, invert every bit and add 1:
Stored value: 10011010 Invert bits: 01100101 Add 1: 01100110
\(01100110_2=64+32+4+2=102\). Since the original value was negative, the decimal value is −102. [3]
(c) For an 8-bit two's complement number, the greatest positive value is \(2^7-1=127\). One bit is used to distinguish positive from negative values. [1]
(d) Two's complement allows addition and subtraction to use the same binary arithmetic circuitry for positive and negative values. This is an advantage over separate sign-and-magnitude storage. [1]
Examination reminder: Do not treat a negative two's complement number as ordinary unsigned binary. Invert and add 1, then apply the negative sign.
Question 7 Report
Fig. 1 shows a robot warehouse route selector. The robot can use the narrow aisle when its load is light or its battery is low. The Boolean variables lightLoad and lowBattery are set by sensors before the route algorithm runs.
(a) State the output when both sensor values are true. [1]
(b) Give the output when lightLoad is false and lowBattery is true. [1]
(c) State the output when both values are false. [1]
(d) Give a Boolean expression for a different route that is selected only when the load is light and the battery is not low. [3]
An OR operation produces true when at least one input is true.
lightLoad OR lowBattery is true. [1]lowBattery input is enough for an OR gate, so the output is true. [1]lightLoad AND NOT lowBattery. AND requires both conditions, while NOT reverses the value of lowBattery. [3]Exam reminder: OR means one or both inputs can be true; AND means every required input must be true.
An OR operation produces true when at least one input is true.
lightLoad OR lowBattery is true. [1]lowBattery input is enough for an OR gate, so the output is true. [1]lightLoad AND NOT lowBattery. AND requires both conditions, while NOT reverses the value of lowBattery. [3]Exam reminder: OR means one or both inputs can be true; AND means every required input must be true.
Question 8 Report
The museum alarm circuit uses the logic diagram in Fig. 1. A display case opens a reed switch, giving input A a value of 1. At night, input B is set to 1 by the security computer. The siren is connected to the output.
(a) State the output when A is 0 and B is 0. [1]
(b) Give all binary input pairs that make the siren output 1. [3]
For each input, the road tunnel controller uses the circuit in Fig. 1. V is 1 when poor visibility is detected. W is 1 when the road surface is wet. The variable-speed sign should show a reduced limit only when exactly one of these conditions is true.
(a) State the name of the gate. [1]
(b) Give the sign output for V = 1, W = 0 and for V = 0, W = 1. [2]
(c) State the sign output for V = 1, W = 1. [1]
(d) Give one reason why an OR gate would not meet this requirement. [1]
The museum circuit is an OR gate, so the siren operates whenever at least one input is 1. The road-tunnel circuit is an XOR gate, which outputs 1 only when the inputs are different.
The museum circuit is an OR gate, so the siren operates whenever at least one input is 1. The road-tunnel circuit is an XOR gate, which outputs 1 only when the inputs are different.
Question 9 Report
Fig. 1 shows two binary quantities used by a drone controller. The controller adds them to calculate the combined number of image files held in a memory buffer. The box is limited to 8 bits.
(a) Give the full binary result of the addition. [2]
(b) State whether an overflow occurs in the 8-bit box. [1]
Would you like to proceed with this action?