aimnova.
DashboardMy LearningPaper MasteryStudy Plan

Aimnova site navigation

Stay in the loop

Get the latest study resources and updates

New features, study tips and exam insights — straight to your inbox.

IB Diploma

  • IB Past Papers
  • IB Study Notes
  • IB Question Bank
  • IB Mock Exams
  • IB Revision

IB Subjects

  • IB Math AA
  • IB Math AI
  • IB Economics
  • IB Business Management
  • IB Physics
  • IB Biology
  • View all IB subjects→

IB Past Papers

  • IB Math AA HL Past Papers
  • IB Math AA SL Past Papers
  • IB Math AI HL Past Papers
  • IB Math AI SL Past Papers
  • IB Economics HL Past Papers
  • IB Economics SL Past Papers
  • IB ESS Past Papers
  • View all past papers→

Study Resources

  • Study Notes
  • Question Bank
  • Mock Exams
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aimnova.

AI-powered study platform for smarter revision, past-paper analysis and examiner-style feedback.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.8afc4e3

Aimnova is not affiliated with or endorsed by the International Baccalaureate Organization (IB).

NotesComputer Science HLTopic 1.2
Unit 1 · Computer fundamentals · Topic 1.2

IB Computer Science HL — Data representation and logic

Data representation and computer logic

Higher Level students should use this topic hub as a map: start with the shared sub-topics, then follow the HL-only extensions and exam-skill links where this topic asks for deeper analysis.

Exam technique guidePractice questions

Key concepts in Data representation and logic

Key Idea: Everything inside a computer is a pattern of bits. Number bases let those patterns be written compactly, and logic gates are how the machine acts on them.

Paper 1

  • Short answers and structured questions.
  • Define, state, describe — one precise line per mark.

Paper 2

  • Applied, scenario-based.
  • Calculations — conversions, capacities, transfer times.

Both

  • Explain wants the mechanism AND its consequence.
  • Show every step of a conversion — method marks survive a wrong answer.

🔢 Converting between bases

Conversions appear on both papers and they are free marks — provided you show the working.

ConversionMethod
Denary → binaryDivide by 2 repeatedly, read the remainders upwards
Binary → denaryAdd the place values where a 1 appears
Binary → hexGroup into 4 bits from the RIGHT, convert each group
Hex → binaryExpand each hex digit into exactly 4 bits, keeping leading zeros

Place values to have by heart

  • 128 · 64 · 32 · 16 · 8 · 4 · 2 · 1 — eight bits, and their sum is 255
  • One hex digit is exactly 4 bits, which is the whole reason hex is used
  • Hex digits run 0–9 then A=10, B=11, C=12, D=13, E=14, F=15
n bits give 2ⁿ different values. To represent V values you need the smallest n with 2ⁿ ≥ V. So 8 bits = 256 values = 0 to 255.
Important: If a result needs more bits than the register holds, the top bits are lost — the answer wraps round rather than growing. Adding two 8-bit numbers whose total exceeds 255 is the standard example.

🖼️ Storing different kinds of data

DataSize calculationWatch out for
Textcharacters × bits per characterASCII 7–8 bits; Unicode more
Imagewidth × height × bit depthAnswer is in bits — divide by 8
Soundsample rate × bit depth × channels × secondsStereo means × 2
Forgetting the two channels in a stereo sound calculation halves the answer, and forgetting to divide by 8 multiplies it by eight. Write the unit on every line.

🔌 The logic gates

GateOutput is 1 when…
NOTthe input is 0 (it inverts)
ANDboth inputs are 1
ORat least one input is 1
NANDnot both are 1 (the opposite of AND)
NORneither is 1 (the opposite of OR)
XORthe inputs differ
A table for n inputs has 2ⁿ rows — 2 inputs give 4, 3 inputs give 8. List the input combinations in binary counting order so none is missed.

Reading a logic diagram

  • Work left to right, labelling the output of every gate as you go
  • Add one column per intermediate output, not just the final one
  • Two diagrams are equivalent if their truth tables match — not if they look alike

📝 Exam-style questions

IB-style questionDetermine[3 marks]

Convert the denary number 205 to binary and then to hexadecimal.

🔒 Model answer plan

See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.

Claim your free topic →
IB-style questionDetermine[4 marks]

A stereo recording lasts 90 seconds, sampled at 48 000 samples per second with 16 bits per sample. Determine the file size in megabytes, taking 1 MB as 1 000 000 bytes.

🔒 Model answer plan

See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.

Claim your free topic →
IB-style questionConstruct[4 marks]

Construct a truth table for the expression (A AND NOT B) OR C.

🔒 Model answer plan

See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.

Claim your free topic →

✅ Quick check

Cover the answers and work left to right.

How many values can 6 bits represent? 2⁶ = 64 (0 to 63).

Why is hexadecimal used at all? One hex digit is exactly 4 bits, so converting needs no arithmetic — just grouping.

A 3-input truth table has how many rows? 2³ = 8.

Which gate outputs 1 only when its inputs DIFFER? XOR.

An image is 800 × 600 with 24-bit colour. Size in bits? 800 × 600 × 24 = 11 520 000 bits (divide by 8 for bytes).


Exam tips

  • Show the place values or the division remainders — a wrong answer with correct method still scores.
  • Group binary into fours FROM THE RIGHT when converting to hex.
  • n bits give 2ⁿ values; to hold V values you need 2ⁿ ≥ V.
  • Image and sound sizes come out in BITS. Divide by 8 for bytes, and remember stereo doubles it.
  • Give every intermediate gate its own truth-table column — they carry marks.
  • Equivalence is proved by matching truth tables, never by the diagrams looking similar.

What you'll learn in Topic 1.2

  • 1.2.1 Binary and hex
  • 1.2.2 Storing data in binary
  • 1.2.3 Logic gates
  • 1.2.4 Truth tables
  • 1.2.5 Logic diagrams
Suggested study order: Read the notes for each sub-topic below → test yourself with flashcards → attempt practice questions → review exam technique.

Study resources — 1.2 Data representation and logic

1.2.1

Binary and hex

Notes
1.2.2

Storing data in binary

Notes
1.2.3

Logic gates

Notes
1.2.4

Truth tables

Notes
1.2.5

Logic diagrams

Notes

Ready to study Data representation and logic?

Get expert practice questions with instant AI feedback, and a study planner tailored to your IB Computer Science HL exam date.

Start studying free

Topic 1.2 Data representation and logic forms a core part of Unit 1: Computer fundamentals in IB Computer Science HL. Mastering these concepts will strengthen your understanding of connected topics across the syllabus and prepare you for exam questions that require analysis, evaluation, and real-world application.

Previous topic
1.1 Hardware and operation
Next topic
1.3 Operating and control systems
All Computer Science HL topics
Exam technique

Ready to practice?

Get AI-graded practice questions, mock exams, flashcards, and a personalised study plan — all aligned to your IB syllabus.

Start Studying Free

No credit card required · No time limit