Hexadecimal

Hexadecimal (base 16) writes the values 0-15 as single digits: 0-9, then a-f. Can you spot the relationship between binary (base 2), octal (base 8) and hexadecimal (base 16)?

BinaryOctalDecimalHexadecimalBase64
0000A
1111B
10222C
11333D
100444E
101555F
110666G
111777H
10001088I
10011199J
10101210AK
10111311BL
11001412CM
11011513DN
11101614EO
11111715FP
10000201610Q
10001211711R
10010221812S
10011231913T
10100242014U
10101252115V
10110262216W
10111272317X
11000302418Y
11001312519Z
1101032261Aa
1101133271Bb
1110034281Cc
1110135291Dd
1111036301Ee
1111137311Ff
100000403220g
……………

One hexadecimal digit is 4 bits, so 2 digits = 8 bits = 1 byte. That makes hex convenient for looking at raw memory and addresses. You’ve probably seen it in hexdumps. Here’s a hexdump of the first 256 bytes of this site’s favicon.ico (a WEBP in disguise):

00000000: 5249 4646 e603 0000 5745 4250 5650 384c  RIFF....WEBPVP8L
00000010: d903 0000 2f17 c005 1035 c9cd b66d 9514  ..../....5...m..
00000020: 3b3e 6e6b e38b bbbb bb13 4903 9aba 3b64  ;>nk......I...;d
00000030: 50c5 9291 6944 e47e e697 7366 a6a1 b516  P...iD.~..sf....
00000040: fe90 026c 8a40 23ba d036 b8c8 c9dc b36d  ...l.@#..6.....m
00000050: 002d 6773 3252 3bd9 5a46 037a aad8 1ac8  .-gs2R;.ZF.z....
00000060: 2842 27c3 a229 614a d874 236a d026 f622  (B'..)aJ.t#j.&."
00000070: dd22 b856 aa98 0492 6dbb 6d9b 0f8b 944f  .".V....m.m....O
00000080: 7aef 7d56 a7d9 ff34 1be9 c576 e443 fc43  z.}V...4...v.C.C
00000090: 1380 20d9 b6db b601 a40f 0120 e9a6 92e2  .. ........ ....
000000a0: 3eca fe47 d943 7690 7d34 c945 50ff 2780  >..G.Cv.}4.EP.'.
000000b0: 640f 6c01 ab59 14f7 39fc 641f 95e4 1658  d.l..Y..9.d....X
000000c0: 6c61 609d 9045 0102 1560 b244 06d6 880e  la`..E...`.D....
000000d0: 5135 47b0 8da2 85f5 96bc b7cb fa99 aa05  Q5G.............
000000e0: 0592 2a74 4065 a0fa c8b7 6c72 00db 0dda  ..*t@e....lr....
000000f0: 3323 cff5 1e7f ec77 bf9e d3a7 9f81 2d80  3#.....w......-.

Readable ASCII runs from 0x20 (space) to 0x7E (~); 0x7F is DEL, a control character.