A1.2.1Principal methods of representing data
0/11
A1.2 Data representation and computer logicA1.2.1

Principal methods of representing data

Describe the principal methods of representing data

SL + HL≈ 45 minCommand term: DescribeFree lesson

In this lesson

  • How integers are represented in binary and in hexadecimal
  • Converting binary and hexadecimal integers to denary, and denary to binary and hexadecimal
  • Converting integers directly between binary and hexadecimal

LearnWhy computers use binary

Everything a computer stores or processes, from numbers to video, is represented with just two symbols: 0 and 1.

    0 of 3

    LearnPlace value in binary

    Binary works exactly like denary, but each column is worth twice the column to its right instead of ten times.

      0 of 4

      LabNumber systems lab

      In Explore, click the bits to switch them on and off and watch the denary and hexadecimal values change. Then switch to Practise and convert three numbers correctly.

      Place value1286432168421
      Bit
      Hex digit
      0100 = 4
      1101 = D
      Binary  010011012
      Denary  64 + 8 + 4 + 1 = 7710
      Hex     4D16

      With 8 bits the largest value is 28 − 1 = 255, so 8 bits can store 256 different values.

      MethodBinary to denary

      Convert 101101102 to denary. Show your working.

      [2]
        Try writing your own answer first.

        MethodDenary to binary

        There are two common methods. Both give 15610 = 100111002.

          0 of 3

          CheckQuick check

          A sensor stores each reading as an unsigned 6-bit integer. What is the largest reading it can store?

          LearnHexadecimal

          Hexadecimal (hex) is base 16. It needs sixteen digits, so after 9 it uses letters.

            0 of 4

            ReferenceThe sixteen nibbles

            DenaryBinaryHexDenaryBinaryHex
            000000810008
            100011910019
            200102101010A
            300113111011B
            401004121100C
            501015131101D
            601106141110E
            701117151111F

            You do not need to memorise this table: any nibble can be worked out with the place values 8, 4, 2, 1.

            MethodConverting with hexadecimal

              0 of 4

              CheckMatch each value to its equal

              Select a term on the left, then its description on the right.

              CheckOrder the steps

              Put the steps in order to convert 7510 to hexadecimal by way of binary.

              1. Tap the steps below in the correct order.

              CodeBases in Python

              Python has built-in conversions, but the function below uses the repeated-division method so you can see the algorithm. Run it, then try other numbers.

              main.py · Python 3
              Output appears here. The first run loads Python into the page (a few seconds).
              Change the code so that it prints 255 in binary and in hexadecimal. Why does the function add each new digit on the left?

              ReviewMistakes examiners see

              Misconception

              Hexadecimal is base 16, not base 8. Base 8 is octal, which is not in this course.

              Misconception

              After repeated division, the remainders are read from the last to the first. Reading them top-down reverses the number.

              Misconception

              When grouping binary into nibbles, start from the right. Grouping from the left gives the wrong digits when the bit count is not a multiple of 4.

              Misconception

              n bits store 2n values, but the largest unsigned value is 2n − 1 because counting starts at 0.

              Exam tip

              Show your place value table. Conversion questions often have a mark for the working as well as for the answer.

              Exam practiceExam-style questions

              5 questions · 10 marks. Answer each one first, then mark it yourself against the markscheme. Your answers are saved in this browser only.

              Scenario

              A hospital's IT team configures network devices and medical sensors. Settings and memory addresses are shown in hexadecimal, and sensor readings are stored as unsigned binary integers.

              (a)State · AO1[1]

              State the binary equivalent of the hexadecimal number AC.

              (b)Calculate · AO2[2]

              A sensor reading is stored as 011011012. Calculate the denary value of this reading. Show your working.

              (c)Calculate · AO2[2]

              A setting has the denary value 237. Calculate its hexadecimal equivalent. Show your working.

              (d)Outline · AO2[2]

              Outline one reason why the IT team's software displays memory addresses in hexadecimal rather than in binary.

              (e)Describe · AO2[3]

              Describe how a binary number is converted to hexadecimal.

              0 / 10

              0 of 5 questions marked. Mark every question to see your total.

              Exam-style questions written for Praxis IB in the format of the 2027 specimen papers. They are not IB past-paper questions.