Binary is the most basic language of computers. Everything, from simple text to full-length movies can be exepressed using binary. Computers use binary because it is a base 2 numbering system, in which each digit value has a value of one or zero. Thanks to the invention of the transistor, computers can represent binary numbers at an electronics level. Simple operations are implemented on the CPU and use binary values to compute.
Binary numbers are long, though. You need at least eight binary digits to represent a single character. This is where hexadecimal is useful, as it can represent an eight-digit binary number (more commonly referred to as a byte) using a two-digit hexadecimal number.
The process of converting from binary to hexadecimal using grouping is fairly simple. Each group of four binary digits corresponds to a single hexadecimal digit.
Converting 1011110102
to hexadecimal:
1011110102 = 0001011110102
10102 = A16
01112 = 716
00012 = 116
Thus, 1011110102 = 17A16
Binary | Hex | Binary | Hex | |
---|---|---|---|---|
0000 | 0 | 1000 | 8 | |
0001 | 1 | 1001 | 9 | |
0010 | 2 | 1010 | A | |
0011 | 3 | 1011 | B | |
0100 | 4 | 1100 | C | |
0101 | 5 | 1101 | D | |
0110 | 6 | 1110 | E | |
0111 | 7 | 1111 | F |