Converting Between Denary and Binary Numbers
This guide explains how to convert positive denary whole numbers to binary numbers (up to 8 bits) and vice versa. The conversion is demonstrated using a table method, suitable for numbers in the 0 – 255 denary range and 00000000 – 11111111 binary range.
Denary to Binary Conversion Using a Table
To convert a denary number to binary, use a table with 8 columns representing the binary place values: 128, 64, 32, 16, 8, 4, 2, and 1. Place a 1 in each column where the denary number can be subtracted from and a 0 where it cannot.
Example:
Convert 157 to binary:
Binary: 10011101
Binary to Denary Conversion Using a Table
To convert from binary to denary, use the same table and add the values of the columns with a 1.
Example:
Convert 10011101 to denary:
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 |
128 | 0 | 0 | 16 | 8 | 4 | 0 | 1 |
Denary: 128 + 16 + 8 + 4 + 1 = 157
Dealing with Binary Numbers of 1 to 8 Bits
Binary numbers with less than 8 bits can be considered 8-bit by prefixing them with zeros. For example, 11010 becomes 00011010.
Exercise:
Question: Convert the binary number 00101011 to a denary number using the table method.
Answer: 32 + 8 + 2 + 1 = 43.