Skip to content
ExamSpine

A1.2 Data representation and computer logic: notes and practice

A1.2 covers how computers store everything as binary (numbers, text, images and sound) and how logic gates combine bits. Expect number conversions, file size calculations, truth tables and Boolean expressions.

Paper 1SL and HL4 practice questions

What you need to know

Our summary of the topic in our own words, not the IB guide.

  • Explain why computers represent all data in binary
  • Convert between denary, binary and hexadecimal
  • Calculate the number of distinct values a given number of bits can represent
  • Explain the relationship between bits, bytes and the common size prefixes
  • Explain how integers are stored, including a representation for negative numbers
  • Explain how characters and strings are stored using a character encoding such as ASCII or UTF-8
  • Explain how a bitmap image is stored, and how resolution and colour depth affect file size
  • Compare raster and vector image representation
  • Explain how sound is digitised, and how sample rate and bit depth affect quality and file size
  • Explain how video is stored and why frame rate, resolution and compression drive file size
  • State the purpose of a logic gate and name the common gates AND, OR, NOT, NAND, NOR and XOR
  • Write the Boolean expression for a described condition
  • Construct a truth table for a single gate
  • Construct a truth table for a multi-input Boolean expression, applying the correct order of operations
  • Use a Karnaugh map to simplify a Boolean expression
  • Draw a logic circuit diagram from a Boolean expression
  • Derive the Boolean expression and truth table from a given logic circuit diagram

Practice questions

Original questions written for the 2027 course, marked as you go. Easiest first.

Exam tips for A1.2

  • Show your working in conversions and file size calculations. A method mark can survive one slip in arithmetic.
  • For truth tables, list the inputs in binary counting order (000, 001, 010 and so on) so you never miss a row.
  • Remember NOT applies before AND, and AND before OR, unless brackets say otherwise.

Updated 24 October 2026. Topic codes are used as labels. Everything on this page is written by ExamSpine and is not endorsed by the IB.