One method used to convert a denary number into an 8-bit binary number is to mark down the bits needed to form the number in a placeholder grid.
Denary
128
64
32
16
8
4
2
1
Binary
Denary
128
64
32
16
8
4
2
1
Binary
Worked example: Denary number 84
Mark down the highest powers of two required to form the number:
The highest power of 2 that fits into 84 is 64 (26), so mark a 1 below the 64.
Selecting 64 leaves a remainder of 20 (from the original 84). The highest power of 2 that fits into 20 is 16, so mark a 1 below the 16.
Selecting 16 still leaves 4 as a remainder. The highest power of 2 that fits into 4 is 4, so mark a 1 below the 4.
This leaves no remainders, so mark a 0 below the denary numbers you do not require.
Denary
128
64
32
16
8
4
2
1
Binary
0
1
0
1
0
1
0
0
Denary
128
64
32
16
8
4
2
1
Binary
0
1
0
1
0
1
0
0
This produces the 8-bit binaryA number system that contains two symbols, 0 and 1. Also known as base 2. number 0101 0100, equivalent to 84 in denary (64 + 16 + 4).
Animation of method one for converting a denary number to binary
Method two
Another method to convert denary to binary is to divide the number by 2 and mark down the remainder (1 or 0).
Worked example: Denary number 83
\(83 \div 2 = 41\) (remainder 1)
\(41 \div 2 = 20\) (remainder 1)
\(20 \div 2 = 10\) (remainder 0)
\(10 \div 2 = 5\) (remainder 0)
\(5 \div 2 = 2\) (remainder 1)
\(2 \div 2 = 1\) (remainder 0)
\(1 \div 2 = 0\) (remainder 1)
Starting with the least significant bit (LSB), mark down the remainders
1010011
As there are only seven digits in this binary number, you can make it into an 8-bit binary number by 'padding' the result with the required number of 0s on the left.
This produces the 8-bit binary number 0101 0011, equivalent to 83 in denary (64 + 16 + 2 + 1).
Animation of method two for converting a denary number to binary