Lesson: Binary conversion n back again

Ok today in class we learned how to take a number and make it binary, no big, but to take a random binary and make it back to a number....whoa...

This i can do:

85 to binary:

\ = divide

85 \ 2 = 42.5 1

42 \ 2 = 21 0

21 \ 2 = 10.5 1

10 \ 2 = 5 0

5 \ 2 = 2.5 1

2 \ 2 = 1 1

1 \ 2 = 1 1

So 85 in binary is 1110101

but to take say 101011010(random) and make it a regular number, i'm lost, any help?

Re: Lesson: Binary conversion n back again

Quote:

*Originally posted by Ride -or- Die *

but to take say 101011010(random) and make it a regular number, i'm lost, any help? [/B]

Let's do this one. First draw our number chart.

1024 512 256 128 64 32 16 8 4 2 1

Then starting from the right draw your binary numbers underneath it putting a 1 or a 0 under each number starting at the 1.

1024--512--256--128--64--32--16--8--4--2--1

-------------1----0----1---0---1---1--0--1--0

then just add up all the numbers that have a 1 under them.

256 + 64 +16 + 8 + 2 = 346