Binary and denary Cambridge IGCSE Computer Science (9–1) revision

Not started

Learn it

In plain words

A computer is built from billions of tiny switches, and a switch has only two states: on or off. So everything a computer handles, whether numbers, text, pictures or sound, has to be stored as patterns of 1s and 0s. That is binary.

We count in denary, base 10, where each place is worth ten times the one to its right: 1, 10, 100. Binary is base 2: each place is worth double the one to its right: 1, 2, 4, 8, 16.

6 things to know

  1. Denary is base 10 and uses the digits 0 to 9. Binary is base 2 and uses only 0 and 1.
  2. One binary digit is a bit. Data is processed using logic gates and stored in registers.
  3. The place values of an 8-bit number are 128, 64, 32, 16, 8, 4, 2, 1. For 16 bits they carry on doubling: 256, 512, 1024 and so on up to 32 768.
  4. Binary to denary: add the place values that have a 1 under them.
  5. Denary to binary: start at the largest place value. If it fits into what is left, write 1 and subtract it. If not, write 0. Carry on down to 1.
  6. With n bits there are 2ⁿ different patterns. Eight bits give 256 patterns, so the largest 8-bit number is 255.

Worked example

Convert the binary number 10010110 to denary.

  1. Write the place values above the bits: 128, 64, 32, 16, 8, 4, 2, 1.
  2. The bits that are 1 sit under 128, 16, 4 and 2.
  3. 128 + 16 + 4 + 2 = 150.

Worked example

Convert the denary number 77 to 8-bit binary.

  1. 128 does not fit: 0. 64 fits: 1, leaving 13. 32 does not fit: 0. 16 does not fit: 0.
  2. 8 fits: 1, leaving 5. 4 fits: 1, leaving 1. 2 does not fit: 0. 1 fits: 1.
  3. 77 = 01001101.

Tips and tricks

  • Write the place values above the number every time. It takes five seconds and stops nearly every slip.
  • A quick check: an odd number always ends in 1, and an even number ends in 0.
  • If the question says 8-bit, write all eight bits, including any zeros at the front.
6 questions, about 2 minutes.

It lands in your notebook with its questions as flashcards.

Binary and denary: 6 questions and answers

These are the quiz’s questions. Do the quiz first, then come back here for the ones that got you.

  1. What is the denary value of the binary number 00101101?
    • 44
    • 45 (the answer)
    • 53
    • 90

    32 + 8 + 4 + 1 = 45.

  2. Which is the 8-bit binary for the denary number 100?
    • 01100010
    • 01100100 (the answer)
    • 01010100
    • 11001000

    64 + 32 + 4 = 100.

  3. What is the largest denary number that 8 bits can hold?
    • 127
    • 128
    • 255 (the answer)
    • 256

    11111111 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. There are 256 patterns, but the first one is 0.

  4. How many different values can be represented with 4 bits?
    • 4
    • 8
    • 15
    • 16 (the answer)

    2 × 2 × 2 × 2 = 16 patterns, from 0000 to 1111.

  5. Why do computers store data in binary?
    • Binary numbers are shorter than denary numbers.
    • Binary is easier for people to read.
    • Their circuits are built from switches that have two states. (the answer)
    • Binary data never contains errors.

    On and off are stored as 1 and 0.

  6. What is the denary value of the 16-bit number 0000000100000001?Stretch
    • 65
    • 129
    • 257 (the answer)
    • 513

    The ninth bit from the right is worth 256, and the last bit is worth 1.

Still stuck on this one?Ask in the Papermunch Discord, or help someone else who is. Discord is for ages 13 and up.Join the server

Things you can type

Or go straight to

Or browse a shelf