Binary to decimals ?

Anyone know of a easy way of converting Binary to decimals ? One I can remember on a test.

I’ve always just memorised the powers of two…
1 2p0
2 " p1
4 " p2
8 " p3
16 " p4
32 " p5
64 " p6
128 " p7
256 " p8
… …

nick

If you run windows, put the calculator in scientific mode, then you can use it to convert binary to decimal (or hex, if you like :wink: )

indeed just write down the powers of two on your paper:



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

Thus
10000001
would be 129

The other way around (decimal to binary) can be done in the same way,…

hexidecimal is a bit harder and when going from decimal -> hexidecimal going to binary first is always a nice method

i do it all mentally, by dividing by the highest power of two that gives a number larger than one, and the repeating this. The most important thing is to memorise the first few powers of 2…

d52477001

Ok, the powers of 2, now how are they applied to decimals ? Can someone give me an example of writing out this problem ?

Well, if you add together any combination of powers of 2 then you can make any number – let me explain by example.

1 - 1
2 - 10
4 - 100
8 - 1000
16 - 10000

and so on. You then need to add together the numbers that correspond to the '1’s in the number. So to find the number 10010, it would be 16 for the first 1, and 2 for the second 1. Add them together and you get 18 – your answer.

Well, I try the power of 2’s and I’m one off, unless I miss understood, it was 0100100. I couldn’t use 1 because there’s no 1 in the first one, the second is 2-10 and the next one would be 16-10000 ? Added 2 and 16 gave me 18, but the answer was a 100.

that would mean:


64 32 16 8 4 2 1
  1  1  0 0 1 0 0
  
64 + 32 + 4 = 100

Timothy

Ohhhhh, it’s from right to left, I’ll try it out again soon.

Ok, just took the pratice exam and it worked, well sort of, I didn’t came up with the right answer on the first set, it was off by 2, can someone double check ?

It’s converting decimals to binary, the number is 224.254.101.13

The answer is 11100000.11111110.01100101.00001101

When I did the first row I came up with 32+64+128=222

well bianry actually has

0, 1, 2

so really you are all wrong.

coz

1=0 2=1 4=2
8=21

ha ha ha ha i’m just screwing with you guys, but seriously they will bring in trinary some day, storage is already using multiple colours e.g. 1 pixel holds so much info its funny, and cd type things will be using that kinda thing soon

So you are wrong, no?

Just learn to do it in your head. Download a binary clock for your PC and make yourself learn how to read it without much hesitation. Also, learning a bunch of networking helps, such as calculating subnets and such.

t’s converting decimals to binary, the number is 224.254.101.13

The answer is 11100000.11111110.01100101.00001101

When I did the first row I came up with 32+64+128=222

its decimal adition you need to review - not binary conversion :wink:
indeed 32+64+128 is correct and the answer is 224, not 222.
so forget about binary conversion (you’ve got that part down) and work on your addition skills.
:smiley:

You right it is 224, my goof, great tip everyone thanks.

mabey storage devises will stray from binary i here talks of holographic harddrives soon. but prossesers are gonna be binary for a long time because well… thats there nature the just a bunch of swiches… a big bunch.

what the hell is the advantage of a holografic hard drive ? Can’t they just make the tracks simerler to an optical ?

And yes, there are experiment with analog cpu, street price will be around 6 USD, works like a light bulb almost.

There could be several advantages, some quite obvious and some theoretical. Just from the concept of holograms, you could obviously gain much greater capacity because you wouldn’t be working with regular units/area but rather in a sort of multi-dimensional factor. You have to remember that optical is not much different in theory than magnetic, both store and read with electromagnetic energy, it’s the engineering that make them different.

Another possible advantage, if I’m thinking correctly, could be in the addressing and fault tolerance of the device. In a normal hard drive, the head basically has to chase down the needed area in storage. The speed is greatly dependent on spindle speed and cache, which increases power consumption and heat. When I worked with the Linux clustering, we would design in dimensions to decrease latency and increase reliability. Not sure if the concept makes much sense, but it’s easy to see mathematically.

What would the advantage of an analog processor like a light-bulb even be? You sure you’re not reffering to the quantom-processors?

I thought you hate me, the advantage of a analog CPU ? I don’t know, something I heard on TV. Would anyone know the advantage ?