A-level Computing/AQA/Paper 1/Skeleton program/AS2023
AQA computer science Assembler Simulator
This is for the AQA AS Computer Science Specification.
This is where suggestions can be made about what some of the questions might be and how we can solve them.
Please be respectful and do not vandalise or tamper with the page, as this would affect pupils' preparation for their exams.
Section A Predictions
[edit | edit source]The 2023 paper 1 section A will contain 5 questions worth 25 marks. (Q1 - 6 marks, Q2 - 5 marks, Q3 - 2 marks, Q4 - 2 marks, Q5 - 10 marks). Note that Q5 contains 2 parts meaning that it is likely to be a question asking you to write a program in your selected programming language from pseudo code given, also asking you to insert a screenshot for the 2nd part.
What is an algorithm? 2 marks
Finite state machines
Mr Cross (Isle of Wight Ferry System question)
Trace tables
Section B Predictions
[edit | edit source]The 2023 paper 1 section B will contain 6 questions worth 20 marks. (Q6 - 4 marks, Q7 - 2 marks, Q8 - 1 mark, Q9 - 5 marks, Q10 - 2 marks, Q11 - 6 marks.)
- state the identifier of a user-defined subroutine in the program that returns a singe value that is an integer
- state the identifier of a user-defined subroutine in the program that returns a single value that is a single character
1. State the name of an identifier for:
a variable that is used to store a single character. a user -defined subroutine that has one parameter. a user-defined subroutine that returns an integer a user-defined procedure
2. A constant is used to hold the maximum memory. State one advantage of using named constants for constant values.
3. Explain what is meant by exception handling and how exception handling could be used in the EditSourceCode subroutine.
4. A structured programming approach has been used in the production of the Skeleton Program. Explain what is meant by a structured programming approach.
5. There is a variable called NumberOfLines in the subroutine Assemble . There is also a different variable called NumberOfLines in the subroutine DisplayCode. Explain why these two different variables can have the same identifier.
6. Several subroutines use a variable NumberOfLines. It could have been declared as a global variable instead of locally in each subroutine. Why is it good practice to use local variables?
7. State the name of an identifier for:
An array. A dictionary a local variable used to store a string value.
8. Explain how data is shared between the separate subroutines.
9. Explain what will happen if the number of lines supplied in the data file is greater than the number of index positions in SourceCode array.
10. SourceCode is an array but a list could have been used. Describe two differences between arrays and lists and give an advantage of using an Array over a List?
11. This question refers to the subroutine UpdateSymbolTablel. Give an example of why error code 3 would be displayed and explain how the code will detect the error caused by the text file.
12. State the identifier for a:
user-defined subroutine that uses nested indefinite iteration. data structure that stores values of more than one data type. data structure that stores values of only one data type.
13. What is the purpose of a hierarchy chart?
14. What does each box in a hierarchy chart represent?
15. State the most appropriate data type to use for whole numbers
16. The Skeleton Program uses the data structure SourceCode. State what the first element of this data structure, SourceCode[0], is used for.
17. Explain what is meant by decomposition.
18. Explain the differences between definite and indefinite iteration.
19. State the identifier of a subroutine in the Skeleton Program that contains definite iteration.
20. State the identifier of a subroutine in the Skeleton Program that contains indefinite iteration.
21. What is a subroutine?
22. The use of subroutines promotes code re-use. Describe, with references to subroutine(s) in the Skeleton Program, an example of how a subroutine has been re-used.
23. Describe an advantage of re-using subroutines.
24. Why is a for loop used with the sourcecode index 0 and not a while loop?
25. BinaryString is stored as a string but only contains integers, why is this?
26. Explaining the 11 error codes.
27. A stack has been used, explain how a stack differs from a queue.
28. The class AssemblerInstruction has three attributes which are all public, how can you tell this? What does this mean?
29. What does the term instantiation mean?
30. When would the operandstring and operandvalue be the same thing within an object.
31. What does the operandvalue store for each object.
32. When will it start as Jump1
33. Currently a number in the ACC which is a negative overflow does not produce a runtime error, why not?
Section C Predictions
[edit | edit source]Programming Questions on Skeleton Program
The 2023 paper 1 section C contains 4 questions worth 30 marks. (Q12 - 5 marks, Q13 - 6 marks, Q14 - 5 marks, Q15 - 14 marks. These marks include the screen capture(s), so the likely marks for the coding will be 1-2 marks lower.)
1. Add Validation to the EditSourceCode subroutine.
This could be to make sure the line number is in range To make sure the line is of minimum length To format the label, opcode, operand and comment.
2.Add new opcodes
BNE SHR BGT SHL BLT LSR AND LSL OR EOR NOT
3. Being able to save an edited text file into a new one.
Prog2 has gaps between lines 6 and 9. They could ask you to add some assembly code then save the file. Saving the file could be to overwrite or into a new file which the user provides the name for.
4. Edit line, double check the entry is an integer and also exists within the amount of lines in that program.
5. Add Insert and Delete options in the subroutine EditSourceCode