Data representation - EduqasBinary place values

Binary data can represent numbers, graphics, sound and characters. It is then organised and manipulated differently. Data can also be stored in arrays, records or external files and go through validation or verification checks to ensure accuracy.

Part ofComputer ScienceUnderstanding Computer Science

Binary place values

Binary has just two units, 0 and 1. The value of each binary place value is calculated by multiplying the previous place value by two. The first eight binary place values are 128, 64, 32, 16, 8, 4, 2 and 1.

In binary, each place value can be represented only by a 1 or a 0.

Denary to binary

To convert binary to denary, take each place value that has a 1 and add them together.

Example - binary number 01111100

Place value1286432168421
Value01111100
Place valueValue
1280
641
321
161
81
41
20
10

This gives (0 × 128) + (1 × 64) + (1 × 32) + (1 × 16) + (1 × 8) +

(1 × 4) + (0 × 2) + (0 × 1) = 124

Question

What would these binary numbers be in denary?

  1. 00001001
  2. 00010101
  3. 11001100

16-bit binary conversion

To convert larger binary numbers it is important to include more column place headings, each double the value of the previous column. So for 16 , 16 column place headings are needed.

Place value32,76816,3848,1924,0962,0481,0245122561286432168421
Value0011000101000010
Place valueValue
32,7680
16,3840
8,1921
4,0961
2,0480
1,0240
5120
2561
1280
641
320
160
80
40
21
10

Here the denary conversion will be (8,192 + 4,096 + 256 + 64 + 2) = 12,610

Question

What would this 16-bit binary number be in denary?

  1. 1000101011100001

Example - denary number 84

  • First set up the columns of binary place values.
Place value1286432168421
Value
Place valueValue
128
64
32
16
8
4
2
1
  • 64 is the biggest binary place value that can be subtracted from 84. Place a 1 in the 64 place value column and subtract 64 from 84, which gives 20.
Place value1286432168421
Value1
Place valueValue
128
641
32
16
8
4
2
1
  • 16 is the biggest binary place value that can be subtracted from 20. Place a 1 in the 16 place value column and subtract 16 from 20, which gives 4.
Place value1286432168421
Value11
Place valueValue
128
641
32
161
8
4
2
1
  • 4 is the biggest binary place value that can be subtracted from 4. Place a 1 in the 4 place value column and subtract 4 from 4, which gives 0.
Place value1286432168421
Value111
Place valueValue
128
641
32
161
8
41
2
1
  • Place a 0 in each remaining empty place value column.
Place value1286432168421
Value01010100
Place valueValue
1280
641
320
161
80
41
20
10

Result: 84 in denary is 1010100 in binary.

To check that this is right, convert the binary back to denary:

(0 × 128) + (1 × 64) + (0 × 32) + (1 × 16) + (0 × 8) + (1 × 4) +

(0 × 2) + (0 × 1) = 84

Another way to convert a denary number to binary is to repeatedly divide the denary number by two. Writing the values down right to left, if it divides evenly, the binary digit is 0. If it does not and there is a remainder, the binary digit is 1. At each step, use the result of the division without the remainder. For example, 21 divided by 2 is 10, remainder 1, so use 10 for the next step.

Using this method, 84 becomes 01010100. Confirm the answer by converting back to denary, which makes 84.

A method of converting a denary number to binary

Question

What would these denary numbers be in binary?

  1. 12
  2. 42
  3. 188

This table illustrates the relationship between denary and binary numbers, starting from 0 up to 255.

Table showing relationship between denary and binary numbers from zero to 255