100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

AQA AS COMPUTER SCIENCE Paper 1 FOR MAY 2023

Rating
-
Sold
-
Pages
21
Grade
A
Uploaded on
17-06-2023
Written in
2022/2023

AQA AS COMPUTER SCIENCE Paper 1 Tuesday 16 May 2023 Afternoon Time allowed: 1 hour 45 minutes Materials For this paper you must have: • a computer • a printer • appropriate software • the Electronic Answer Document • an electronic version and a hard copy of the Skeleton Program • an electronic version and a hard copy of the Preliminary Material • an electronic version of the Data Files , and . You must not use a calculator. Instructions • Type the information required on the front of your Electronic Answer Document. • Before the start of the examination make sure your Centre Number, Candidate Name and Candidate Number are shown clearly in the footer of every page (not the front cover) of your Electronic Answer Document. • Enter your answers into the Electronic Answer Document. • Answer all questions. • Save your work at regular intervals. Information • The marks for questions are shown in brackets. • The maximum mark for this paper is 75. • No extra time is allowed for printing and collating. • The question paper is divided into three sections. Advice You are advised to allocate time to each section as follows: Section A – 20 minutes; Section B – 25 minutes; Section C – 60 minutes. At the end of the examination Tie together all your printed Electronic Answer Document pages and hand them to the Invigilator. Warning It may not be possible to issue a result for this paper if your details are not on every page of your Electronic Answer Document. Section A You are advised to spend no more than 20 minutes on this section. Enter your answers to Section A in your Electronic Answer Document. You must save this document at regular intervals. Question 05 in this section asks you to write program code starting from a new program/project/file. You are advised to save your program at regular intervals. 0 1 A security system uses a motion sensor, a keypad and an alarm bell. The system operates as follows: • the system is initially off • when the system is switched on it goes into sensing mode • the system can be switched off at any time by entering the correct code on the keypad • if the system detects movement while in sensing mode it goes into alert mode • after the system has been in alert mode for 10 seconds, it enters the alarm bell ringing mode • if an incorrect code is entered on the keypad, once the system has been switched on, the system remains in its current mode. Figure 1 shows a partially completed state transition diagram that represents the operation of the security system. Three of the states are labelled (X) to (Z) and events are labelled (A) to (I). Figure 1 Complete Table 1 by filling in the unshaded cells with the correct labels from Figure 1. You should write: • which labels, (X) to (Z), represent which state • which labels (A) to (I) represent which event(s). Some of the events will be assigned more than one label. Each label must only be used once. Table 1 Event / State Label(s): (A) to (I), (X) to (Z) Alarm bell ringing mode Alert mode Detect movement Enter correct code Enter incorrect code Sensing mode Switch on 10 second delay elapsed Copy the contents of all the unshaded cells in Table 1 into your Electronic Answer Document. [6 marks] Turn over for the next question Turn over ► 0 2 The algorithm, represented using pseudo-code in Figure 2, describes a method to rearrange four numbers in a data structure. Figure 2 Numbers[0]  45 Numbers[1]  19 Numbers[2]  62 Numbers[3]  12 FOR X  1 TO 3 Y  X - 1 N  Numbers[X] WHILE Y > -1 AND N < Numbers[Y] Numbers[Y + 1]  Numbers[Y] Y  Y - 1 ENDWHILE Numbers[Y + 1]  N ENDFOR Complete Table 2 by hand-tracing the algorithm in Figure 2. You may not need to use all the rows in Table 2. The first row of Table 2 has already been completed for you. Table 2 X Y N Numbers [0] [1] [2] [3] 45 19 62 12 Copy the contents of all the unshaded cells in Table 2 into your Electronic Answer Document. [5 marks] Describe one difference between a global variable and a local variable. [2 marks] Define the term algorithm. [2 marks] Turn over for the next question Turn over ► The algorithm, represented using pseudo-code, in Figure 3 outputs a series of integers. The output depends upon the value entered by the user. Figure 3 OUTPUT "Enter an integer greater than 1: " INPUT Number X  2 Count  0 WHILE Number > 1 Multi  FALSE WHILE (Number MOD X) = 0 IF NOT Multi THEN OUTPUT X ENDIF Count  Count + 1 Multi  TRUE Number  Number DIV X ENDWHILE X  X + 1 ENDWHILE OUTPUT Count Table 3 lists the MOD and DIV operators for each of the available programming languages. You should refer to the row for your programming language. Table 3 Programming language MOD DIV C# % / Java % / Pascal mod div Python % // VB.NET Mod What you need to do: Task 1 Write a program to implement the algorithm in Figure 3. Task 2 Test that your program works: • run your program, then enter the number 23 • run your program, then enter the number 25 • run your program, then enter the number 1260 Turn over for the next section Turn over ► Section B You are advised to spend no more than 25 minutes on this section. Enter your answers to Section B in your Electronic Answer Document. You must save this document at regular intervals. These questions refer to the Preliminary Material and the Skeleton Program, but do not require any additional programming. Refer either to the Preliminary Material issued with this question paper or your electronic copy. State the identifier for: . a variable that is used to store a Boolean value. [1 mark] . a user-defined subroutine that returns only one value that is an integer. [1 mark] . a user-defined subroutine that returns only one value that is a single character. [1 mark] . a user-defined subroutine that contains exception handling. [1 mark] The Skeleton Program uses a number of data structures. . State the identifier of a data structure that stores values of more than one data type. [1 mark] . State the identifier of a data structure that stores values of only one data type. [1 mark] The Skeleton Program models a very simple processor. Many details of how a real processor works were removed because they did not need to be included for the purposes of the simulation. State the computing term that best describes the concept of removing detail that is unnecessary from a problem when developing a solution. [1 mark] When the Skeleton Program detects an error it outputs an error code which is a number between 1 and 11. The error codes could be replaced by more helpful error messages. Complete Table 4 by writing the most appropriate error code from the Skeleton Program next to each proposed error message. Table 4 Proposed error message Error code Duplicate label found File not found No assembled code to run No source code to display Unknown opcode Copy the contents of all the unshaded cells in Table 4 into your Electronic Answer Document. [5 marks] Turn over for the next question Turn over ► This question refers to the subroutine PassTwo. State two conditions that need to be met for error code 6 to be reported during the assembly process of the program. [2 marks] This question refers to the subroutine ExtractOperand. . Describe the purpose of the FOR loop and the IF statement inside it. [2 marks] . Describe the purpose of the IF statement after the FOR loop. [2 marks] . Describe why a WHILE loop might have been a better choice than a FOR loop. [2 marks]

Show more Read less










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
June 17, 2023
Number of pages
21
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Content preview

AS COMP PPR 1 2023

AQA
AS

COMPUTER SCIENCE
Paper 1


Tuesday 16 May 2023 Afternoon Time allowed: 1 hour 45
minutes
Materials
For this paper you must have:
 a computer
 a printer
 appropriate software
 the Electronic Answer Document
 an electronic version and a hard copy of the Skeleton Program
 an electronic version and a hard copy of the Preliminary Material
 an electronic version of the Data Files prog1.txt, prog2.txt and
prog3.txt. You must not use a calculator.

Instructions
 Type the information required on the front of your Electronic Answer Document.
 Before the start of the examination make sure your Centre Number, Candidate
Name and Candidate Number are shown clearly in the footer of every page (not the
front cover) of your Electronic Answer Document.
 Enter your answers into the Electronic Answer Document.
 Answer all questions.
 Save your work at regular intervals.

Information
 The marks for questions are shown in brackets.
 The maximum mark for this paper is 75.
 No extra time is allowed for printing and collating.
 The question paper is divided into three sections.

Advice
You are advised to allocate time to each section as follows:
Section A – 20 minutes; Section B – 25 minutes; Section C – 60 minutes.

At the end of the examination
Tie together all your printed Electronic Answer Document pages and hand them to the
Invigilator.

Warning
It may not be possible to issue a result for this paper if your details are not on every
page of your Electronic Answer Document.



1

,COMP


Section A

You are advised to spend no more than 20 minutes on this section.

Enter your answers to Section A in your Electronic Answer Document. You must save
this document at regular intervals.

Question 05 in this section asks you to write program code starting from a new
program/project/file.

You are advised to save your program at regular intervals.


0 1 A security system uses a motion sensor, a keypad and an

alarm bell. The system operates as follows:

 the system is initially off
 when the system is switched on it goes into sensing mode
 the system can be switched off at any time by entering the correct
code on the keypad
 if the system detects movement while in sensing mode it goes into alert
mode
 after the system has been in alert mode for 10 seconds, it enters the
alarm bell ringing mode
 if an incorrect code is entered on the keypad, once the system has
been switched on, the system remains in its current mode.

Figure 1 shows a partially completed state transition diagram that
represents the operation of the security system. Three of the states are
labelled (X) to (Z) and events are labelled (A) to (I).
Figure 1




2

, COMP


Complete Table 1 by filling in the unshaded cells with the correct labels from
Figure 1. You should write:

 which labels, (X) to (Z), represent which state
 which labels (A) to (I) represent which event(s).

Some of the events will be assigned more than

one label. Each label must only be used once.

Table 1

Event / State Label(s): (A) to (I), (X) to (Z)

Alarm bell ringing mode

Alert mode

Detect movement

Enter correct code

Enter incorrect code

Sensing mode

Switch on

10 second delay elapsed



Copy the contents of all the unshaded cells in Table 1 into your
Electronic Answer Document.
[6 marks]



Turn over for the next question




3

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Intelligentexceller17 Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
90
Member since
2 year
Number of followers
64
Documents
277
Last sold
1 month ago

3.8

17 reviews

5
9
4
3
3
1
2
0
1
4

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions