# Converting from Denary to Binary

## Understanding Denary

• Denary, also known as the decimal system or base-10, is a system based on 10 and comprised of numbers 0 to 9.
• It is the number system most commonly used by humans in everyday life.
• When we refer to converting from denary, we are referring to converting from this standard decimal system to another, such as binary.

## Process of Converting Denary to Binary

• To convert a denary number to binary, start by finding the largest power of 2 that fits into that number. This will be the left-most digit in the binary representation.
• If the power of 2 fits, place a 1 under that power. If it does not, place a 0. This becomes your binary digit for that position.
• Subtract the value of the power of 2 from the denary number if you placed a 1 for that power.
• Move to the next highest power of 2 (proceeding rightward) and repeat the process, carrying on until you reach 2^0.
• Your binary number is the sequence of 1’s and 0’s (bits) you have recorded.

## Example of Conversion

• For example: to convert the denary number 13 to binary, the process would look like this:
• The largest power of 2 that fits in 13 is 2^3 = 8, so place a 1 under this and subtract 8 from 13 to give 5.
• The largest power of 2 that fits in 5 is 2^2 = 4, so place a 1 under this and subtract 4 from 5 to give 1.
• Now the largest power of 2 that fits in 1 is 2^0 = 1, so place a 1 under this and subtract 1 from 1 to give 0.
• Therefore, the binary equivalent of the denary number 13 is 1101 (reading from the highest power of 2 down).

## Double-checking Your Work

• It can be helpful to double-check your work by reverting your newly converted binary number back to its denary form. This is done by adding up all the 2^n values where n is the position of each 1 in the binary number (starting at position 0 from the right-most bit).
• If the converted value matches the original denary value, your binary conversion is correct.