WorksheetsAQA A Level Computer Science
Total questions: 70
Worksheet time: 1hrs 10mins
Which regular expression matches the FSM?
a?bc(dc)*
a|b(cd)+
a+bc(dc)?
a(b|c)d*c*
Select the strings that are matched by the regular expression:
a(b|c)?d
abcbcbcbcd
acd
ad
acccd
The Caesar cipher is an example of what type of cipher?
Substitution cipher
Transposition cipher
Public key encryption
Vernam cipher
The letter m has an ascii code of 1101101. As part of a Vernam cipher, the key 0101001 is applied to that letter. What is the resulting ciphertext?
1000100
0111011
1100101
1101001
The bit pattern 0110001 is sent with an even parity bit in the MSB position.
Which of these is the bit pattern receivedt?
00110001
10110001
01100011
01100010
The bitmap image of the lemming is 6 pixels by 10 pixels. There are 16 available colours for each pixel. Calculate the file size of the image (not including any metadata) in bytes.
30
120
22.5
60
Which of these are advantages of vector graphics over bitmap graphics?
Can be rescaled without distortion
(Usually) a smaller file size
Ideal for photographic images
Each pixel can be modified individually
Which of the following is Nyquist's Theorem?
e = mc2
file size = sample res * sample rate
fs > 2fmax
Abstraction is the act of...
Adding extra detail to enable someone else to be able to solve the task without your help
Removing the detail that is important to solve the task
Removing all unnecessary detail to focus on what is important to solve the task
Creating an image that is similar to the object in question in some abstract way
When would you use 'indefinite iteration'?
When you are unsure about how many times a loop will need to run to satisfy a condition
When you know exactly how many times you need to run the loop in the algorithm
When you want a different piece of code to run depending upon the value of a variable or condition
Simplify the boolean expression 😆
!(A and B)
A or B
!A and B
A and !B
What is the difference between a static and dynamic data type?
Dynamic data types are fixed and static can change size
A dynamic data type can change size at run time, whereas static cannot
No difference, the are the same
Which of the following is a 'divide and conquer' algorithm?
Linear search
Binary search
Merge sort
Bubble sort
How many comparisons will a Binary Search make to find the number 23 in the list?
3
4
2
10
How many passes will a Bubble Sort need to make to sort this list (in ascending order)?
1
2
3
4
What does the following describe?
The process of breaking a problem down into smaller problems that can be solved more easily.
Declaration
Functional Abstraction
Abstraction
Decomposition
How many bytes are there in a kibibyte?
1024000
10000
1000
1024
Which network topology is this?
Star
Bus
Mesh
Linear
This is one of ....................... laws
Einstein's
Neptune's
Newton's
De Morgan's
What is the job of the logic circuit above?
Checks is a sensor is activated
Adds two binary numbers together
Subtracts one binary number from another
Adds two binary numbers and produces a sum and carry bit
passes data over the physical network
transport layer
internet layer
link layer
application layer
retreieve emails from server
HTTP
FTP
SMTP
IMAP
Responsible for packet switching
TCP
UDP
IP
FTP
The Current State is S0 and Input is 1
What is the OUTPUT and Direction
1, L
1, R
0, L
0, R
Does Breadth-first search use a queue or a stack?
Stack
Queue
Both
neither
What is the Big O Notation of Merge Sort?
O(n)
O (n log n)
O(log n)
O(n2)
Which of these tree traversal methods is used to output the contents of a binary tree in ascending order?
Pre-Order
In-Order
Post-Order
Monastic Orders
A list must be in order for a Binary search to take place
True
False
Preorder Traversal of the tree
1 4 9 5 2 8 3
1 4 9 5 2 3 8
1 4 9 8 5 2 3
1 4 9 8 5 2 3
If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?
ABCD
DCBA
DCAB
ABDC
How many stacks are needed to implement a queue. Consider the situation where no other data structure like arrays, linked list is available to you.
1
2
3
4
Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are
Full: (REAR+1) mod n == FRONT, empty: REAR == FRONT
Full: (REAR+1) mod n == FRONT, empty: (FRONT+1) mod n == REAR
Full: REAR == FRONT, empty: (REAR+1) mod n == FRONT
Full: (FRONT+1) mod n == REAR, empty: REAR == FRONT
If the sequence of operations - push (1), push (2), pop, push (1), push (2), pop, pop, pop, push (2), pop are performed on a stack, the sequence of popped out values
2,2,1,1,2
2,2,1,2,2
2,1,2,2,1
2,1,2,2,2
Which of the following is not an inherent application of stack?
Implementation of recursion
Evaluation of a postfix expression
Job scheduling
Reverse a string
What is the postfix equivalent for the following infix expression?
(2/4)*(5-6)
2 4 5 6 / - *
2 4 / 5 6 - *
2 4 / * 5 - 6
2 4 / 5 - 6 *
What name is given to the rules that define how symbols can be replaced by other symbols?
Construction rules
Production rules
Definition rules
Establishing rules
What type of object is enclosed in angle brackets in Backus-Naur form?
Definitive
Terminal
Non-terminal
Special
Why is it that Backus-Naur form is capable of representing some languages that cannot be represented by regular expressions?
Backus-Naur form supports definitions
Backus-Naur form supports Recursion
Backus-Naur form supports Selection
Backus-Naur form supports Loops
Which of the following examples uses valid recursion?
<Number> ::= <Digit> | <Digit><Number>
<Name> ::= <Forename><Surname>
<Age> ::= <Digit>|<Digit><Digit>
<Name> ::= <Name>
For the set "A = {1, 2, 3, 4, 5 }"
which is the correct set comprehension
A = {x | x ∈ ℕ ∧ 6 > x ≥ 1 }
A = | x ∈ ℕ ∧ 5 > x ≥ 1
A = (x | x ∈ ℕ A x ≥ 1 )
A = {x ∈ ℕ ∧ 1 > x ≥ 5 }
What is the "Cardinality" of a set?
number of elements of a finite set
number of elements of an infinite finite set
number of elements of a finite or infinite set
number of elements not in a given set
What data structure can be used with postfix expressions?
Queue
Hash Table
Vector
Stack
What is represented by ellipses in syntax diagrams?
Terminals
Non-Terminals
Selections
Definitions
What 3 Parts does a RFID system contain?
Ram, Power supply and Monitor
Wheels, Engine, Battery
Processor, Printer and Scanner
Tag, Reader and Antenna
What are the two types of RFID Tags?
Active and Passive
Aggressive and Passive
Wireless and Wired
Male and Female
Active or Passive: Is not powered and receives power from reader
Active
Passive
This is an image of which type of drive?
Hard Disk Drive
Optical Drive
Solid State Drive
CD Drive
Which type of storage uses a laser?
Magnetic
Optical
Solid State
A ferry departs from A(-25, 28). It takes 3 hours to reach its destination B(20, -32), travelling in as straight line with constant velocity. Distances are in km. Find the velocity vector of the ferry.
15i + 20j
15i - 20j
20i + 15j
20i - 15j
The case in which a key other than the desired one is kept at the identified location is called?
Hashing
Collision
Chaining
Open addressing
A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown above.
Which one of the following choices gives a possible order in which the key values could have been inserted in the table?
46, 42, 34, 52, 23, 33
34, 42, 23, 52, 33, 46
46, 34, 42, 23, 52, 33
42, 46, 33, 23, 34, 52
Which of the following statement(s) is TRUE?
1) A hash function takes a message of arbitrary length and generates a fixed length code.
2) A hash function takes a message of fixed length and generates a code of variable length.
3) A hash function may give the same hash value for distinct messages.
1 only
1 & 3 only
2 & 3 only
3 only
quiz = {"Do you help out at home? ":"yes",
"Do you beleive in Santa? ":"yes"}
What type of data structure is an array?
Static and mutable
Dynamic and immutable
Static and immutable
When traversing a binary tree, which diagram is post-order?
Which of these is the correct definition of a pixel?
The smallest addressable element of an image
The smallest part of the screen that can be coloured
A square part of an image
One of the 'lights' on the computer screen
When is Run Length Encoding not very effective?
When there are lots of the same colour pixels in a row
When there are lots of colour changes in a row
When there are only two colours per row
When there are lots of colours in runs on the same row
The number of bits a system can send per second is bandwidth.
True
False
The time it takes for a bit to get from sender to receiver.
Network
Latency
Bandwidth
Bitrate
