Home Tools Blog About

Number Bases Table (Binary, Octal, Hex, Decimal)

A number base, or radix, is how many digits a system uses to write numbers. Decimal (base 10) uses 0 to 9; binary (base 2) uses 0 and 1; octal (base 8) uses 0 to 7; and hexadecimal (base 16) uses 0 to 9 then A to F. Computers work in binary, so binary, octal, and hex appear everywhere in programming. This table converts every value from 0 to 255 across all four bases.

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

Frequently Asked Questions

Why do computers use binary?

Hardware stores information as on/off states, which map naturally to the two binary digits 0 and 1.

Why use hexadecimal instead of binary?

Hex is much shorter and each hex digit equals four binary digits, so it is easier to read and write while still mapping cleanly to binary.

How do I read an 8-bit binary number?

Each position is a power of two, from 128 on the left down to 1 on the right. Add the positions that show a 1 to get the decimal value.

What is the range of one byte?

One byte is 8 bits, which holds 256 values, from 0 to 255 in decimal or 00 to FF in hexadecimal.

Convert your own values with our free base converters, or see the ASCII table for character codes.

ATV

Written by Nick (ATV Team)

We build and maintain the 600+ free, client-side tools on this site, and every guide is written against the tools themselves: each figure is computed and checked before it is published, and every linked tool is tested in the browser. More about how we work on the about page, and the full library of guides lives on the blog.