How do I convert denary to 4 digit binary?
To convert denary (sometimes referred to as decimal) to binary we simply use a table like the one below:8 | 4 | 2 | 1 |
---|---|---|---|
_ | _ | _ | _ |
The numbers on the top row always stay the same. Starting from the highest number on the left we try to subtract the number on the top row from our denary number. If we can subtract without going negative we put a 1 in that column. If subtraction would leave a negative number we write a 0 in that column. We carry the remainder from subtraction over to the next row and repeat.
Example
Convert the number 11 into binary.First we put our denary number above the left hand top row number.
11 | _ | _ | _ |
---|---|---|---|
8 | 4 | 2 | 1 |
_ | _ | _ | _ |
We can subtract 8 from 11 without leaving a negative number so we put a 1 below the 8 and the remainder from our subtraction of 11 – 8 which is 3 goes to the top of the next column.
11 | 3 | _ | _ |
---|---|---|---|
8 | 4 | 2 | 1 |
1 | _ | _ | _ |
We do the same for our second column. We cannot subtract 4 from 3 as it would leave a negative number so we write a 0 in the row below the 4 and carry our remainder of 3 over to the next column.
11 | 3 | 3 | _ |
---|---|---|---|
8 | 4 | 2 | 1 |
1 | 0 | _ | _ |
We can subtract 2 from 3 so we put a 1 in the row below the 2 and carry our remainder of 1 over to the top of the 1 column
11 | 3 | 3 | 1 |
---|---|---|---|
8 | 4 | 2 | 1 |
1 | 0 | 1 | _ |
We can take 1 away from 1 without leaving a negative value so we put a 1 in the row below the 1 to complete our conversion. By the last column we should have 0 left. Keep in mind that 4 digit binary will only cover denary numbers up to 15. Any larger numbers (up to 255) will need to be calculated using an 8 bit grid.
11 in binary is 1011
11 | 3 | 3 | 1 |
---|---|---|---|
8 | 4 | 2 | 1 |
1 | 0 | 1 | 1 |
Convert the following denary (decimal) number into its 8 digit binary equivalent:
Enter your answer: