Question 7(c)(ii) 2025 · October-November · Paper 23 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 7
Part (c)
(ii)
Question 3
Show text version of question
Question 7
Part (c)
(ii)
Question 7
An algorithm has been written in pseudocode to:
- input a whole number between 1 and 255 inclusive
- convert the input to an 8-bit binary number
- store each bit of the binary number in an array.
For example, if the denary number 127 was input, the binary number 01111111 would be stored in the array.
01 DECLARE BinaryArray : ARRAY[1:8] OF INTEGER 02 DECLARE DenaryNumber : CHAR
03 OUTPUT "Please enter a whole number between 1 and 255 inclusive " 04 INPUT DenaryNumber 05 FOR Count 7 TO 1 STEP -1 06 BinaryArray[Count] MOD(DenaryNumber,3) 07 DenaryNumber DIV(DenaryNumber,2) 08 NEXT Count
(ii)
Write the pseudocode to implement the validation check you identified in (c)(i).
You do not need to rewrite the whole algorithm.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.....................................................................................................................................
* 0000800000010 * DFD
Question 10
, ,
Why this question appears here
98% assigned-topic match · Algorithm design and problem-solving
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 2210_w25_qp_23.pdf
