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.
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
Identify and describe the purpose of the constant.
Consider the constructs in the following algorithm.
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.
Consider the constructs in the following algorithm.
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 the selection construct.
Consider the constructs in the following algorithm.
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 the repetition construct.
Describe the relationship between an object and a class.
Consider the following class diagram for a school:
Person
#firstName : String
#surname : String
#homeAddress : String
#onRoll : Boolean
+setFirstName(String)
+setSurname(String)
#setHomeAddress(String)
#setOnRoll(Boolean)
/ \
Pupil Staff
-pupilID : Integer #StaffID : Integer
#telephoneNumber : String -parkingPermitHolder : Boolean
-emergencyContact : String
+setPupilID(Integer) +setStaffID(Integer)
+setTelephoneNumber(String) +getStaffID() : Integer
+getEmergencyContact() : String
From the class diagram, give one example of a super class.
Consider the following class diagram for a school:
Person
#firstName : String
#surname : String
#homeAddress : String
#onRoll : Boolean
+setFirstName(String)
+setSurname(String)
#setHomeAddress(String)
#setOnRoll(Boolean)
/ \
Pupil Staff
-pupilID : Integer #StaffID : Integer
#telephoneNumber : String -parkingPermitHolder : Boolean
-emergencyContact : String
+setPupilID(Integer) +setStaffID(Integer)
+setTelephoneNumber(String) +getStaffID() : Integer
+getEmergencyContact() : String
From the class diagram, give one example of a sub class.
Consider the following class diagram for a school:
Person
#firstName : String
#surname : String
#homeAddress : String
#onRoll : Boolean
+setFirstName(String)
+setSurname(String)
#setHomeAddress(String)
#setOnRoll(Boolean)
/ \
Pupil Staff
-pupilID : Integer #StaffID : Integer
#telephoneNumber : String -parkingPermitHolder : Boolean
-emergencyContact : String
+setPupilID(Integer) +setStaffID(Integer)
+setTelephoneNumber(String) +getStaffID() : Integer
+getEmergencyContact() : String
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.
| Data type | Example | Storage requirements (bits) |
|---|---|---|
| Character (ASCII) | ||
| Boolean | ||
| Short Integer |
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 following data is stored in myArray.
myArray
| 1 | 2 | 5 | 6 | 8 | 11 | 14 |
|---|---|---|---|---|---|---|
| (0) | (1) | (2) | (3) | (4) | (5) | (6) |
Write down the order in which each number will be accessed when performing the following types of search for 14. You may not need to use all the boxes given.
Linear search.
The following data is stored in myArray.
myArray
| 1 | 2 | 5 | 6 | 8 | 11 | 14 |
|---|---|---|---|---|---|---|
| (0) | (1) | (2) | (3) | (4) | (5) | (6) |
Write down the order in which each number will be accessed when performing the following types of search for 14. You may not need to use all the boxes given.
Binary search.
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.
Information about films is stored in a table.
| FilmID | Title | Certificate | Genre |
|---|---|---|---|
| 1 | End in Justice | 18 | Horror |
| 2 | Inferno of Retaliation | 12 | Action |
| 3 | Mission Mercury | 15 | Sci-fi |
| 4 | Boy of an Angel | PG | Romcom |
| … | … | … | … |
Describe each of the following using examples from the table:
Field.
Information about films is stored in a table.
| FilmID | Title | Certificate | Genre |
|---|---|---|---|
| 1 | End in Justice | 18 | Horror |
| 2 | Inferno of Retaliation | 12 | Action |
| 3 | Mission Mercury | 15 | Sci-fi |
| 4 | Boy of an Angel | PG | Romcom |
| … | … | … | … |
Describe each of the following using examples from the table:
Record.
Information about films is stored in a table.
| FilmID | Title | Certificate | Genre |
|---|---|---|---|
| 1 | End in Justice | 18 | Horror |
| 2 | Inferno of Retaliation | 12 | Action |
| 3 | Mission Mercury | 15 | Sci-fi |
| 4 | Boy of an Angel | PG | Romcom |
| … | … | … | … |
Describe each of the following using examples from the table:
Primary key.
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.
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
From the same algorithm, identify and define a variable.
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
Describe why the use of self-documenting identifiers is important in programs and suggest suitable changes to the identifiers used in this algorithm.
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).
This is an algorithm which should have four outputs, a, b, c and d. The algorithm does not work as intended.
1 define myFunction
2 declare c as integer
3 declare d as integer
4 set c = 3
5 set d = 4
6 end myFunction
7
8 Start MainProg
9 declare a as integer
10 declare b as integer
11
12 set a = 0
13
14 if a = 0 then
15 set b = 1
16 end if
17
18 call myFunction
19
20 output a
21 output b
22 output c
23 output d
24
25 End MainProg
State the outputs that this algorithm will give.
This is an algorithm which should have four outputs, a, b, c and d. The algorithm does not work as intended.
1 define myFunction
2 declare c as integer
3 declare d as integer
4 set c = 3
5 set d = 4
6 end myFunction
7
8 Start MainProg
9 declare a as integer
10 declare b as integer
11
12 set a = 0
13
14 if a = 0 then
15 set b = 1
16 end if
17
18 call myFunction
19
20 output a
21 output b
22 output c
23 output d
24
25 End MainProg
Explain why the algorithm does not output all four variables 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.
| Input | Input | Output |
|---|---|---|
| A | B | C |
| 0 | 0 | 0 |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | 0 |
Give the simplest Boolean expression for the truth table.
| Input | Input | Output |
|---|---|---|
| P | Q | R |
| 0 | 0 | 1 |
| 1 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 1 | 0 |
Give the simplest Boolean expression for the truth table.
| Input | Input | Output |
|---|---|---|
| X | Y | Z |
| 0 | 0 | 1 |
| 1 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 1 | 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.
The following is a binary search algorithm.
1 declare myArray[0 to 10]
2 declare start is integer
3 declare end is integer
4 declare found is Boolean
5 declare mid is integer
6
7 set start = 0
8 set end = 10
9 set found = FALSE
10
11 input searchValue
12
13 repeat
14 set mid = (start + end) DIV 2
15 if searchValue = myArray[mid] then
16 set found = TRUE
17 Output "searchValue found at position", mid
18 end if
19
20 if searchValue > myArray[mid] then
21 set start = mid + 1
22 end if
23
24 if searchValue < myArray[mid] then
25 set end = mid - 1
26 end if
27
28 until (found = TRUE) OR (end < start)
By crossing out or shading the discarded elements in the diagram below, show how the algorithm will reduce the part of the array being searched at each repetition.
searchValue = 22
| (0) | (1) | (2) | (3) | (4) | (5) | (6) | (7) | (8) | (9) | (10) | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Original Data | 12 | 22 | 27 | 31 | 38 | 54 | 63 | 71 | 73 | 87 | 92 |
| Repetition 1 | 12 | 22 | 27 | 31 | 38 | 54 | 63 | 71 | 73 | 87 | 92 |
| Repetition 2 | 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 following bubble sort algorithm attempts to sort integers stored in myArray, but contains an error.
1 Start Procedure SortMyArray
2 n is integer
3 temp is integer
4 swapped is boolean
5
6 set n = length(myArray) {returns the length of myArray}
7 repeat
8 set swapped = FALSE
9 for i = 0 to (n - 1)
10 if myArray[i] < myArray[i + 1] then
11 temp = myArray[i + 1]
12 myArray[i + 1] = myArray[i]
13 myArray[i] = temp
14 swapped = TRUE
15 end if
16 end for
17 until (swapped = TRUE)
18
19 End Procedure
Suggest appropriate test data to dry-run this type of algorithm in order to identify possible errors.
Describe how a bubble sort algorithm should operate.
The following bubble sort algorithm attempts to sort integers stored in myArray, but contains an error.
1 Start Procedure SortMyArray
2 n is integer
3 temp is integer
4 swapped is boolean
5
6 set n = length(myArray) {returns the length of myArray}
7 repeat
8 set swapped = FALSE
9 for i = 0 to (n - 1)
10 if myArray[i] < myArray[i + 1] then
11 temp = myArray[i + 1]
12 myArray[i + 1] = myArray[i]
13 myArray[i] = temp
14 swapped = TRUE
15 end if
16 end for
17 until (swapped = TRUE)
18
19 End Procedure
Explain why the bubble sort algorithm in this question will fail.
The following bubble sort algorithm attempts to sort integers stored in myArray, but contains an error.
1 Start Procedure SortMyArray
2 n is integer
3 temp is integer
4 swapped is boolean
5
6 set n = length(myArray) {returns the length of myArray}
7 repeat
8 set swapped = FALSE
9 for i = 0 to (n - 1)
10 if myArray[i] < myArray[i + 1] then
11 temp = myArray[i + 1]
12 myArray[i + 1] = myArray[i]
13 myArray[i] = temp
14 swapped = TRUE
15 end if
16 end for
17 until (swapped = TRUE)
18
19 End Procedure
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 following algorithm checks if the numbers entered are even or odd numbers.
1 Start Procedure EvenOdd
2 numberstocheck is integer
3 num is integer
4
5 input numberstocheck
6
7 for i = 1 To numberstocheck
8 input num
9
10 if num MOD 2 = 0 Then
11 output num & " is an even number"
12 else
13 output num & " is an odd number"
14 end if
15 next i
16
17 End Procedure
Explain the role of MOD in the algorithm above.
The following algorithm checks if the numbers entered are even or odd numbers.
1 Start Procedure EvenOdd
2 numberstocheck is integer
3 num is integer
4
5 input numberstocheck
6
7 for i = 1 To numberstocheck
8 input num
9
10 if num MOD 2 = 0 Then
11 output num & " is an even number"
12 else
13 output num & " is an odd number"
14 end if
15 next i
16
17 End Procedure
Using an example from the algorithm, describe the purpose of selection.
The following algorithm checks if the numbers entered are even or odd numbers.
1 Start Procedure EvenOdd
2 numberstocheck is integer
3 num is integer
4
5 input numberstocheck
6
7 for i = 1 To numberstocheck
8 input num
9
10 if num MOD 2 = 0 Then
11 output num & " is an even number"
12 else
13 output num & " is an odd number"
14 end if
15 next i
16
17 End Procedure
Using an example from the 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) |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | ||||
| 0 | 1 | 0 | ||||
| 1 | 0 | 0 | ||||
| 1 | 1 | 0 | ||||
| 0 | 0 | 1 | ||||
| 0 | 1 | 1 | ||||
| 1 | 0 | 1 | ||||
| 1 | 1 | 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.
Input devices facilitate interaction with a computer system. Choose two applications and describe the use of a different input device for each application. Give one advantage and one disadvantage for each input device.
Complete the missing column headings in this truth table by adding the correct Boolean expressions.
C̄ ⊕ Ā·B| A | B | C | ||||
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 | 0 |
Describe two advantages and two disadvantages of parallel transmission over serial transmission.
Describe what happens when more than one data packet is detected on a bus network simultaneously.
Explain how a packet is routed on a packet-switched network.
Showing your workings, use binary addition to add 01011.010₂ and 01101.101₂. Convert your answer into denary.
State the effect of truncation and rounding to one decimal place in your answer to 4(a). Calculate the relative and absolute error that would result from each method.
Simplify the given Boolean expression using only Boolean identities and rules, clearly showing each step. Do not use truth tables for this simplification. (C + B)·(B̄ + C) + Ā·(1 + C)
A payroll system uses a master file and a transaction file to generate a payslip.
flowchart LR
MF[("Master file")] --> UP["Update master record with<br>correct transaction record"]
TF[("Sorted transaction file")] --> UP
UP --> UMF[("Updated master file")]
UP --> ERR[("Error file")]
UP --> PS["Payslip"]
Complete the data structure design for the files used in this application by:
- completing any missing field names
- clearly marking any key fields
- suggesting a different suitable validation technique for one field in each file.
MASTER FILE
| Field name | Primary Key (Y/N) | Data type | Validation |
|---|---|---|---|
| Integer | |||
| First name | String | ||
| Surname | String | ||
| Address | String | ||
| Job title | String | ||
| Date of birth | Date / Time | ||
| Tax code | String | ||
| Gross pay to date | Real | ||
| Net pay to date | Real | ||
| Holiday pay to date | Real | ||
| Sick pay to date | Real | ||
| Overtime pay to date | Real |
SORTED TRANSACTION FILE
| Field name | Primary Key (Y/N) | Data type | Validation |
|---|---|---|---|
| Integer | |||
| Date | Date / Time | ||
| Hours worked | Real | ||
| Gross pay | Real | ||
| Net pay | Real | ||
| Holiday pay | Real | ||
| Sick pay | Real | ||
| Overtime pay | Real |
Describe the most suitable mode of operation for this payroll application.
Discuss the benefits of a relational database system over a flat file database system.
Discuss various ways in which an operating system provides an interface between the user and the hardware.
Programmers make use of a range of constructs and features. Describe the terms variable and parameter.
Describe the scope and lifetime of variables used in a program.
Write an algorithm, using pseudo-code, which converts an 8-bit binary number into denary. Your algorithm should include a suitable validation check.
Describe the difference between alpha and beta testing in system development.
Explain how different Integrated Development Environment (IDE) tools are used in debugging programs.
A program written using a high-level programming language is intended to add ten numbers input by a user. This program is to be compiled but contains errors.
1 Start addNumbers
2 number is integer
3 total is integer
4
5 for i = 1 to 10
6 ouptut "Please enter next number"
7 input number
8 total = total + number
9 next i
10
11 grandTotal = total
12 output "The total = ", grandTotal
13 End addNumbers
Describe the different stages of compilation, relating these stages to the compilation of this specific program.
Describe the following data transmission method. Serial.
Describe the following data transmission method. Parallel.
Give examples where serial data transmission would be most suitable.
Give examples where parallel data transmission would be most suitable.
Explain why fragmentation occurs in secondary storage and the consequences of fragmentation.
Explain the process of defragmentation.
Explain network collision and when it occurs.
Describe the following data transmission method and how it reduces data collisions. Half duplex.
Describe the following data transmission method and how it reduces data collisions. Full duplex.
Complete the following truth table to solve this Boolean expression, where ⊕ represents XOR.
(A ⊕ B̅).A̅| A | B | A̅ | B̅ | (A⊕B̅) | (A⊕B̅).A̅ |
|---|---|---|---|---|---|
| 0 | 0 | ||||
| 0 | 1 | ||||
| 1 | 0 | ||||
| 1 | 1 |
Determine the Boolean expression missing in the output column.
| Input | Input | Output |
|---|---|---|
| A | B | |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Determine the Boolean expression missing in the output column.
| Input | Input | Output |
|---|---|---|
| A | B | |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Determine the Boolean expression missing in the output column.
| Input | Input | Output |
|---|---|---|
| A | B | |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
Convert the hexadecimal numbers A7₁₆ and 49₁₆ into binary numbers and calculate the binary number that would result from adding them.
In a certain computer system, real numbers are stored in floating-point form using 12 bits: 8 bits for the mantissa and 4 bits for the exponent. Both mantissa and exponent use two’s complement representation.
Convert the number 13.625₁₀ into this floating-point form.
Show the effect of truncation and rounding, to two decimal places, on the following denary number.
37.6783
State two advantages of representing numbers in floating point form.
Describe the role of device drivers in an operating system and how they facilitate communication between hardware and software.
Describe the types of utility software that protect data.
Clearly showing each step, simplify the following Boolean expression:
B.(A + B̅) + A.(B + C) + A.(B + C̅)
A used car company wants to maintain a database to track its car sales and the employees who sell each car.
Design an appropriate data structure with appropriate validation, to store the information relating to cars in stock. Consider things such as year, model and cost.
The company needs to store information on cars, employees and sales details. An employee can make multiple sales, and each sale is for one car.
Draw an entity relationship (ER) diagram that represents these entities and their relationships.
Describe the following programming construct and state its purpose. Sequence.
Describe the following programming construct and state its purpose. Selection.
Describe the following programming construct and state its purpose. Iteration.
Parkwood Vale Postal Service wants to evenly distribute items into boxes. They require you to write an algorithm to divide a given number of items among a set number of identical boxes as evenly as possible.
Write an algorithm, using pseudo-code, that will allow a user to input the number of orders they want to process. For each order, the algorithm should: • ask the user to input the total number of items to distribute • ask the user to input the total number of boxes available • ensure all values are positive integers • calculate how many items go into each box when divided evenly • determine how many remaining items there are • output the number of items in each box • output the number of remaining items.
A feasibility study is a critical first step in the systems design life cycle.
Describe the purpose of a feasibility study.
Explain the processes an analyst would carry out during a feasibility study.
Discuss the role of computer systems in graphics and animation, and include the possible effects of these systems on the nature of employment.