1/43
Looks like no tags are added yet.
What is the denary (base-10) number 45 in 8-bit binary?
00101101 (32 + 8 + 4 + 1)
How do you convert a denary number into binary?
Repeatedly divide by 2 and record the remainders (or subtract the largest powers of 2: 128, 64, 32, 16, 8, 4, 2, 1).
What is the 8-bit binary number 10110110 in denary (base-10)?
182 (128 + 32 + 16 + 4 + 2)
How do you convert an 8-bit binary number to hexadecimal using the 4-grouping method?
Split the binary number into two nibbles (groups of 4 bits), convert each nibble to denary (0-15), and replace values 10-15 with letters A-F.
Convert the binary number 11010111 into hexadecimal.
D7 (1101 = 13 = D, and 0111 = 7)
How do you convert a hexadecimal number into binary?
Convert each individual hex digit (0-9, A-F) into its 4-bit binary equivalent (nibble) and combine them.
Convert the hexadecimal number 3E into binary.
00111110 (3 = 0011, E = 14 = 1110)
How do you multiply a binary number by 2^n using bit shifting?
Perform a left binary shift by n places, filling the empty spaces on the right with zeros.
What is the result of performing a logical left shift of 2 places on 00010110 (22)?
01011000 (which equals 88, or 22 × 4)
How do you divide a binary number by 2^n using bit shifting?
Perform a right binary shift by n places, discarding the bits shifted off the right end and filling the left with zeros.
What is an overflow error in binary arithmetic?
An error that occurs when the result of a calculation is too large to fit into the allocated number of bits (e.g., exceeding 255 in an 8-bit system).
Why can an overflow error cause serious bugs in a program?
Because the extra carry bit is lost, causing the stored value to wrap around to a much smaller, incorrect number.
What flowchart symbol is used to represent selection (a decision)?
A diamond shape, typically containing a Yes/No or True/False question with two arrows branching out.
How is repetition (a loop) shown in a flowchart?
A decision diamond whose branch arrow loops back up to an earlier point in the flowchart to repeat instructions.
What is the difference between a count-controlled loop and a condition-controlled loop in a flowchart?
A count-controlled loop uses a counter variable to repeat a set number of times, while a condition-controlled loop repeats until a specific state or condition is met.
How is input validation implemented in a flowchart?
Using a selection diamond to check if the input meets a rule; if invalid, the arrow loops back to ask the user for input again.
What is sequential execution in programming?
Running instructions one after another in the exact order they are written, from top to bottom.
What are the three main basic data types in Python and what do they store?
int (whole numbers), float (decimal numbers), and str / string (text/characters).
What are the standard rules for naming variables in Python?
Must start with a letter or underscore, cannot contain spaces or special symbols (only letters, numbers, underscores), and cannot be a reserved keyword.
What is the purpose of the single equals sign (=) in programming?
It is the assignment operator, used to store or update a value inside a variable.
What does the input() function do in Python, and what data type does it always return?
It pauses the program to let the user type data, and it always returns that data as a string (str).
What is the purpose of the print() function in Python?
To output text messages, numbers, or the current values of variables to the screen.
Why and how do you use int() with input() in Python?
Because input() returns text; wrapping it in int(input()) converts (casts) the user's text into an integer so you can do math with it.
What do the comparison operators == and != mean?
== checks if two values are equal to each other; != checks if two values are not equal to each other.
What do the comparison operators
Less than (
How do the Boolean operators and, or, and not work?
'and' requires both conditions to be True; 'or' requires at least one condition to be True; 'not' reverses a Boolean value (True becomes False).
How do if, elif, and else work together in selection?
'if' checks the first condition, 'elif' checks alternative conditions if previous ones were False, and 'else' runs if all preceding conditions were False.
How do you write a count-controlled loop using a while loop in Python?
Initialize a counter variable (e.g., count = 0), set the condition (e.g., while count < 5:), and increment the counter inside the loop (count = count + 1).
How is a Boolean flag used with a while loop for input validation?
Set a variable like valid = False before the loop, run 'while not valid:', and only set valid = True inside an 'if' block when the user enters acceptable data.
What are the five components of the five-box model of a computer?
Input, Processor (CPU), Main Memory (Primary Storage), Secondary Storage, and Output.
In the five-box model, how does data move between components?
Data enters via Input into Main Memory, moves back and forth between Main Memory and the CPU/Secondary Storage, and leaves from Main Memory to Output.
What is the function of the CPU (or SoC) in a computer?
The Central Processing Unit fetches, decodes, and executes instructions and performs calculations (an SoC combines the CPU, GPU, and memory onto one chip).
What is the function of RAM in a computer?
Random Access Memory temporarily holds currently running programs and active data so the CPU can access them quickly.
What is the function of Secondary Storage (HDD or SSD)?
To permanently store the operating system, installed applications, and user files even when the power is turned off.
Give four examples of digital devices that are considered computers (other than a desktop PC).
Smartphones, tablets, smartwatches, game consoles, smart TVs, or embedded systems in washing machines/cars.
How are both programs and data stored inside a computer's memory?
They are both stored in binary form (sequences of 1s and 0s).
Why is Secondary Storage (HDD/SSD) needed if a computer already has RAM?
Because RAM is volatile (loses data when power is off), whereas Secondary Storage is non-volatile and keeps files and apps saved long-term.
How does the computer access Secondary Storage?
Through a device driver (software that allows the operating system to communicate with the storage hardware).
How does magnetic storage (e.g., HDD) work, and what are its main traits?
Uses spinning magnetic platters and a read/write head; high capacity and cheap per GB, but slower and fragile due to moving parts.
How does solid-state storage (e.g., SSD, USB drive) work, and what are its main traits?
Uses flash memory chips with no moving parts; very fast, silent, and durable, but more expensive per GB than HDDs.
How does optical storage (e.g., CD, DVD, Blu-ray) work, and what are its main traits?
Uses a laser to burn and read microscopic pits and lands on a spinning disc; cheap and portable, but low capacity and easily scratched.
What does it mean that Primary Storage (RAM) is volatile and directly accessed by the processor?
The CPU can read/write to RAM at very high speeds without needing a driver, but all contents in RAM are wiped clean the moment power is lost.
What are the environmental impacts of e-Waste?
Toxic chemicals (like lead and mercury) leak into soil and water, mining raw materials destroys habitats, and manufacturing creates high carbon emissions.
What are two key measures to reduce e-Waste?
Recycling old electronics properly to recover valuable metals, and lengthening the replacement cycle (repairing and keeping devices longer instead of upgrading frequently).