Computer science Mich year 9 test revision

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/43

encourage image

There's no tags or description

Looks like no tags are added yet.

44 Terms

1
New cards

What is the denary (base-10) number 45 in 8-bit binary?

00101101 (32 + 8 + 4 + 1)

2
New cards

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).

3
New cards

What is the 8-bit binary number 10110110 in denary (base-10)?

182 (128 + 32 + 16 + 4 + 2)

4
New cards

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.

5
New cards

Convert the binary number 11010111 into hexadecimal.

D7 (1101 = 13 = D, and 0111 = 7)

6
New cards

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.

7
New cards

Convert the hexadecimal number 3E into binary.

00111110 (3 = 0011, E = 14 = 1110)

8
New cards

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.

9
New cards

What is the result of performing a logical left shift of 2 places on 00010110 (22)?

01011000 (which equals 88, or 22 × 4)

10
New cards

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.

11
New cards

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).

12
New cards

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.

13
New cards

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.

14
New cards

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.

15
New cards

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.

16
New cards

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.

17
New cards

What is sequential execution in programming?

Running instructions one after another in the exact order they are written, from top to bottom.

18
New cards

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).

19
New cards

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.

20
New cards

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.

21
New cards

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).

22
New cards

What is the purpose of the print() function in Python?

To output text messages, numbers, or the current values of variables to the screen.

23
New cards

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.

24
New cards

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.

25
New cards

What do the comparison operators

Less than (

26
New cards

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).

27
New cards

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.

28
New cards

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).

29
New cards

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.

30
New cards

What are the five components of the five-box model of a computer?

Input, Processor (CPU), Main Memory (Primary Storage), Secondary Storage, and Output.

31
New cards

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.

32
New cards

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).

33
New cards

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.

34
New cards

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.

35
New cards

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.

36
New cards

How are both programs and data stored inside a computer's memory?

They are both stored in binary form (sequences of 1s and 0s).

37
New cards

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.

38
New cards

How does the computer access Secondary Storage?

Through a device driver (software that allows the operating system to communicate with the storage hardware).

39
New cards

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.

40
New cards

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.

41
New cards

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.

42
New cards

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.

43
New cards

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.

44
New cards

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).