Converting a Decimal Number to Binary: A Step-by-Step Guide
Converting a decimal number to binary may seem daunting at first, but it can be broken down into a simple, straightforward process. Let's begin with an example!
Here, we will walk through some steps to convert the decimal number 172
to binary using division and recording the remainders. Follow along closely, and you will have your decimal converted to binary in no time! Afterwards, we'll explain what the intuition is behind why this works.
Step 1: Write down the decimal number you wish to convert.
For this example, we will be converting 172
to binary. So let's write down:
172
Step 2: Divide the decimal number by 2
.
172 / 2 = 86
Step 3: Record the remainder from Step 2 on the right hand side.
The remainder from dividing 172
by 2
is 0
. Let's record this:
172 0
Step 4: Take the result from Step 2, and divide it again by 2.
86 / 2 = 43
Step 5: Record the new remainder from Step 4 on the right hand side, above the previous remainder. The remainder from dividing 86 by 2 is 0. Let's record this:
- 172 0
- 86 0
Step 6: Repeat Steps 4 and 5, dividing the result from Step 4 by 2
, and recording the new remainder above, until the result of your division is 0.
Continuing...
- 43 / 2 = 21, remainder 1
- 21 / 2 = 10, remainder 1
- 10 / 2 = 5, remainder 0
- 5 / 2 = 2, remainder 1
- 2 / 2 = 1, remainder 0
- 1 / 2 = 0, remainder 1
So our work will look like:
1172 0
286 0
343 1
421 1
510 0
65 1
72 0
81 1
Step 7: The bottom remainder is the Most Significant Bit (MSB), and the top remainder is the Least Significant Bit (LSB).
Step 8: Read the remainders from bottom to top to get the binary representation of the original decimal number.
10101100
And there you have it - the decimal number 172
converted to binary is 10101100
using the division with remainder method. With practice, you'll be a decimal to binary conversion expert! Let us know if you need any clarification on the steps.
