All papers

Computer Science · AQA 8525 · Paper 1: Computational thinking and programming skills · November 2021

AQA GCSE Computer Science Paper 1: Computational thinking and programming skills November 2021 question paper 8525/1

2h 90 marks

AQA 8525 · Paper 1

9 questions
Report a problem
What is wrong?

Goes to whoever maintains the question split. No account needed and nothing is published on this page.

Question 1

Match the computer science process to each correct label.

You should write a label A – F next to each process.

You should not use the same label more than once.

A Abstraction

B Data validation

C Decomposition

D Efficiency

E Random number generation

F Variable assignment

Figure for question 1

[3 marks]

Answer
Mark scheme for question 1

Question 2

The algorithm shown in Figure 1 is designed to help an athlete with their training. It uses two subroutines getBPM and wait:

• getBPM() returns the athlete’s heart rate in beats per minute from an external input device

• wait(n) pauses the execution of the algorithm for n seconds, so wait(60) would pause the algorithm for 60 seconds.

Line numbers have been included but are not part of the algorithm.

Figure 1

Question 2, shown as an image
Answer
Mark scheme for question 2

State the most appropriate data type of the variable seconds in the algorithm shown in Figure 1.

[1 mark]

Answer
Mark scheme for question 2.1

Explain why rest could have been defined as a constant in the algorithm shown in Figure 1.

[1 mark]

Answer
Mark scheme for question 2.2

State the line number where iteration is first used in the algorithm shown in Figure 1.

[1 mark]

Answer
Mark scheme for question 2.3

Complete the trace table for the algorithm shown in Figure 1.

Some values have already been entered in the trace table:

• the first value of seconds

• the values returned by the subroutine getBPM that are assigned to the variable bpm.

You may not need to use all rows of the trace table.

Figure for question 2

[4 marks]

Answer
Mark scheme for question 2.4

Question 3

A developer is writing a program to convert a sequence of integers that represent playing cards to Unicode text.

The developer has identified that they need to create the subroutines shown in Figure 2 to complete the program.

Figure for question 3
Answer
Mark scheme for question 3

Explain how the developer has used the structured approach to programming.

[2 marks]

Answer
Mark scheme for question 3.1

State two benefits to the developer of using the three separate subroutines described in Figure 2 instead of writing the program without using subroutines.

[2 marks]

Answer
Mark scheme for question 3.2

Figure 3 shows the subroutine convert described in Figure 2.

Question 3, shown as an image

Figure 3

SUBROUTINE convert(cards)

Question 3, shown as an image

State the pseudo-code that should be written in place of the labels in the subroutine written in Figure 3.

Question 3, shown as an image

[5 marks]

Answer
Mark scheme for question 3.3

Shade one lozenge that states why Unicode is now commonly used in preference to ASCII.

Figure for question 3

[1 mark]

Answer
Mark scheme for question 3.4

Question 4

Answer
Mark scheme for question 4

A student has written the following statements about representing images. Two are correct and two are incorrect:

Statement 1 “Bitmap images are made up of pixels.”

Statement 2 “A 2 pixel by 4 pixel bitmap image contains 16 pixels.”

Statement 3 “A pixel is a single point in a graphical image.”

Statement 4 “Black and white images have a minimum colour depth of two.”

Write the correct versions of the two incorrect statements that the student has made.

First corrected statement

Second corrected statement

[2 marks]

Calculate the minimum file size in bits of a 10 pixel by 10 pixel image with a colour depth of 3 bits.

[1 mark]

Calculate the minimum file size in bytes of a 10 pixel by 10 pixel image with 12 different colours.

You should show your working.

[3 marks]

This is one row of a bitmap image that uses different shades of grey:

Figure for question 4

This row is stored using the following numbers to represent the different shades of grey:

Figure for question 4

The algorithm shown in Figure 4 uses this row.

Figure 4

Question 4, shown as an image

Complete the trace table for the algorithm shown in Figure 4. The first values have already been entered. You may not need to use all rows of the trace table.

Figure for question 4

[3 marks]

State the purpose of the algorithm shown in Figure 4.

[1 mark]

Question 5

Answer
Mark scheme for question 5
Figure for question 5

[2 marks]

State two advantages of programming using a high-level language compared with programming using a low-level language.

Advantage 1

Advantage 2

[2 marks]

Develop an algorithm, using either pseudo-code or a flowchart, that checks if the user has entered a string that represents a valid machine code instruction.

The machine code instruction is valid if it contains exactly eight characters and all of those characters are either '0' or '1'.

The algorithm should:

• prompt the user to enter an 8-bit machine code instruction and store it in a variable

• check that the instruction only contains the characters '0' or '1'

• check that the instruction is exactly eight characters long

• output 'ok' when the instruction is valid, otherwise it should output 'wrong'.

For example:

• if the user enters the string '00101110' it should output 'ok'

• if the user enters the string '11110' it should output 'wrong'

• if the user enters the string '1x011001' it should output 'wrong'.

[9 marks]

Question 6

Answer
Mark scheme for question 6
Figure for question 6

[3 marks]

Figure for question 6

[3 marks]

State why binary search is considered a better algorithm than linear search.

[1 mark]

The algorithm in Figure 5 is a new search algorithm.

Figure 5

Question 6, shown as an image

Complete the trace table for the algorithm in Figure 5. The first row has been completed for you. You may not need to use all rows of the trace table.

Figure for question 6

[4 marks]

Question 7

Answer
Mark scheme for question 7
Figure for question 7

[1 mark]

Shade one lozenge to show the Boolean expression that is equivalent to the logic circuit shown in Figure 6.

Figure for question 7

[1 mark]

Shade one lozenge to show the Boolean expression which is equivalent to the logic circuit shown in Figure 7.

Figure for question 7

[1 mark]

Figure 8 shows an algorithm.

Figure 8

Question 7, shown as an image

State the output from the algorithm shown in Figure 8.

[2 marks]

Draw a logic circuit in the box below for the following scenario.

A sewing machine is running (R) if either the foot pedal is on (F) or the hand dial is on (H) but not both.

You should use only the gates AND, OR and NOT in your answer.

Figure for question 7

[3 marks]

Develop an algorithm, using either pseudo-code or a flowchart, that prompts the user to enter three values. It should output 'duplicate' if at least two of these values are the same.

The start of the algorithm has been written for you.

Question 7, shown as an image

[3 marks]

Question 8

Figure for question 8

[3 marks]

Answer
Mark scheme for question 8

Question 9

The Algebraic Patent Sewing Machine is a programmable sewing machine that creates patterns on rows of cloth. It is controlled by writing programs that use the following subroutines:

SubroutineDescription
gotoRow(n)start the sewing machine needle at the left-hand side of row n
move(n)move the needle forward by n cells without producing a pattern
shape(s)produce shape s where s can be 'square' or 'circle' and move the needle to the next cell
atEnd()returns True if the needle is at the end of the row or False otherwise

For example, if the cloth looks like this to begin with:

Figure for question 9

The subroutine call gotoRow(2) will place the sewing machine needle at the point shown by the black cross:

Figure for question 9

The subroutine call move(3) will move the sewing machine needle to the point shown by the black cross:

Figure for question 9

The subroutine call gotoRow(1) will move the sewing machine needle to the point

shown by the black cross:

Figure for question 9

The subroutine call shape('square') will draw the following pattern and move the sewing machine needle to the point shown by the black cross:

Figure for question 9

And finally, the subroutine call shape('circle') will draw the following pattern and move the sewing machine needle to the point shown by the black cross:

Figure for question 9

All of the previous positions of the sewing machine needle would result in the subroutine call atEnd() returning False, however in the following example atEnd() would return True:

Figure for question 9
Answer
Mark scheme for question 9
Figure for question 9

[4 marks]

Answer
Mark scheme for question 9.1

Draw the final pattern after the following algorithm has executed.

This question uses the MOD operator. MOD calculates the remainder after integer division, for example 7 MOD 5 = 2.

patterns maths symbol ['circle', 'square', 'square', 'circle']

Question 9, shown as an image

You should draw your answer on the following grid.

You do not need to show the position(s) of the needle in your answer.

Figure for question 9

[4 marks]

Answer
Mark scheme for question 9.2

Develop an algorithm, using either pseudo-code or a flowchart, to produce the pattern shown in Figure 9.

To gain full marks your answer must make appropriate use of iteration.

Figure for question 9

[4 marks]

Answer
Mark scheme for question 9.3

The paper as printed

Spotted a mistake on this page?Report a problem