Pages: 1 [2]   Go Down
Author Topic: can you read or write 8 bits at once?  (Read 1589 times)
0 Members and 1 Guest are viewing this topic.
Leeds, UK
Offline Offline
Edison Member
*
Karma: 80
Posts: 1726
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree, once you get used to hex there is little need for binary.

For those that don't know, here is a little tip for Binary to hex conversion:

Take a binary number (works for any number of bits, but lets choose 13 to demonstrate):
Code:
0b1101101101010

Split it into groups of four bits starting from right to left
Code:
   1   1011   0110   1010

If there arent a multiple of four bits, then pad with zeros until there are (now you see why I chose 13)
Code:
0001   1011   0110   1010

Now convert each group into decimal [base 10] (you can skip this step when you get used to it)
Code:
 1      11      6     10

Now convert each group into hex [base 16]
Code:
 1       B      6     A

Finally, stick it back together, and you have your hexadecimal number:
Code:
0x1B6A
« Last Edit: January 01, 2013, 03:43:23 pm by Tom Carpenter » Logged

~Tom~

Pages: 1 [2]   Go Up
Jump to: