Question:
how we find the binary of a number with calculations??? For example 534 in binary??
papaele_eeee
2006-01-08 11:28:04 UTC
how we find the binary of a number with calculations??? For example 534 in binary??
Four answers:
nate
2006-01-08 14:30:55 UTC
rt11guru said it. here's another easy way. write down the powers of two in *descending* order, starting with the one that is next smallest after your number. for instance, the power of 2 that comes after 534 is 512 or 2^9. so you write down this list of numbers:



512 | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1



then go through and find the largest of these powers of 2 that is less than your number. in this case, that is 512. put a 1 underneath 512:



512 | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1

1



now subtract that power of 2 from the number you started with. 534-512 = 24. repeat the process. find the largest power of 2 that is less than 24, which is 16. put a 1 under that number:



512 | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1

1 | | | | | 1 | | | |



now subtract that power of 2 from your number. 24-16 = 8. keep doing this until you've reached zero. in this case it only requires one more step, because 8 - 8 = 0. your table at the end should look like this:



512 | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1

1 | | | | | 1 | 1 | | |



now, everywhere that is missing a 1, fill in a 0.





512 | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1

1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0



that sequence is your binary number. in the case of 534, it is 1000011000.



(sorry, this looks terrible. can't format it properly in this yahoo window. but, each one of those | in the bottom rows should line up with the | in the top row.)
rt11guru
2006-01-08 20:36:16 UTC
If you have to actually do the calculation, without using a calculator, here is the method.



Take then number and divide by 2. Write down the remainder. That is your rightmost digit.

Take the quotient, divide that by two. The remainder is your next digit. Repeat until you are done.



Example: Convert 21 to binary.

Divide 21 by 2. You get 10, remainder 1. 1 is 1st digit

Divide 10 by 2. You get 5, remainder 0. 0 is next digit

Divide 5 by 2. You get 2 remainder 1. 1 is your next digit

Divide 2 by 2. You get 1 remainder 0. 0 is your next digit

Divide 1 by 2. You get 0 remainder 1. 1 is your last digit.



So 21 in binary is 10101.





For large numbers, it's faster to convert them to hexadecimal and then substitute. The process is the same, except you divide by 16, save the remainder and repeat. When you are done, substitute the 4 binary digits for each hex digit.



(hex)1 = 0001

(hex)2 = 0010

(hex)3 = 0011

(hex)4 = 0100

.

.

.

(hex)F = 1111
Sleazy
2006-01-08 19:53:47 UTC
Use the calculator that came with Windows.



Type in the number you want, then click on the "Bin" radio button on the upper left side.



You should have "Hex" "Dec" "Oct" "Bin".

"Dec" is decimal, "Bin" is binary.
nate08377
2006-01-08 19:47:41 UTC
this website should do the trick


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...