how to convert binary to decimal in your mind very easily
You only need to remember 2 things:
(1) the first 8 numbers:
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7
(2) shifting to left by one digit multiplies the number by 2 (10b):
1010 = 101 x 10 = 5 x 2 = 10
10100 = 101 x 100 = 5 x 4 = 20
101000 = 101 x 1000 = 5 x 8 = 40
When you see something like 101011, you can process it this way:
101011 = 101000 + 11 = 5 * 8 + 3 = 43
1110101 = 7 * 16 + 5 = 117
and so on.
It is easier than it looks at first glance :)
source: vik korneev at http://catonmat.net/blog/low-level-bit-hacks-you-absolutely-must-know/
most viewed
-
to play more seriously with yet another distro, i needed to install it. so i had some fun resizing/moving partitions around to clear some fr...
-
I have just discovered zram [2] :) woohoo... and what a thing that is! I was so sold on tmpfs , that I used it for everything I possibly ...
-
you won't see many docs about minimal netinstall slackware. indeed, you will see many experts saying there is no such thing. and your on...
-
debian kernels contain everything needed by everyone. customising your kernel is easy and highly recommended. i recommend using the same ker...
-
I decided to have another go at runit , this time on my gentoo . I had been thinking about this, since I noticed this on
-
this idea has been knocking around in my head for a while. i want to document it, while it is still there and to flush it out later.. i us...
-
vision: portable internet router, to carry on my travels, or use at home. openwrt on a portable (thin-client/netbook) device. internet sour...
-
ref: http://wiki.gentoo.org/wiki/portage Gentoo is Portage. Portage is Gentoo. Getting portage settings right is vitally important. It...
-
I have no sound, on my recent gentoo install. LXQT Mixer wouldn't open. I don't even get any error/warning messages. This is not ...
-
The leanest cleanest way to connect to wpa/2 networks is wpa_supplicant . Optional wpa_gui provides a GUI and System Tray icon, if need be...
No comments:
Post a Comment