0 like 0 dislike
23 views
How do I convert a number from decimal to binary?
| 23 views

0 like 0 dislike

Converting a decimal number to binary involves a process of dividing by 2 and keeping track of the remainders. Here's a step-by-step guide:

2. Divide the number by 2.
3. Record the remainder.
4. Divide the quotient from the previous step by 2.
5. Again, record the remainder.
6. Repeat steps 4 and 5 until you reach a quotient of zero.
7. The binary equivalent is the string of remainders, read from the bottom up (i.e., the remainder from the last division is the most significant bit).

Let's take the decimal number 10 as an example:

2. 10 divided by 2 is 5. The remainder is 0.
3. 5 divided by 2 is 2. The remainder is 1.
4. 2 divided by 2 is 1. The remainder is 0.
5. 1 divided by 2 is 0. The remainder is 1.
6. Now that we've reached a quotient of zero, we stop.
7. Reading the remainders from the bottom up, we get 1010. So, the binary equivalent of the decimal number 10 is 1010.
by Platinum (93,243 points)

2 like 0 dislike
0 like 0 dislike
1 like 0 dislike
0 like 0 dislike
0 like 0 dislike
1 like 1 dislike
1 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
1 like 0 dislike
0 like 0 dislike
0 like 0 dislike