View Single Post
Old 30th August 2013, 06:36 AM   #1
Miksy91
Gotta fill something here.
 
Miksy91's Avatar
 
Join Date: Jul 2013
Location: Northern Europe
Age: 27
Posts: 117
Miksy91
Default Simple Hex <--> Binary conversions

I happened to reply to a certain person in PC how conversions between hexadecimal and binary number systems work, so I thought I might as well copy the information here. It's pretty simple really.


Every hexadecimal digit (0, 1, 2, ..., D, E, F) is described in binary with 4 bits.

Code:
binary = hex (dec)
---------------------
0000 = 0
0001 = 1
0010 = 2
0011 = 3
0100 = 4
0101 = 5
0110 = 6
0111 = 7
1000 = 8
1001 = 9
1010 = A (10)
1011 = B (11)
1100 = C (12)
1101 = D (13)
1110 = E (14)
1111 = F (15)
Now if we for example wanted to describe the hexadecimal number 6B in binary, that would be:

Code:
binary = hex (dec)
---------------------
0000 = 0
0001 = 1
0010 = 2
0011 = 3
0100 = 4
0101 = 5
0110 = 6
0111 = 7
1000 = 8
1001 = 9
1010 = A (10)
1011 = B (11)
1100 = C (12)
1101 = D (13)
1110 = E (14)
1111 = F (15)
0110 1011
__________________
Miksy91 is offline  
Likes mewthree9000, Elsa, karatekid552 liked this post
Sponsored Links