Back to all Computer Science topics
Topic 1.2Computer Science HL25 flashcards

Data representation and logic

Practice Flashcards

Flip cards to reveal answers
Card 1 of 251.2.1
1.2.1
Question

How do you convert a binary number to decimal?

Click to reveal answer

Track your progress — Sign up free to save your progress and get smart review reminders based on spaced repetition.

All Flashcards in Topic 1.2

Below are all 25 flashcards for this topic. Sign up free to track your progress and get personalized review schedules.

1.2.15 cards

Card 1process
Question

How do you convert a binary number to decimal?

Answer

Write the column values above it — 128 64 32 16 8 4 2 1 — and add the columns that have a 1 under them. 10110101 = 128 + 32 + 16 + 4 + 1 = 181.

Card 2process
Question

How do you convert a decimal number to binary?

Answer

Take the biggest column value that fits, subtract it, and repeat with what is left. 181: 128 fits (53 left), 32 fits (21), 16 fits (5), 4 fits (1), 1 fits (0) — so 10110101. Add the columns back to check.

Card 3concept
Question

Why does one hex digit equal exactly four bits?

Answer

Four bits can hold the values 0 to 15, which is exactly the range of a single hex digit (0 to F). So any four bits swap cleanly for one character.

Card 4process
Question

How do you convert binary to hexadecimal?

Answer

Group the bits in fours starting from the right, padding the leftmost group with zeros, then turn each group into its digit. 101101 is 0010 1101, which is 2D.

Card 5definition
Question

What are the hex digits above 9?

Answer

A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. To convert two hex digits to decimal, multiply the left by 16 and add the right: B5 = 11 × 16 + 5 = 181.

1.2.25 cards

Card 6concept
Question

Why do the same bits mean different things in different files?

Answer

Because the meaning is an agreement held by the program reading them, not a property of the bits. 01000001 is 65 read by place value and A read through a character set.

Card 7process
Question

How is text stored in binary?

Answer

Each character is given a number by an agreed character set — 65 for A in ASCII — and that number is stored in binary. A string is those numbers one after another, so CAT is 67, 65, 84.

Card 8comparison
Question

What is the difference between ASCII and Unicode?

Answer

ASCII uses one byte per character and covers English. Unicode assigns numbers to every writing system, using more bytes per character where it needs them.

Card 9process
Question

How is an image stored in binary?

Answer

The picture is divided into a grid of pixels, and each pixel's colour is stored as numbers — one byte for greyscale, or three bytes for red, green and blue. More pixels means proportionally more storage.

Card 10process
Question

How are audio and video stored?

Answer

Audio: the height of the sound wave measured thousands of times a second, each measurement stored as a number. Video: a complete image 24 to 60 times a second, plus the audio — which is why video files are the largest.

1.2.35 cards

Card 11definition
Question

What is a logic gate?

Answer

A component that takes one or two bits in and gives one bit out, always the same way for the same inputs. Gates wired together are what a CPU is physically built from.

Card 12definition
Question

When does each basic gate output 1?

Answer

AND: only when both inputs are 1. OR: when at least one input is 1. NOT: when the single input is 0. XOR: when the two inputs are different.

Card 13concept
Question

What does a circle on a gate's output mean?

Answer

Invert the output. AND with a circle is NAND, OR with a circle is NOR, XOR with a circle is XNOR — each is the original table with every output flipped.

Card 14comparison
Question

What is the difference between OR and XOR?

Answer

When both inputs are 1, OR gives 1 but XOR gives 0. XOR means the inputs are different, so it rules out the both-on case. A rule saying 'one or the other but not both' is XOR.

Card 15example
Question

Give a real use for AND and for OR.

Answer

AND: a microwave runs only if the door is closed and the timer is running — the rule says 'both'. OR: a car alarm sounds if any one of several doors opens — the rule says 'any'.

1.2.45 cards

Card 16concept
Question

How many rows does a truth table need?

Answer

Two to the power of the number of inputs: 2 inputs give 4 rows, 3 give 8, 4 give 16. The rows are counted upwards in binary, so no combination is missed.

Card 17process
Question

How do you build a truth table from a logic circuit?

Answer

Give every gate its own column and work left to right. Fill the input columns first, then each gate column using only its own inputs, then combine those for the final output.

Card 18definition
Question

How do you write a circuit as a Boolean expression?

Answer

Use · for AND, + for OR and NOT for inversion. A circuit where an AND of A and B feeds an OR alongside an inverted C is X = (A·B) + NOT C.

Card 19process
Question

How does a Karnaugh map simplify an expression?

Answer

The outputs are arranged so neighbouring squares differ by one variable only. Circle the largest groups of adjacent 1s in sizes 1, 2, 4 or 8; for each circle keep the variables that stay constant and drop those that change.

Card 20concept
Question

Why simplify a Boolean expression?

Answer

A shorter expression is a circuit built from fewer gates — less hardware, less power consumption and fewer things to fail. For example A·B + A·(NOT B) simplifies to just A, needing no gates at all.

1.2.55 cards

Card 21process
Question

How do you construct a logic diagram from a worded rule?

Answer

Write the Boolean expression first, draw the inputs down the left, draw the gates inside the brackets first, then feed their outputs into the final gate and label the output line.

Card 22definition
Question

How are the standard gate symbols recognised?

Answer

A flat-backed D shape is AND; a curved back with a pointed front is OR; a triangle with a circle is NOT. A circle on any output inverts it; an extra curve at the back makes it exclusive.

Card 23concept
Question

Which gate in an expression gets drawn first?

Answer

Whichever is inside the brackets. Its output feeds the gate outside them. Drawing them the other way round reverses the logic and is the most common mistake.

Card 24concept
Question

Which two Boolean rules save the most gates?

Answer

A + A·B = A, which drops a whole term when A alone is already enough, and A·(B + C) = A·B + A·C, which lets you factor out what is common. A repeated letter is the clue to look for.

Card 25process
Question

How do you check that a simplification is correct?

Answer

Build the truth table for the original expression and for the simplified one. Every row must match. This catches nearly every error, and a shorter expression is never proof on its own.

Want smart review reminders?

Sign up free to track your progress. Our spaced repetition algorithm will tell you exactly which cards to review and when.

Start Free
IB Computer Science HL Topic 1.2 Flashcards | Data representation and logic | Aimnova