#### What are binary and hexadecimal codes?

Many encryption systems will make use of binary and hexadecimal. This section provides a reference to help code breakers unfamiliar with these two systems.

The decimal number system, with which we are familiar, is based on counting in 10"s and makes use of ten digits: 0-9. For example,
3047 = 3×1000 + 0×100 + 4×10 + 7×1.

In a similar way, binary is based on counting in 2's and makes use of two digits: 0 and 1. For example,
110101=1×32 + 1×16 + 0×8 + 1×4 + 0×2 + 1×1 = 5310 (base 10).

Hexadecimal is based on counting in 16's, but in order to make use of 16 digits it uses 0-9 plus A (10), B (11), C (12), D (13), E (14) and F (15).
For example, 3D5 = 3×256 + 13×16 + 5×1 = 98110.

For reference, the following table lists the decimal/binary/hexadecimal equivalents of the numbers 1 through 255.

 Decimal Binary Hexadecimal Decimal Binary Hexadecimal 0 00000000 00 128 10000000 80 1 00000001 01 129 10000001 81 2 00000010 02 130 10000010 82 3 00000011 03 131 10000011 83 4 00000100 04 132 10000100 84 5 00000101 05 133 10000101 85 6 00000110 06 134 10000110 86 7 00000111 07 135 10000111 87 8 00001000 08 136 10001000 88 9 00001001 09 137 10001001 89 10 00001010 0A 138 10001010 8A 11 00001011 0B 139 10001011 8B 12 00001100 0C 140 10001100 8C 13 00001101 0D 141 10001101 8D 14 00001110 0E 142 10001110 8E 15 00001111 0F 143 10001111 8F 16 00010000 10 144 10010000 90 17 00010001 11 145 10010001 91 18 00010010 12 146 10010010 92 19 00010011 13 147 10010011 93 20 00010100 14 148 10010100 94 21 00010101 15 149 10010101 95 22 00010110 16 150 10010110 96 23 00010111 17 151 10010111 97 24 00011000 18 152 10011000 98 25 00011001 19 153 10011001 99 26 00011010 1A 154 10011010 9A 27 00011011 1B 155 10011011 9B 28 00011100 1C 156 10011100 9C 29 00011101 1D 157 10011101 9D 30 00011110 1E 158 10011110 9E 31 00011111 1F 159 10011111 9F 32 00100000 20 160 10100000 A0 33 00100001 21 161 10100001 A1 34 00100010 22 162 10100010 A2 35 00100011 23 163 10100011 A3 36 00100100 24 164 10100100 A4 37 00100101 25 165 10100101 A5 38 00100110 26 166 10100110 A6 39 00100111 27 167 10100111 A7 40 00101000 28 168 10101000 A8 41 00101001 29 169 10101001 A9 42 00101010 2A 170 10101010 AA 43 00101011 2B 171 10101011 AB 44 00101100 2C 172 10101100 AC 45 00101101 2D 173 10101101 AD 46 00101110 2E 174 10101110 AE 47 00101111 2F 175 10101111 AF 48 00110000 30 176 10110000 B0 49 00110001 31 177 10110001 B1 50 00110010 32 178 10110010 B2 51 00110011 33 179 10110011 B3 52 00110100 34 180 10110100 B4 53 00110101 35 181 10110101 B5 54 00110110 36 182 10110110 B6 55 00110111 37 183 10110111 B7 56 00111000 38 184 10111000 B8 57 00111001 39 185 10111001 B9 58 00111010 3A 186 10111010 BA 59 00111011 3B 187 10111011 BB 60 00111100 3C 188 10111100 BC 61 00111101 3D 189 10111101 BD 62 00111110 3E 190 10111110 BE 63 00111111 3F 191 10111111 BF 64 01000000 40 192 11000000 C0 65 01000001 41 193 11000001 C1 66 01000010 42 194 11000010 C2 67 01000011 43 195 11000011 C3 68 01000100 44 196 11000100 C4 69 01000101 45 197 11000101 C5 70 01000110 46 198 11000110 C6 71 01000111 47 199 11000111 C7 72 01001000 48 200 11001000 C8 73 01001001 49 201 11001001 C9 74 01001010 4A 202 11001010 CA 75 01001011 4B 203 11001011 CB 76 01001100 4C 204 11001100 CC 77 01001101 4D 205 11001101 CD 78 01001110 4E 206 11001110 CE 79 01001111 4F 207 11001111 CF 80 01010000 50 208 11010000 D0 81 01010001 51 209 11010001 D1 82 01010010 52 210 11010010 D2 83 01010011 53 211 11010011 D3 84 01010100 54 212 11010100 D4 85 01010101 55 213 11010101 D5 86 01010110 56 214 11010110 D6 87 01010111 57 215 11010111 D7 88 01011000 58 216 11011000 D8 89 01011001 59 217 11011001 D9 90 01011010 5A 218 11011010 DA 91 01011011 5B 219 11011011 DB 92 01011100 5C 220 11011100 DC 93 01011101 5D 221 11011101 DD 94 01011110 5E 222 11011110 DE 95 01011111 5F 223 11011111 DF 96 01100000 60 224 11100000 E0 97 01100001 61 225 11100001 E1 98 01100010 62 226 11100010 E2 99 01100011 63 227 11100011 E3 100 01100100 64 228 11100100 E4 101 01100101 65 229 11100101 E5 102 01100110 66 230 11100110 E6 103 01100111 67 231 11100111 E7 104 01101000 68 232 11101000 E8 105 01101001 69 233 11101001 E9 106 01101010 6A 234 11101010 EA 107 01101011 6B 235 11101011 EB 108 01101100 6C 236 11101100 EC 109 01101101 6D 237 11101101 ED 110 01101110 6E 238 11101110 EE 111 01101111 6F 239 11101111 EF 112 01110000 70 240 11110000 F0 113 01110001 71 241 11110001 F1 114 01110010 72 242 11110010 F2 115 01110011 73 243 11110011 F3 116 01110100 74 244 11110100 F4 117 01110101 75 245 11110101 F5 118 01110110 76 246 11110110 F6 119 01110111 77 247 11110111 F7 120 01111000 78 248 11111000 F8 121 01111001 79 249 11111001 F9 122 01111010 7A 250 11111010 FA 123 01111011 7B 251 11111011 FB 124 01111100 7C 252 11111100 FC 125 01111101 7D 253 11111101 FD 126 01111110 7E 254 11111110 FE 127 01111111 7F 255 11111111 FF