Past-paper question · 2025 October-November · Paper 23 · Q7(b)

Question 7(b) 2025 · October-November · Paper 23 · 1 mark

Original past-paper question for 7(B)
Original past-paper question for 7(B)
Reveal official mark-scheme answer Official mark-scheme answer for 7(B)

Official answer for Question 7

Part (b)

✓
Any one from:

Question 1

✓
•
✓
Input
✓
•
✓
Output
✓
•
✓
Iteration

Mark scheme 0478_w25_ms_23.pdf →

Show text version of question

Question 7

Part (b)

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

Part (b)

Identify one programming technique used in the algorithm.

.............................................................................................................................................

[1]
Topic relevance

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 0478_w25_qp_23.pdf

Keep practising this topic