Zooming in on: chiptechnology
logo

Zooming in on: chiptechnology

Module 1 Module 2 Module 3 Module 4 Module 5

  Translating binary code


Numbers are most easily represented in binary code.

The translation from decimal digits to binary digits is done by powers of two.
Any natural number can be obtained by adding powers of two.

Here, we look at the first eight powers of two. Note that the zero power also counts.

Power 20 21 22 23
24
25 26 27
Solution 1 2 4 8 16 32 64 128

To count in binary, you must order the eight first powers of two from largest to smallest.

Power 27 26 25 24
23
22 21 20
Solution 128 64 32 16 8 4 2 1

Suppose you want to write the number 1 in binary code you must start by finding the power of two that goes with 1. That is 20. So we need 1 times 20. 20 is on the far right, so we put a one there.

Power 27 26 25 24
23
22 21 20
Solution 128 64 32 16 8 4 2 1
 Binary number

So the binary figure 1 is 0000 0001.

Suppose you want to write the number 2 in binary code ; you must start by finding the power of two that goes with 2. That is 21. So we need 1 times 21. We put a one under 21.

Power 27 26 25 24
23
22 21 20
Solution 128 64 32 16 8 4 2 1
 Binary number 1 0
So the binary figure 2 is 0000 0010.

Use the interaction below to experiment with this.