WorksheetsCIE The Big A Level Computer Science Quiz!
Total questions: 188
Worksheet time: 2hrs 22mins
How many bytes are in a kibibyte?
2
1000
1024
102440
What is the denary value?
(a)
256
128
200
255
Convert the unsigned binary number 11001100 to decimal
206
104
205
204
What is 6.625 in fixed point binary (4 bits for the whole number / 4 bits for fractional part)?
01101010
10001010
01101100
10001100
01111010
Convert the unsigned binary number 11011.1001 to denary.
27.8125
27.5625
31.5625
31.34375
27.375
Which is NOT a disadvantage of fixed point binary numbers?
cannot represent the range of numbers
cannot represent the accuracy of numbers
easier to process
Why do we carry out normalisation on floating point binary numbers?
To convert the number into a negative number
To round a decimal number down
To provide the maximum level of precision
To round a decimal number up
What is the two's complement of 01100010 ?
10011101
11011101
10011110
10011111
In normalised floating point form, a positive number always has what beginning?
01
10
001
101
In normalised floating point form, a negative number always has what beginning?
01
10
110
010
What is the normalised form of 0.0000111 0111
1.0110000 0011
1.0110000 0111
0.1110000 0111
0.1110000 0011
Convert 88 to normalised floating point binary.
0.1011000 0101
1.0011000 0111
0.1011000 0111
0.1011000 0110
11110111
do to
010101010
010101010
Who uses Hexadecimal?
Computers
Humans
Robots
A logic gate with 4 inputs would have how many different rows on the truth table? (how many possibilities are there)
(a)
Characteristics of OOP.. (Tick all)
Data types
Encapsulation
Inheritance
Polymorphism
algorithm
A single object can also be referred to as an...
Object
Singular Object
Instance
Singular
The (a) layer is used to provide (b) for applications that want to (c) across a (d) , often the Internet.
SMTP (for e-mail), FTP (for file transfer) and HTTP (for web browsing) all operate on which layer?
Internet
Transport
Application
Link
The (a) layer is used to provide (b) for applications that want to (c) across a (d) , often the Internet.
SMTP (for e-mail), FTP (for file transfer) and HTTP (for web browsing) all operate on which layer?
Internet
Transport
Application
Link
The transport layer uses the (a) to establish an (b) with the recipient computer. It (c) into packets and (d) them sequentially. Adds the (e) to be used based on the HTTP protocol.
Reorder the following (1 being the first layer, 4 being the last)
Application
Transport
Link
Internet
The (a) layer uses the (b) to address packets with the source and (c) IP addresses. A router forwards each packet to an endpoint called a (d) defined by the combination of IP address and (e) .
This layer operates across a physical connection.
Application layer
Link layer
Network layer
Transport layer
When receiving data at the destination:
The Link Layer removes the (a) from each packet and passes it to the Network Layer. The Network Layer removes the (b) from each packet and passes it to the (c) Layer. The Transport Layer removes the (d) from each packet, reassembles the packets in the correct order and passes them to the Application Layer. The (e) Layer presents the data for the user in a browser.
A (a) uniquely identifies a (b) device with a Network Interface Card (NIC). This may be the (c) computer, or a (d) in transit. Packets move up and down the lower layers of the stack as they hop across routers, changing their source and (e) MAC addresses as they go
Match the following port number with the protocol...
20
FTP
80
HTTP
143
IMAP
443
HTTPS
22
SSH
File Transfer Protocol is an (a) level protocol used to (b) across a network. FTP uses the (c) model with separate data and control (d) operating on ports 20 and 21. Usernames and passwords are frequently used to protect access to files and to identify users. Access can also be provided (e) where any user can access the FTP site.
Which protocol is an encryption protocol that allows secure communication between nodes across a network.
FTP
SSH
HTTPS
SSS
SSH can be used to create a (a) through a network.
(a) Used to send emails and forward them between mail servers to their destination. (b) Downloads email stored on a (c) to a local client (removed after download). (d) Manages emails on a server so (e) clients can access the same email account in synchronicity.
SMTP
Used to send emails and forward them between mail servers to their destination
IMAP
holds mail on the server so that multiple devices can access all mail
POP
downloads mail to a local device and removes it from the server
What is the output Y of this logic cricuit if A = 1, B = 1, and C = 1
0
1
What type of logic is this table showing:
AND
OR
NOT
XOR
Use the logic condition to find the value of W:
A & ~(B | C)
True
False
If the input values are A = 1, B = 0, C = 1, what would be the result at output D and G, respectively?
Output D = 0, Output G = 0
Output D = 0, Output G = 1
Output D = 1, Output G = 0
Output D = 1, Output G = 1
Commutative Law states that..
Expressions can be simplified by removing like terms
The order of variables in an operation does not matter
Expressions can be factorised, or multiplied out
A variable AND itself is the same as the variable.
Which of the following are correct expressions of De Morgan's Theorum?
¬A.¬B = ¬(A.B)
¬A.B = ¬B+A
¬(A.B) = ¬A+¬B
A.B = ¬(¬A+¬B)
A+B = ¬A.¬B
Which law tells us that we can factorise or multiply out expressions?
Associative law
Distributive law
De Morgan's law
Commutative law
Absorptive Law states that..
Expressions can be simplified by removing like terms
The order of variables in an operation does not matter
Expressions can be factorised, or multiplied out
A variable AND itself is the same as the variable.
Which law states that AND and OR can replace each other in the right circumstances?
De Morgan's Law
Associative Law
Distributive Law
Cole's Law
Identity
Select all equivalent expressions
Q is neither A nor B
Q is not A or B
Q = ¬B + ¬A
Q = ¬A.¬B
Q = ¬(A+B)
What is Quantum Key Distribution (QKD) primarily used for?
Increasing the speed of data transmission
Ensuring secure communication by distributing encryption keys
Generating random numbers for lottery systems
Enhancing the graphical quality of video games
Which principle of quantum mechanics is Quantum Key Distribution based on?
Newton's laws of motion
The uncertainty principle
Quantum entanglement
The theory of relativity
In Quantum Key Generation, what role does the observer effect play?
It has no role in quantum key generation
It ensures that any attempt to eavesdrop on the key generation process will alter the key, thus alerting the communicating parties
It increases the speed of key generation
It decreases the security of the generated keys
What is the main advantage of using Quantum Key Distribution over traditional key distribution methods?
It is cheaper to implement
It can distribute keys at a faster rate
It provides unconditional security based on the laws of quantum physics
It uses less energy
What happens if an eavesdropper tries to intercept a quantum key distribution process?
The eavesdropper can easily copy the key without being detected
The key is automatically encrypted, making it useless to the eavesdropper
The presence of the eavesdropper changes the state of the qubits, alerting the communicating parties
The eavesdropper is granted access to the communication channel
Which of these are correct advantages of quantum cryptography?
Instantaneous communication across vast distances
Immediate detection of eavesdropping
Longer keys can be exchanged
Works in any environment, even with high interference
Which of these are correct disadvantages of quantum crytography?
Quantum key exchange only works with quantum computers
Keys can only be sent over a limited range
Requires a dedicated fibre
High cost of implementation
Quantum key exchange is completely impractical for real-world use
Polarised light
Can change direction if the distances are large
Never changes direction
Requires filters to send and receive
Is composed of photons
Quantum key distribution is used to
Send symmetrical keys
Send assymetric keys
What is the purpose of encryption?
To convert plaintext into ciphertext for security
To convert binary code into text
To execute secure programs
To compress files for faster transfer
Which of the following best describes symmetric key encryption?
The same key is used for both encryption and decryption
A public key encrypts and a private key decrypts
Different keys are used for encryption and decryption
No key is required for decryption
Which encryption method uses two keys: one for encryption and one for decryption?
Asymmetric encryption
Symmetric encryption
Hashing
Digital certificates
Which of the following is a key advantage of asymmetric encryption?
It allows secure communication without sharing a secret key
It encrypts data faster than symmetric encryption
It does not require a public key
It does not require decryption
In asymmetric encryption, what does a sender use to encrypt a private message to a recipient?
The recipient’s public key
The sender’s private key
The recipient’s private key
A symmetric key
What is the main disadvantage of symmetric key encryption?
The key must be securely shared between sender and recipient
It requires a long key length to be effective
It cannot encrypt large amounts of data
It does not work with digital certificates
Which of the following statements about a public key is true?
It is shared openly and used for encryption
It must be kept secret and used for decryption
It is only used in symmetric encryption
It is used to decrypt messages
What is the purpose of quantum cryptography?
To provide unbreakable encryption using quantum principles
To speed up traditional encryption methods
To replace SSL/TLS protocols
To reduce key size in symmetric encryption
Which of the following is a benefit of quantum cryptography?
It is theoretically immune to decryption by conventional computers
It requires less processing power than traditional encryption
It eliminates the need for public and private keys
It works without any physical hardware
What is a major drawback of quantum cryptography?
It requires specialized quantum hardware
It cannot be used over long distances
It does not support asymmetric encryption
It is less secure than traditional encryption
Which protocol ensures secure communication between a web browser and a server?
SSL/TLS
HTTP
FTP
IP
What is the main function of TLS (Transport Layer Security)?
To provide encryption and authentication for network communications
To establish an unencrypted connection between two devices
To convert plaintext into ASCII characters
To optimize data transfer speeds
Which of the following situations would require the use of SSL/TLS?
Online banking transactions
File storage on a local hard drive
Viewing a non-secure website
Running a program on an offline computer
What is a digital certificate used for?
To verify the identity of a website or entity
To encrypt all internet traffic
To compress data for transmission
To convert ciphertext into plaintext
Who issues digital certificates?
Certificate Authorities (CAs)
Internet Service Providers (ISPs)
Web browsers
Operating systems
How does a digital certificate help in secure communication?
It ensures that a public key belongs to a verified entity
It replaces the need for encryption
It eliminates the need for passwords
It encrypts the entire internet
Which component is included in a digital certificate?
The public key of the entity it belongs to
The private key of the entity it belongs to
A symmetric key for encryption
The entire SSL/TLS protocol
What is a digital signature?
A cryptographic method for verifying authenticity
A physical signature scanned into a computer
A public key used for encryption
A password for accessing encrypted files
What does hashing do in encryption?
It converts data into a fixed-size unique value
It encrypts data using a private key
It enables direct decryption of ciphertext
It replaces encryption entirely
Which of the following best describes how digital signatures ensure integrity?
They use cryptographic hashing to detect changes in a message
They encrypt the entire document using a private key
They store private keys securely in a certificate
They replace the need for SSL/TLS
Which file access method stores data in a specific, logical order, allowing for efficient searching and sorting?
Sequential access
Serial access
Direct access
None of the above
A bank has 3 databases. Match the organisation types with the file descriptions
A file containing encrypted PIN numbers used for cash machine withdrwals
Random Organisation
A file containing name account numbers for each customer
Sequential Organisation
A file containing transactions for each customer.
Serial Organisation
Which of these are true about the serial access method?
uses hashing algorithm
data is stored in chronological order
collisions can occur
least efficient for a very large number of records
most efficient for a very large number of records
What are advantages of serial file organisation?
No need to re sort every time a new record is added
Records can be searched and found quickly
New records can easily be appended
It uses storage efficiently
Reuires minimal processing power
What is a disadvantage of using sequential access for large databases?
It is difficult to maintain data integrity
It requires more storage space
It can be slow to retrieve specific records
None of the above
Which type of file organisation uses a temporary file when adding new records?
serial
sequential
direct
Which user defiined data type best describes a data structure consisting of several fields.
Pointers
Sets
Enumerated
Classes and Objects
Record
Whichof these data types can be used in a record data type?
integer
string
array
boolean
real
Which user defiined data type best describes a list of unordered items from which one or more items may be chosen?
Pointers
Sets
Enumerated
Classes and Objects
Record
Which user-defined data type best describes a list of ordered items from which one or more items may be chosen?
Pointers
Sets
Enumerated
Classes and Objects
Record
Which user-defined data type is referenced using a ^ (caret) symbol?
Pointers
Sets
Enumerated
Classes and Objects
Record
Which user-defined data type(s) has states and behaviours?
Pointers
Sets
Enumerated
Classes and Objects
Record
Which of these are primitive data types?
integer
set
string
class
real
Which of these is the correct way to declare an enumerated data type that consists of the 4 suites used in a set of playing cards?
DECLARE TCardSuits = (Clubs, Diamonds, Hearts, Spades)
DEFINE TCardSuits = (Clubs, Diamonds, Hearts, Spades)
TYPE TCardSuits = (Clubs, Diamonds, Hearts, Spades)
TCardSuits = (Clubs, Diamonds, Hearts, Spades)
Which of these pseudocodes could be used to define an enumerated data type for days of the week?
Using Dijkstra Algorithm, that is the shortest path of C?
A
B
E
D
Select all correct applications of a shortest-path algorithm
Navigation
NPC control in gaming
Sending data packets
Buying Crypto
Targeted advertising
Optimisation algorithms are designed to find the (a) path from a start node to any other node
Starting at node S, what is the minimum cost to reach node G?
S-A-B-F-G
S-A-B-C-G
S-A-B-C-H-G
S-A-B-C-E-H-G
Starting at node S, what is the value of the shortest path to node G?
(a)
Consider the directed graph shown in the figure below. There are multiple shortest paths between vertices S and T. Which one will be reported by Dijstra?s shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex v is updated only when a strictly shorter path to v is discovered.
SDT
SBDT
SACDT
SACET
Dijkstra’s single source shortest path algorithm when run from vertex a in the below graph, computes the correct shortest path distance to
only vertex a
only vertices a,e,f,g,h
only vertices a,b,c,d
all the vertices
The A* algorithm requires a (a) , which is the maximum estimate of the distance between two points.
Assume that the numbers in orange are the heuristic values. What is the total cost of getting from a to c?
(a)
What is the Dijkstra's algorithm cost for traveling from A to C
(a)
How do you spell this guy's surname (no Googling!)
(a)
2. Regarding neural networks: the job of which of the ______ layer is to acquire data and feed it to the neural network?
Input
Hidden
Output
Last
5. What kind of datasets are primarily used by neural networks for solving problems?
Mentioned
Visual
Continuous
Large
7. In machine learning classification, you teach the machine to perform with what kind of data?
Labelled
Large
Complex
Continuous
8. In neural networks, which layer is present in between input and output layers?
Middle
Next
Process
Hidden
13. Which one of the following is the full form of ANN?
Absolute Neural Network
Amplified Neural Network
Artificial Neural Network
None of these
15. In neural networks, which layer receives processed data by the hidden layers?
Input layer
Output layer
Next layer
Process layer
Which of these are advantages of quantum cryptography?
data cannot be intercepted
data can be sent further
the key cannot be copied
denial of service attacks are less likely
longer keys can be used
Which of these are disadvantages of quantum cryptography?
can be attacked using other quantum computers
It is an expensive method
It can be affected by electromagnetic interference.
It is difficutl to maintain quantum computers
It can only send data over short distances
Quantum Cryptography uses
dilithium crystals
polarised light
lasers
radioactive isotopes
Which of these is an example of a non-composite data type?
Enumeration
Set
Class
Record
Which of the following are advantages of sequential file organization and access?
Sorting makes it easy to access records.
Sequential file is best use of storage space.
Sequential file is a time consuming process.
It supports modern technologies that require fast access to stored records.
A disk device in which a computer can go directly to the desired record on the disk is called a(n) __________.
sequential file access
index-sequential file access
direct-access storage
indirect-access storage
Given the inputs [4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199] and the hash function x mod 10, which of the following statements are true? (Choose all that apply.)
9679, 1989, 4199 hash to the same value
1471, 6171 hash to the same value
All elements hash to the same value
Each element hashes to a different value
0.3125 × 212
What would be the mantissa and exponent of this number when stored in binary floating point representation?
Mantissa: 0.0101000
Exponent: 00000011
Mantissa: 0.1001000
Exponent: 00001010
Mantissa: 0.0101000
Exponent: 00001100
Mantissa: 0.1010000
Exponent: 00001100
To improve the accuracy of a floating-point number stored in memory, you should...
Add more bits for Mantissa
Reduce bits for Mantissa
Add more bits for Exponent
Reduce bits for Exponent
To improve the range of a floating-point number stored in memory, you should...
Add more bits for Mantissa
Reduce bits for Mantissa
Add more bits for Exponent
Reduce bits for Exponent
Look at the attached image. What is the denary (decimal) value of the binary floating-point number shown?
3213×2−4
−3217×2252
3217×2−3
−3213×2−4
Are the numbers 21×22 and 321×26 the same?
Their value is the same, but they are represented differently in a computer
Their value is the same, and they are represented the same way in a computer
Their value is not the same, but they are represented the same way in a computer
Not enough information given
Which of these is NOT the name of a TCP/IP protocol layer?
Internet (Network) Layer
Network Configuration Layer
Which of these are Application-level protocols?
Which of the following is true about the CSMA/CD algorithm?
The algorithm never allows collisions to occur.
Collisions can happen, but the algorithm defines how the computers should notice a collision and how to recover.
The algorithm works with only two devices on the same Ethernet.
None of the other answers is correct.
Ethernet uses the ________ address to make sure messages are received by the correct device.
MAC
IP
Binary
Switch
List all ITEMS a TCP/IP packet switching network packet contains
Source and Destination IP Address
Packet number / sequence
Error detection codes
Payload
The encryption key
What is the purpose of the sequence number in a data packet?
Allows lost packets to be deleted
Checks for errors
Allows the packets to be reassembled in the correct order on receipt
Allows receipt to be acknowledged.
Packet switching
Circuit switching
Public switched networks
Frame switching
Packet switching
Circuit switching
Virtual-circuit packet switching
Datagram packet switching
RIP stands for..and using _______ as its metric?
Real Inside protocol, Link state advertisements from neighbors
Routing Information Protocol, Hop Count
Routing Interior Protocol, Pinging the shorts route
Real Information Protocol, the gateway of last resort
Several CISC instructions may be equivalent to a single RISC instruction
TRUE
FALSE
CISC aims to use as few lines of assembly code as possible, even if more clock cycles are needed as a result.
TRUE
FALSE
RISC aims to improve processing speed by simplifying instructions so that one line takes one clock cycle.
TRUE
FALSE
Pipelining means...
Running the fetch-decode-execute cycle more efficiently
Waiting for a full fetch-decode-execute cycle to complete before starting the next
Fetches the next instruction while the previous instruction is still decoding
CISC processors can run more efficiently
RISC processors can run more efficiently
Parallel processing is...
instructions which are done one after the other to complete a task
instructions which are run concurrently to complete a task
Always possible
Not always possible
What is double negation?
Multiplying by 2
If you reverse something twice you end up back where you started
A negative number
Which law says 'Break the line, change the sign'?
De Morgans
Association
Commutative
Distirbutative
X AND (Y OR Z) =
X OR Y OR X AND Z
X OR Y OR X OR Z
X AND Y OR X OR Z
X AND Y OR X AND Z
What is the following expression an example of?
3 + 4
Infix expression
Postfix expression
Afterfix expression
Between expression
What is the infix equivalent for the following postfix expression?
3 5 6 + *
5 + 6 * 3
5 + (3 * 6)
(5 + 6) * 3
5 (+ 6 * 3)
What data structure can be used with postfix expressions?
Queue
Hash Table
Vector
Stack
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 *
The prefix form of an infix expression (p + q) – (r * t) is?
a) + pq – *rt
b) – +pqr * t
c) – +pq * rt
d) – + * pqrt
The type of expression in which operator succeeds its operands is?
a) Infix Expression
b) Prefix Expression
c) Postfix Expression
d) Both Prefix and Postfix Expressions
Which of the following translation software translates code line by line during execution?
Interpreter
Compiler
Assembler
Linker
Which translation software converts an entire source code file before execution?
Compiler
Interpreter
Assembler
Loader
What is the first stage in the compilation process?
Lexical Analysis
Syntax Analysis
Code Generation
Optimisation
What is the main purpose of lexical analysis?
Convert source code into tokens
Check for syntax errors
Generate machine code
Execute the program immediately
Which compilation stage checks the structure of the code against grammar rules?
Syntax Analysis
Lexical Analysis
Code Generation
Optimisation
Which component removes unnecessary or redundant code to improve efficiency?
Optimisation
Code Generation
Lexical Analysis
Syntax Analysis
What does a linker do in program translation?
Combines multiple object files into a single executable
Converts assembly code into machine code
Detects syntax errors in code
Optimises the program for faster execution
Which of the following is NOT a role of an interpreter?
Producing an executable file
Running code line by line
Detecting errors at runtime
Allowing immediate execution
What is a key advantage of an interpreter over a compiler?
It allows immediate code execution without waiting for compilation.
It runs programs faster than compiled code.
It produces an executable file.
It optimises code for performance.
Which of the following is a key feature of a compiler?
It translates the entire source code into machine code before execution.
It translates one line at a time.
It detects runtime errors during execution.
It eliminates the need for machine code.
Which notation removes the need for parentheses in mathematical expressions?
Reverse Polish Notation (RPN)
Infix Notation
Prefix Notation
Backus-Naur Form (BNF)
Which statement about Reverse Polish Notation (RPN) is true?
Operands appear before operators.
Operators appear before operands.
It requires parentheses to determine order.
It is less efficient than infix notation.
What is the purpose of Backus-Naur Form (BNF)?
Define the syntax of programming languages.
Convert source code into machine code.
Execute programs line by line.
Provide an alternative to programming languages.
Which of the following statements about syntax diagrams is true?
They visually represent the grammar of a language.
They execute programs using flowcharts.
They translate code into machine language.
They detect logic errors in source code.
What is the primary role of an assembler?
Convert assembly language into machine code.
Translate high-level code into intermediate code.
Execute code directly without translation.
Optimise compiled programs.
Which of the following best describes an advantage of Reverse Polish Notation (RPN)?
It eliminates the need for parentheses.
It simplifies the source code syntax.
It is easier for humans to understand.
It speeds up the compilation process.
Which error would be detected during lexical analysis?
An invalid variable name
A missing semicolon
A division by zero
A logical mistake in an algorithm
Which error would be detected during syntax analysis?
A missing parenthesis in an expression
A variable being used before declaration
An infinite loop in the program
An unused variable in the code
Which error would be detected only during program execution?
Runtime Error
Syntax Error
Lexical Error
Compilation Error
What is the key benefit of using BNF in programming language design?
It provides a formal way to define language syntax.
It improves program execution speed.
It converts high-level code into assembly language.
It replaces the need for interpreters and compilers.
