Question 1
[2 marks]
Answer
[3 marks]
Answer
Computer Science · AQA 8525 · Paper 1: Computational thinking and programming skills · June 2018
[2 marks]
[3 marks]
[1 mark]
[1 mark]
[1 mark]
[1 mark]
[1 mark]
[1 mark]
[1 mark]
[1 mark]
[1 mark]
State the arithmetic effect of applying a left binary shift of 3 to a binary number.
[1 mark]
[1 mark]
[2 marks]
You should show your working.
[4 marks]
the number of bit patterns available from 16 to 32. Shade one lozenge which shows the minimum sample resolution (in bits) she can choose that will allow her to do this.
[1 mark]
[1 mark]
CHAR_TO_CODE (' a ') returns the value 97 CHAR_TO_CODE (' z ') returns the value 122 CHAR_TO_CODE(' ` ') returns the value 96 CHAR_TO_CODE(' { ') returns the value 123
Develop an algorithm, using either pseudo-code or a flowchart, that:
asks the user to enter a character
outputs 'LOWER' if the user has entered a lowercase character
outputs 'NOT LOWER' if the user has entered any other character.
You must use the built-in CHAR_TO_CODE subroutine in your answer.
[7 marks]
[1 mark]
Explain why this is a better choice than using the identifier s.
[2 marks]
[1 mark]
[6 marks]
[3 marks]
[1 mark]
State two reasons why the programmer decided to implement the algorithm as a subroutine.
Reason 1:
[2 marks]
[8 marks]
[1 mark]
• The system has two sensors, A1 and A2, that detect if a customer is near. The audio plays if either of these sensors is activated.
• The system should only play if another audio system, S, is not playing.
• The output from the circuit, for whether the advert should play or not, is Q.
Complete the logic circuit for this system.
[3 marks]
BLOCK_ON_TOP(column) returns the label of the block on top of the column given as a parameter.
MOVE(source, destination) moves the block on top of the source column to the top of the destination column. HEIGHT(column) returns the number of blocks in the specified column.
[3 marks]
[3 marks]
[3 marks]
Your algorithm should work however many blocks start in column 0. You may assume there will always be at least one block in column 0 at the start and that the other columns are empty.
The order of the blocks must be preserved.
The MOVE subroutine must be used to move a block from one column to another. You should also use the HEIGHT subroutine in your answer.
For example, if the starting arrangement of the blocks is:
Then the final arrangement should have block B above block A:
[5 marks]
Authenticate('alice', 'woof2006')
[3 marks]
Authenticate('bob', 'abf32')
[1 mark]
[1 mark]
He also replaces line 14 with
RETURN false
Explain how the programmer has made the subroutine more efficient.
[2 marks]
The paper as printed
Spotted a mistake on this page?Report a problem