Hexadecimal
hexadecimal
Hexadecimal representation consists of 16 base values:
# available values [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F] # A-F (value from 10 to 15) A = 10 F = 15
Since 16 equals 2^4 (4-bits), one hexadecimal also represents 4-bits.
Since byte is 8-bits, you can represent a byte with two hexadecimal digits (4-bits x 2) (base of 16 per digit):
00 01 3D 00 40 28 E6 66
This is ranging between:
- 0(- 0000binary,- 0decimal)
- F(- 1111binary,- 15decimal):
This makes 7f the last value of ASCII (127 bit) in hexadecimal.
ff (maximum two digit hexadecimal) is 255 in decimal and 11111111 in binary.
Why does it exist
Hexadecimal is more "human readable" than binary number.