Denary to Binary
Convert denary to binary:
Reminder of column headings / place values for the binary number system: 128 64 32 16 8 4 2 1
Convert the denary number 83 to binary:
128 64 32 16 8 4 2 1
1 0 1 0 0 1 1 64 + 16 + 2 + 1 = 83
The binary number system uses column headings of 1, 2, 4, 8, 16, 32, 64, 128..., multiplying by 2 each time as the number system is base 2.
Whereas the denary number system, what we use normally, uses column headings of 1, 10, 100, 1000, 10000..., multiplying by 10 each time as the number system is base 10.
Example
To convert a denary number into binary, work from the right-hand end of the place values placing a 1 in any columns that are needed to make up the original number.
Place values / column headings = 128 64 32 16 8 4 2 1
Convert 45 to binary:
128and64are not need to make45. We can write a0underneath those 2 column headings.128 64 32 16 8 4 2 1 0 032goes into45, therefore we write1underneath32.
45 - 32 = 13remaining128 64 32 16 8 4 2 1 0 0 116does not go into13. We can write a0underneath that column heading.128 64 32 16 8 4 2 1 0 0 1 08goes into13, therefore we write1underneath8.
13 - 8 = 5remaining128 64 32 16 8 4 2 1 0 0 1 0 14goes into5, therefore we write1underneath4.
5 - 4 = 1remaining128 64 32 16 8 4 2 1 0 0 1 0 1 12does not go into1. We can write a0underneath that column heading.128 64 32 16 8 4 2 1 0 0 1 0 1 1 01goes into1, therefore we write1underneath1.
1 - 1 = 0finished!
Final answer is128 64 32 16 8 4 2 1 0 0 1 0 1 1 0 100101101, written as a byte. The two leading zeros are not required, unless you are asked to give your answer in 8 bits / a byte.
References:
- BBC Bitesize GCSE: AQA, OCR, Edexcel
- YouTube - How To Convert Decimal to Binary (TheOrganicChemistryTutor)