AS Level Past Paper Questions
WJEC AS Level Computer Science
Draw a truth table for the following Boolean expression:: X = P ⊕ Q + R·(P + Q̄)
| P | Q | R | Q̄ | P⊕Q | P+Q̄ | R·(P+Q̄) | X |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | |||||
| 0 | 0 | 1 | |||||
| 0 | 1 | 0 | |||||
| 0 | 1 | 1 | |||||
| 1 | 0 | 0 | |||||
| 1 | 0 | 1 | |||||
| 1 | 1 | 0 | |||||
| 1 | 1 | 1 |
Describe the typical contents of a TCP/IP packet.
Explain network collisions, how they are detected, and dealt with.
Clearly showing each step, simplify the following Boolean expression:
A·(B + C) + C·(A + C) + B·(B + A)
Describe the term 'word length' in relation to a CPU.
Convert the denary number 27₁₀ and the hexadecimal number 7E₁₆ into two 8-bit binary numbers. Add the two numbers together using binary addition, leaving your answer in binary.
You must show all of your workings.
Using the binary number 101.0101₂, demonstrate truncation to one binary place, and calculate the effect upon accuracy in terms of relative error.
A builders' merchant wants to convert imperial measurements for length (inches) into metric measurements.
1 inch = 2.54 cm
1 inch = 0.0254 m
Write an algorithm, using pseudo-code, that will allow a user to input:
- the imperial measurement (in inches)
- whether the output is to be in cm or m.
The algorithm should terminate when a user inputs a rogue value less than 0.0.
It should output a suitable error message for any measurement entered that is not a real data type.
It should use self-documenting identifiers.
Describe the difference between fixed and variable length records. Give an example of data that could be contained in each.
Explain the difference between sequential and indexed sequential file access.
Describe computer-based processes that protect the security of data.
Consider the constructs in the following algorithm. Identify and describe the purpose of the constant.
START
factor = 2
i = 0
input num
while (i <= 10)
if i MOD 2 = 0
num = num + i
else
num = num * factor
end if
i = i + 1
end while
output num
END
From the algorithm above, identify and describe the purpose of a variable.
From the algorithm above, identify and describe the purpose of the selection construct.
From the algorithm above, identify and describe the purpose of the repetition construct.
Describe the relationship between an object and a class.
From the class diagram (Person → Pupil, Staff), give one example of a super class.
From the class diagram, give one example of a sub class.
From the class diagram, give one example of a method that does not require a parameter.
Describe the difference between public, private and protected methods.
Describe the contents and use made of user documentation.
Describe the contents and use made of maintenance documentation.
Explain the role of Integrated Development Environment (IDE) tools in developing and debugging programs.
Describe the following stage in the compilation process: Lexical analysis.
Describe the following stage in the compilation process: Semantic analysis.
Describe the role of the operating system in providing a user interface and managing hardware resources.
Complete the table by providing an example and the storage requirements (in bits) for each data type.
| Description |
|---|
Describe how character sets are used in a computer system.
A single-core processor processes Y = (4×5) + (1×6) + (5×3) + (3×2) in seven steps. Describe, showing each step, how a quad-core processor would process the calculation.
State the name given to this method of processing data (where multiple cores process parts of a calculation simultaneously).
Identify and state the purpose of four components in a CPU.
The following data is stored in an 8 bit register: 10111000. Demonstrate how the state of the most significant bit can be determined using a logical operation.
Explain, with reference to the functional characteristics of a Hard Disk Drive (HDD), how performance is affected by data fragmentation.
Describe how the effect of fragmentation can be reduced on a HDD.
State what is meant by the term handshaking.
Explain the importance of having networking standards.
Name two standard networking protocols and describe their function and importance.
Describe simplex, half duplex and full duplex data transmission methods and give an example use for each.
Write an algorithm, using pseudo-code, which will allow a user to enter the radius to calculate the area and circumference of a circle. The values input should be in metres, but the output should be converted into centimetres (1 m² = 10,000 cm² and 1 m = 100 cm).
For example: Input r = 1.5 (metres) → Output A = 70650 cm², C = 942.0 cm
Your algorithm should output a suitable error message if the value entered is not valid.
Your algorithm should be written using self-documenting identifiers.
Clearly showing each step, simplify the following expression using only Boolean identities and rules:
Q·(P + Q) + P·(1 + R) + Q·(P·P̄)
The array myArray contains [1, 2, 5, 6, 8, 11, 14] at indices (0) to (6). Write down the order in which each number will be accessed when performing a linear search for 14.
The array myArray contains [1, 2, 5, 6, 8, 11, 14] at indices (0) to (6). Write down the order in which each number will be accessed when performing a binary search for 14.
Give one advantage and one disadvantage of a binary search over a linear search.
Describe the principles of data compression algorithms.
Describe the term data structure and why data structures are used in computing.
Using the films table (FilmID, Title, Certificate, Genre), describe a 'field' with an example from the table.
Using the films table, describe a 'record' with an example from the table.
Using the films table, describe a 'primary key' with an example from the table.
Describe sequential files and how records are added to them.
Describe, giving an example, one type of maintenance performed on a computer program.
Andrew is considering three methods for storing positive numbers using two's complementation:
Method 1: Store numbers as an integer using an 8 bit register.
Method 2: Store real numbers in normalised floating-point form, using a 5 bit mantissa and a 3 bit exponent.
Method 3: Store real numbers in normalised floating-point form, using a 4 bit mantissa and a 4 bit exponent.
Calculate the denary range (highest and lowest) of numbers that can be stored by each method. Compare the advantages of representing numbers in integer and floating-point forms.
Describe the fetch-decode-execute cycle showing how data can be read from RAM into registers. Your answer should make reference to the MAR, MDR, PC and CIR.
Describe the use of voice input as a contemporary method for input. Your answer should include benefits and drawbacks.
Describe the use of touch input as a contemporary method for input. Your answer should include benefits and drawbacks.
Explain the role of multiplexing on a network.
Describe the contents of a typical TCP/IP data packet.
State the meaning of the term 'word'.
Convert the hexadecimal numbers AE₁₆ and 1B₁₆ into binary and, using binary addition, calculate the number that would result from adding them. Convert your answer into denary. You must show all of your working.
Show how −39₁₀ would be represented using sign/magnitude and how it would be represented using two's complement representation in an 8 bit register.
In a computer system, real numbers are stored in normalised floating point form using two's complementation, an 8 bit mantissa and a 3 bit exponent.
The following is a floating point representation: 0.1110100 010
Calculate the denary value of the mantissa and exponent, and convert this floating point number into a denary number.
Showing your workings, calculate the largest positive denary number that this computer system can store (8 bit mantissa, 3 bit exponent, two's complement, normalised floating point).
Using the number 111.10110₂, describe truncation and rounding to two binary places, and their effect upon accuracy in terms of their absolute errors. State which method is more accurate.
Explain the difference between fixed and variable length records.
Describe the benefits of user groups having different views of database data. Describe how these views may be varied for each user group.
Describe the need for archiving files.
The following user login details are stored in a two-dimensional string array called loginDetails:
[0] MurahanA / 152599 / Alice Murahan
[1] JonesT / p@ssword12134 / Tim Jones
[2] MurrayB / Fred1985 / Benjamin Murray
[3] AliZ / 1234 / Zaheer Ali
[4] DaviesD / #12356! / Denzil Davies
Write an algorithm, using pseudo-code, which will allow a user to enter a username and password to login. If the user has logged in successfully, display a suitable welcome message followed by their full name. Output a suitable error message if the password entered is incorrect or if the username is not found. Use self-documenting identifiers.
Describe a suitable mode of operation for producing payslips in a payroll application.
Clearly showing each step, simplify the following Boolean expression:
(Ā + B)·(A + C) + B·B̄
Consider the algorithm for calculating the area of a circle:
StarProc areaOfCircle
A is real
B is real
C is real
set C = 3.14
output "Please enter the radius"
input A
B = C * (A * A)
output "The Area is ", B
End Proc
Identify and define the constant in the algorithm.
From the same algorithm, identify and define a variable.
Describe why the use of self-documenting identifiers is important in programs and suggest suitable changes that you would make to the algorithm above to achieve this.
Describe the distinguishing features of a procedural programming paradigm.
Describe the distinguishing features of a mark-up programming paradigm.
Describe the difference between malicious and accidental damage to data and identify one situation where each could occur.
Explain the purpose of expert systems and describe the possible effects of these systems on the nature of employment in wider society. Discuss their general benefits and drawbacks.
Define the term Internet.
Describe the use of Universal Datagram Protocol (UDP).
Describe the use of Dynamic Host Configuration Protocol (DHCP).
Describe the use of Simple Mail Transfer Protocol (SMTP).
The following algorithm has myFunction which declares c and d as local variables. The main program declares a and b, sets a = 0, calls myFunction, then attempts to output a, b, c and d.
State the outputs that this algorithm will give.
Explain why the algorithm (which tries to output local variables c and d from myFunction in the main program) does not work as intended.
Apart from buses, describe the function of three main components in a contemporary Von Neumann type CPU architecture.
Describe the functional characteristics of a HDD.
Explain why there would be a difference in disk access speeds when loading a fragmented file and a non-fragmented file into main memory from an HDD.
An alternative secondary storage medium which does not have the same fragmentation issue is a Solid State Drive (SSD). Explain why this is the case.
Give the simplest Boolean expression for the truth table:
A=0,B=0→C=0; A=0,B=1→C=1; A=1,B=0→C=0; A=1,B=1→C=0
Give the simplest Boolean expression for the truth table:
P=0,Q=0→R=1; P=0,Q=1→R=0; P=1,Q=0→R=0; P=1,Q=1→R=0
Give the simplest Boolean expression for the truth table:
X=0,Y=0→Z=1; X=0,Y=1→Z=0; X=1,Y=0→Z=0; X=1,Y=1→Z=1
Explain what is meant by the term parameter and how passing parameters by reference works.
Describe another method for passing parameters to a procedure.
Give one disadvantage of passing parameters by reference.
Draw a clearly labelled diagram that shows how a transaction file and master file are used during an update.
Describe the data used and the organisation of transaction files and a master file for an application of your choice.
Describe the most suitable mode of operation for your chosen application (transaction/master file update).
Clearly showing each step, simplify the following Boolean expression using Boolean algebra and identities:
A·(B + C) + A·(0 + Ā) + B·(1 + C)
Describe methods used in file security to prevent accidental data loss from computer systems.
Using the binary search algorithm provided, show how it will reduce the part of the array being searched at each repetition when searching for 22 in: [12, 22, 27, 31, 38, 54, 63, 71, 73, 87, 92].
Write a linear search algorithm, using pseudo-code, for the array myArray = [45, 12, 98, 54, 56] (indices 1-5). Your algorithm should output the position of the searchValue if found, or a suitable message if not found. Use self-documenting identifiers.
Describe an appropriate circumstance for the use of each search type (linear and binary).
Convert 6C₁₆ and AF₁₆ into binary and add them together using binary addition.
In a certain computer system, real numbers are stored in normalised floating-point form using a positive 4 bit mantissa and a positive 4 bit exponent. Calculate the denary range of positive real numbers that can be stored.
Give the advantages of representing numbers in integer form and in floating-point form.
Describe the different methods of investigation used by a systems analyst.
Discuss the advantages of using database systems and their associated features to store data.
Complete the following truth table for the expression NOT((A OR C) XOR (B AND C)).: NOT((A OR C) XOR (B AND C))
| A | B | C | A OR C | B AND C | (A OR C) XOR (B AND C) | NOT((A OR C) XOR (B AND C)) |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | ||||
| 0 | 0 | 1 | ||||
| 0 | 1 | 0 | ||||
| 0 | 1 | 1 | ||||
| 1 | 0 | 0 | ||||
| 1 | 0 | 1 | ||||
| 1 | 1 | 0 | ||||
| 1 | 1 | 1 |
State the use of the DHCP network protocol.
State the use of the SMTP network protocol.
State the use of the HTTP network protocol.
Describe the dangers that can arise from the use of computers to store personal data.
Describe processes that protect the security and integrity of data.
Clearly showing each step, simplify the following expression using Boolean identities and rules:
A·(Ā + B) + C̄·(A + B) + A·(B̄ + C) + B̄·B
Convert 31₁₆ and 6D₁₆ into binary numbers and add them together using binary addition.
In a certain computer system, real numbers are stored in floating point form using two's complementation, a 12 bit mantissa and a 4 bit exponent. Convert 16.125₁₀ into this floating point form.
In a different computer system, real numbers are stored in floating point form using two's complementation, a 5 bit mantissa and a 3 bit exponent. Calculate the largest positive denary number this system can store.
State the full name of the data structure used to store monthly handset recycling totals per staff member, and state why it is the most appropriate.
State the most suitable data type for the handset recycling data structure.
PhoneRecycle also stores customer details. State the most suitable data structure and justify your choice.
Explain parallel processing and caching in a CPU.
EuroTravel offers currency conversion: £1.00 = €1.14. Write an algorithm using pseudo-code that allows a user to enter a value in pounds and outputs conversions for each value £5 below and £5 above the initial value input.
For example, if the user inputs £500.00, it outputs £495 to £505 with their euro equivalents.
Your algorithm should output a suitable error message for non-numeric data.
Use self-documenting identifiers.
Explain how linear search and binary search algorithms operate.
Describe appropriate circumstances for the use of each search algorithm (linear and binary).
The bubble sort algorithm provided contains an error. Suggest appropriate test data to dry-run this algorithm to identify possible errors.
Describe how a bubble sort algorithm should operate.
Explain why the bubble sort algorithm in this question will fail.
Suggest a suitable change to overcome the problem in the bubble sort algorithm.
Name and describe a different sort algorithm.
Explain the use of a range of utility software in computer systems.
Explain how an operating system manages computer resources.
Compare bespoke and off-the-shelf software.
An analyst has been commissioned to produce a new computer based system for weather forecasting. Discuss the purpose of a feasibility study and describe the processes an analyst would carry out. Describe the role of the computer in weather forecasting.
Complete the following truth table.: B XOR (A AND B)
| A | B | A AND B | B XOR (A AND B) |
|---|---|---|---|
| 0 | 0 | ||
| 0 | 1 | ||
| 1 | 0 | ||
| 1 | 1 |
Compare the functional characteristics of Hard Disc Drives (HDD) and Optical Drives and give a typical use and storage capacity for each.
State what is meant by a protocol.
Name the most appropriate protocol for obtaining an IP address from a server.
Name the most appropriate protocol for sending an email from one server to another.
Name the basic communication protocol used on the Internet.
State the role of handshaking.
Data is sometimes detected simultaneously on a bus network. State the name given to this problem and describe how the network deals with it.
Describe how traffic is routed on a packet switched network.
Using the denary example 108₁₀, calculate the minimum storage requirements for an integer data type within a range of 0₁₀ to 127₁₀.
In a system using sign and magnitude representation, give the range for a signed integer data type with the same storage requirements as 7 bits.
Describe the use and advantages of the Unicode standardised character set.
Giving suitable examples, compare the storage requirements for a character and a string data type.
Describe potential threats to computer systems and how contingency planning can help recover from disasters.
Clearly showing each step, simplify the following Boolean expression:
A·(A + B) + C·(A + B) + A·(B + C)
Convert the denary numbers 87₁₀ and 113₁₀ into their equivalent unsigned 8 bit binary numbers. Carry out the binary addition and convert your answer into hexadecimal. Show all workings.
In a computer system using two's complementation, an 8 bit mantissa and a 4 bit exponent, convert 4.125₁₀ into normalised floating-point form.
The following floating-point number uses an 8 bit mantissa and 4 bit exponent (two's complement):
Mantissa: 0.11110 00, Exponent: 0111
Calculate the denary value of the mantissa and exponent, and convert to denary.
At Myles-Hill College, students study courses taught by teachers. Using an example from this scenario, explain what is meant by a foreign key in a database.
Describe the difference between flat file and relational database systems.
Construct an entity relationship diagram for the Myles-Hill College scenario (students study courses, courses taught by teachers; a student can study many courses, a teacher can teach many courses, each course taught by one teacher).
Describe the object-oriented approach to programming and the relationship between an object, class and method.
Write an algorithm using pseudo-code that determines if a number entered (between 3 and 256 inclusive) is a prime number. A prime number is divisible only by itself and 1. Use self-documenting identifiers with suitable inputs and outputs.
The operating system enables users to set up a hierarchical storage structure. Draw a clearly labelled diagram to illustrate a hierarchical structure.
Give one advantage of using a hierarchical storage structure.
Attributes can be assigned to files by the operating system (e.g. read only). Name and describe three other file attributes.
Describe how bubble sort and insertion sort algorithms operate.
Explain how the Data Protection Act impacts on an organisation that stores data on a computer system.
Describe the difference between high and low level languages. Explain the role of the Integrated Development Environment (IDE) in developing high and low level language programs.
The algorithm checks if numbers are even or odd using MOD. Explain the role of MOD in the algorithm.
Using an example from the EvenOdd algorithm, describe the purpose of selection.
Using an example from the EvenOdd algorithm, describe the purpose of repetition.
Complete the following truth table for: A·(Ā + B·C): A·(Ā + B·C)
| A | B | C | Ā | B·C | Ā + B·C | A·(Ā + B·C) |
|---|---|---|---|---|---|---|
| 1 | 1 | 1 | ||||
| 1 | 0 | 1 | ||||
| 0 | 1 | 1 | ||||
| 0 | 0 | 1 |
Describe the function of the main components of the Von Neumann CPU architecture.
Describe six Integrated Development Environment (IDE) tools used in the development and debugging of programs.
Describe simplex, half-duplex and full duplex transmission methods.
Describe what is meant by a data collision on a bus network and how such collisions should be dealt with.
State the meaning of 'Byte'.
State the meaning of 'Word'.
Convert the hexadecimal numbers 2A₁₆ and BB₁₆ into two binary numbers and, using binary addition, calculate the binary number that would result from adding them. Show all working.
Using an example, describe two's complementation in an 8 bit register.
A floating point number uses two's complementation, an 8 bit mantissa (0.1101000) and a 4 bit exponent (0011). Calculate the denary value of the mantissa and exponent, and convert to denary.
Using the number 26.8₁₀ as an example, describe truncation and rounding, and their effect upon accuracy.
Describe direct (random) access files in terms of hashing algorithms, overflow areas and the need for files to be re-organised on occasions.
Write a binary search algorithm, using pseudo-code, for the array myArray = [23, 34, 39, 42, 47, 56, 61] (indices 0-6). Output the position of the SearchValue if found, or a suitable message if not present. Use self-documenting identifiers.
Giving an example, describe standard modules and their benefits.
Clearly showing each step, simplify the following Boolean expression:
A·(A + C) + C·(A + B)
A university has departments, each offering several courses. Modules make up each course. Students enrol on a course and take modules for that course. Draw an entity relationship diagram.
Compare two methods of changeover that a systems analyst may suggest to an organisation.
A systems analyst produces maintenance documentation. Describe the typical contents of this documentation.
A large organisation wishes to back up its network data daily. Explain a suitable backup procedure and compare three different types of secondary storage devices on which data can be stored.