Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: √ ∞ ≠ ≤ ≥ ≈ ⇒ ∈ Δ θ ∴ ∑ ∫ π -

Login

Username

Password

Not registered yet?

Post a reply

Go back

Write your message and submit
:) :| :( :D :o ;) :/ :P :lol: :mad: :rolleyes: :cool: | :dizzy :eek :kiss :roflol :rolleyes :shame :down :up :touched :sleep :wave :swear :tongue :what :faint :dunno
Options

Go back

Topic review (newest first)

bobbym
2013-08-29 18:49:53

Hi all;

Or as the Russian do?!

To change 530 to binary.

Make this grid:



The first column was created by dividing 530 by 2 and if there was a remainder ignoring it. The second column was created by the rule if the number next to it is even put a 0, if odd, put a 1.

Now start from the bottom

530 decimal = 1000010010 binary.

Lets do another one.



11571 decimal = 10110100110011 binary

bob bundy
2013-08-29 18:12:27

hi Amartyanil

If I have to do this by hand, here's the method I'd use for any number base.

Step 1. work out the column headings for that base.

Step 2.  Starting with the biggest of these, subtract as many times as possible, then

Step 3, 4 etc   continue with the lower powers until I'm down to units.

eg.  Change 1123 into base 8

Step 1 the headings are 1, 8, 64, 512, ....  I can see by inspection that 512 is as high as I'll need to go.

Step 2.  1123 - 2*512 = 99  so the number in the '512' column will be 2

Step 3.  99 - 1*64 = 35 so the number in the '64' column will be 1

Step 4.  35 - 4*8 = 3 so the number in the '8' column will be 4

Step 5.  As my remainder is now less than 8 the number in the 'units' column will be 3

Final answer 1123 in base 10 is 2143 in base 8

Screen shot below shows the steps more neatly and how I checked that I'd got it right.

And here's a quick way to change that to binary.

In binary the first three columns are 4, 2 and 1

So you can change each octal digit into a 3 digit binary number thus

2143 becomes 010  001  100   011 and there's the binary version.

check 1 + 2 + 32 + 64 + 1024 = 1123

Bob

bobbym
2013-08-29 17:21:54

The way I do it is by making a little table of powers of 2.

2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64
2^7 = 128

Now supposing we want to change 105 from binary to decimal. We get the closest power of 2 that is smaller or equal. We see in the above chart that it is 2^6 = 64. So put a 1 and subtract 105 - 64 = 41.

Now just go down the line does 2^5 fit in 41? Yes it does  so add a 1 next to that 1.

11 and say 41 - 32 = 9

2^4 is larger than 9 so put a 0 next to that 1.

110

2^3 is smaller than 9 so put a 1

1101 and say 9 - 8 = 1

2^2 is larger than 1 so put a 0

11010

2^1 is smaller than 1 so put a 0

110100

2^0 is exactly equal to 1 so put a 1

1101001 and say 1 - 1 = 0

We are done.

105 = 1101001 in binary

Amartyanil
2013-08-29 14:17:51

Hi bobbym;

First tell it by hand; then a calculator

bobbym
2013-08-25 23:14:13

Hi;

Maybe for very small numbers but everything is easier when you have a little computing power.

anonimnystefy
2013-08-25 21:56:05

You don't need a calculator for that.

bobbym
2013-08-25 18:02:38

Not even a calculator?

Amartyanil
2013-08-25 16:24:25

Hi bobbym;

By hand

bobbym
2013-08-23 22:58:17

Hi Amartyanil;

By hand or by computer?

Amartyanil
2013-08-23 22:30:47

Hi;

How to convert:
I. Decimal to Binary
2. Decimal to Octal
3. Decimal to Hexadecimal

Board footer

Powered by FluxBB