You're viewing a comment by vik korneev and its responses.

June 30, 2009, 20:18

Nice and very useful tips. I have another one to add to your collection :) Sometimes ago I have learned how to convert binary to decimal in mind very easily. You only need to remember first 8 numbers:
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7

Then, you need to know that shifting to left by one digit multiplies the number by 2:
1010b = 101b x 10b = 5 x 2 = 10d
10100b = 101b x 100b = 5 x 8 = 40
So, when you see something like 101011, you can process it this way:
101000b + 11b = 5 * 8 + 3 = 43
1110101 = 7 * 16 + 5 = 117
and so on.

It's easier than it looks at first glance :)

Comment Responses

Bolutife Ogunsola Permalink
October 22, 2010, 12:52

I like this hack... I discovered it independently too during an exam during my last semester... The course was on digital logic design. We were given a very long binary number (more than 12 digits) and the use of calculators weren't permitted. While most people used the traditional method (place value), I used bit shifting thanks to my programming background :-)

Mickey Permalink
July 24, 2012, 14:34

Your second example (the one ending with = 40) is wrong, it equals 20 (5 x 4)

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "cdrom_143": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.