1/38
Comprehensive practice flashcards covering algorithms, programming fundamentals, data representation, computer architecture, and networking based on the provided lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What is an integer data type?
A data type used to store positive or negative whole numbers with no decimal points (e.g., 15, −3); it is memory efficient and used for counting or indexing.
How is a real data type defined?
Also called floating-point numbers, this data type stores numbers containing a fractional part or decimal point (e.g., 13.9, −0.5) and is used for continuous quantities.
What is the function of a Boolean data type?
It takes one of two logical values, TRUE or FALSE, used to evaluate conditions and control program flow such as IF statements and WHILE loops.
What is the difference between character and string data types?
A character is a single letter, digit, or symbol occupying exactly 1 byte (ASCII), while a string is a sequence of zero or more characters grouped together.
Define the floor division (//) and modulus (% or MOD) operators.
Floor division (//) returns the integer part of a division (e.g., 5//2=2), while modulus returns the remainder (e.g., 5%2=1).
What is decomposition in algorithms?
Breaking a complex problem down into smaller, more manageable sub-problems to make each part easier to analyze, design, and solve independently.
What is abstraction?
Removing unnecessary details from a problem and focusing only on the essential features relevant to solving it.
Contrast the requirements of linear search versus binary search.
Linear search works on both sorted and unsorted lists by checking elements sequentially; binary search requires a pre-sorted list and repeatedly halves the search space.
How does a bubble sort algorithm function?
It compares adjacent pairs and swaps them if they are in the wrong order, repeating passes until a full pass occurs with zero swaps.
How does a merge sort use a 'Divide and Conquer' strategy?
It recursively splits a list into individual sub-lists of 1 element, then repeatedly merges them back together in the correct order.
What is the difference between a variable and a constant?
A variable is a named memory location whose value can change during execution; a constant is a named memory location whose value cannot be modified once assigned.
What is the difference between definite and indefinite iteration?
Definite iteration (e.g., FOR loop) has a known number of loops before execution; indefinite iteration (e.g., WHILE loop) continues until a specific condition met.
What is the difference between a 1D array and a list?
Arrays have a fixed size and must contain the same data type (homogeneous); lists have a dynamic size and can hold different data types (heterogeneous).
What is a record data structure?
A custom data structure that groups related fields of different data types (e.g., integer, string, boolean) under a single record name.
What distinguishes a procedure from a function?
A procedure performs a task without returning a value, whereas a function performs a task and always returns a value using the return keyword.
Compare local and global variables.
Global variables are accessible anywhere but require permanent memory; local variables are declared inside subprograms, conserve memory, and prevent side effects.
What is the difference between validation and verification?
Validation is an automated check to ensure data is sensible (e.g., range checks); verification checks if data was entered accurately compared to a source (e.g., double entry).
What are syntax errors and logic errors?
Syntax errors break the rules of the programming language and prevent execution; logic errors allow the program to run but produce incorrect output.
Define boundary and erroneous test data.
Boundary data tests the extreme limits of validation rules (e.g., 0 and 100); erroneous data is completely invalid and should be rejected (e.g., "one hundred").
Why is Hexadecimal used by humans to represent binary?
It is easier to read/write as 1 hex digit equals 4 bits (a nibble), it reduces transcription errors, and it provides a shorter representation (e.g., 3A vs 00111010).
What are the standard data units for kB, MB, and GB in the AQA specification?
kB is 1,000 bytes, MB is 1,000kB (106 bytes), and GB is 1,000MB (109 bytes).
What is an overflow error in binary addition?
It occurs when the result of an addition requires more bits than the allocated storage (e.g., an 8-bit sum exceeding 255).
What is the mathematical effect of a Logical LEFT shift of n places?
It multiplies the number by 2n; bits shift left and empty spaces on the right are filled with 0s.
Contrast ASCII and Unicode.
ASCII uses 7 bits for 128 characters (English only); Unicode uses 16 to 32 bits to represent worldwide languages and symbols but requires more storage.
How is bitmap file size calculated?
File Size (bits) = Width (pixels)×Height (pixels)×Color Depth (bits).
What factors determine sound file quality and size?
Sampling Rate (measured in Hz) and Sample Resolution (bits per sample); higher values improve fidelity but increase file size.
Compare lossy and lossless compression.
Lossless reduces size without losing data (needed for text/code); lossy permanently removes less noticeable data to greatly reduce size but lowers quality.
Define the four standard logic gates.
AND (output 1 if both inputs are 1), OR (output 1 if any input is 1), NOT (inverts input), and XOR (output 1 if inputs are different).
What are the five main functions of an Operating System?
Processor management, Memory management, File management, Device management, and providing a User Interface.
What is an embedded system?
A dedicated computer system built into a larger device for a single, specific purpose (e.g., a microwave or traffic lights), running specialized firmware.
Compare compilers and interpreters.
A compiler translates the entire code into a standalone executable at once; an interpreter translates and executes code line-by-line, which is better for debugging.
What are the three core components of the CPU?
The Arithmetic Logic Unit (ALU), the Control Unit (CU), and Registers (high-speed temporary storage).
Describe the stages of the Fetch-Decode-Execute cycle.
The CPU fetches the next instruction from RAM, the Control Unit decodes it to determine the action, and the ALU or other component executes it.
What is the difference between RAM and ROM?
RAM is volatile, primary memory for open programs (read/write); ROM is non-volatile primary memory holding boot instructions (read-only).
Compare SSD and Magnetic storage.
SSDs are fast, durable, and silent but expensive; Magnetic drives offer high capacity and low cost per GB but are slower and have moving parts.
Define LAN and WAN.
A LAN (Local Area Network) covers a small area like a room or school and is owned by the organization; a WAN (Wide Area Network) covers large geographical areas using third-party infrastructure.
What is a network protocol?
A set of agreed-upon rules that govern how data is formatted, transmitted, and received across a network.
Identify the four layers of the TCP/IP model.
1. Application Layer, 2. Transport Layer, 3. Internet Layer, 4. Link Layer.
What is the function of the Transport Layer in the TCP/IP model?
It sets up end-to-end connections and uses TCP to split data into numbered packets, manage error checking, and ensure reliable delivery.