Binary, Decimal, Hexadecimal and Octal Converter with Step-by-Step Solution
Conversion to All Common Bases
About Number Base Conversion
Convert from/to decimal, hexadecimal, octal, and binary. Decimal Base Conversion Calculator. Here you can find the answer to questions like Convert 10 decimal to binary or Decimal to binary conversion.
How to Convert Between Number Bases
Binary to Decimal
To convert binary to decimal, multiply each digit by 2 raised to its position power (starting from 0 on the right), then sum all the results.
Example: 10102 = 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 = 8 + 0 + 2 + 0 = 1010
Decimal to Binary
To convert decimal to binary, repeatedly divide by 2 and record the remainders. Read the remainders from bottom to top.
Example: 10 / 2 = 5 (remainder 0), 5 / 2 = 2 (remainder 1), 2 / 2 = 1 (remainder 0), 1 / 2 = 0 (remainder 1). Reading remainders bottom-to-top: 10102
Decimal to Hexadecimal
Divide by 16 repeatedly and record remainders (0-9 and A-F for 10-15).
Hexadecimal to Decimal
Multiply each digit by 16 raised to its position power, then sum all results.
Decimal, Binary, Hexa and Octal Chart Table
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 2 | 2 | 10 |
| 3 | 3 | 3 | 11 |
| 4 | 4 | 4 | 100 |
| 5 | 5 | 5 | 101 |
| 6 | 6 | 6 | 110 |
| 7 | 7 | 7 | 111 |
| 8 | 8 | 10 | 1000 |
| 9 | 9 | 11 | 1001 |
| 10 | A | 12 | 1010 |
| 11 | B | 13 | 1011 |
| 12 | C | 14 | 1100 |
| 13 | D | 15 | 1101 |
| 14 | E | 16 | 1110 |
| 15 | F | 17 | 1111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 16 | 10 | 20 | 10000 |
| 17 | 11 | 21 | 10001 |
| 18 | 12 | 22 | 10010 |
| 19 | 13 | 23 | 10011 |
| 20 | 14 | 24 | 10100 |
| 21 | 15 | 25 | 10101 |
| 22 | 16 | 26 | 10110 |
| 23 | 17 | 27 | 10111 |
| 24 | 18 | 30 | 11000 |
| 25 | 19 | 31 | 11001 |
| 26 | 1A | 32 | 11010 |
| 27 | 1B | 33 | 11011 |
| 28 | 1C | 34 | 11100 |
| 29 | 1D | 35 | 11101 |
| 30 | 1E | 36 | 11110 |
| 31 | 1F | 37 | 11111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 32 | 20 | 40 | 100000 |
| 33 | 21 | 41 | 100001 |
| 34 | 22 | 42 | 100010 |
| 35 | 23 | 43 | 100011 |
| 36 | 24 | 44 | 100100 |
| 37 | 25 | 45 | 100101 |
| 38 | 26 | 46 | 100110 |
| 39 | 27 | 47 | 100111 |
| 40 | 28 | 50 | 101000 |
| 41 | 29 | 51 | 101001 |
| 42 | 2A | 52 | 101010 |
| 43 | 2B | 53 | 101011 |
| 44 | 2C | 54 | 101100 |
| 45 | 2D | 55 | 101101 |
| 46 | 2E | 56 | 101110 |
| 47 | 2F | 57 | 101111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 48 | 30 | 60 | 110000 |
| 49 | 31 | 61 | 110001 |
| 50 | 32 | 62 | 110010 |
| 51 | 33 | 63 | 110011 |
| 52 | 34 | 64 | 110100 |
| 53 | 35 | 65 | 110101 |
| 54 | 36 | 66 | 110110 |
| 55 | 37 | 67 | 110111 |
| 56 | 38 | 70 | 111000 |
| 57 | 39 | 71 | 111001 |
| 58 | 3A | 72 | 111010 |
| 59 | 3B | 73 | 111011 |
| 60 | 3C | 74 | 111100 |
| 61 | 3D | 75 | 111101 |
| 62 | 3E | 76 | 111110 |
| 63 | 3F | 77 | 111111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 64 | 40 | 100 | 1000000 |
| 65 | 41 | 101 | 1000001 |
| 66 | 42 | 102 | 1000010 |
| 67 | 43 | 103 | 1000011 |
| 68 | 44 | 104 | 1000100 |
| 69 | 45 | 105 | 1000101 |
| 70 | 46 | 106 | 1000110 |
| 71 | 47 | 107 | 1000111 |
| 72 | 48 | 110 | 1001000 |
| 73 | 49 | 111 | 1001001 |
| 74 | 4A | 112 | 1001010 |
| 75 | 4B | 113 | 1001011 |
| 76 | 4C | 114 | 1001100 |
| 77 | 4D | 115 | 1001101 |
| 78 | 4E | 116 | 1001110 |
| 79 | 4F | 117 | 1001111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 80 | 50 | 120 | 1010000 |
| 81 | 51 | 121 | 1010001 |
| 82 | 52 | 122 | 1010010 |
| 83 | 53 | 123 | 1010011 |
| 84 | 54 | 124 | 1010100 |
| 85 | 55 | 125 | 1010101 |
| 86 | 56 | 126 | 1010110 |
| 87 | 57 | 127 | 1010111 |
| 88 | 58 | 130 | 1011000 |
| 89 | 59 | 131 | 1011001 |
| 90 | 5A | 132 | 1011010 |
| 91 | 5B | 133 | 1011011 |
| 92 | 5C | 134 | 1011100 |
| 93 | 5D | 135 | 1011101 |
| 94 | 5E | 136 | 1011110 |
| 95 | 5F | 137 | 1011111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 96 | 60 | 140 | 1100000 |
| 97 | 61 | 141 | 1100001 |
| 98 | 62 | 142 | 1100010 |
| 99 | 63 | 143 | 1100011 |
| 100 | 64 | 144 | 1100100 |
| 101 | 65 | 145 | 1100101 |
| 102 | 66 | 146 | 1100110 |
| 103 | 67 | 147 | 1100111 |
| 104 | 68 | 150 | 1101000 |
| 105 | 69 | 151 | 1101001 |
| 106 | 6A | 152 | 1101010 |
| 107 | 6B | 153 | 1101011 |
| 108 | 6C | 154 | 1101100 |
| 109 | 6D | 155 | 1101101 |
| 110 | 6E | 156 | 1101110 |
| 111 | 6F | 157 | 1101111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 112 | 70 | 160 | 1110000 |
| 113 | 71 | 161 | 1110001 |
| 114 | 72 | 162 | 1110010 |
| 115 | 73 | 163 | 1110011 |
| 116 | 74 | 164 | 1110100 |
| 117 | 75 | 165 | 1110101 |
| 118 | 76 | 166 | 1110110 |
| 119 | 77 | 167 | 1110111 |
| 120 | 78 | 170 | 1111000 |
| 121 | 79 | 171 | 1111001 |
| 122 | 7A | 172 | 1111010 |
| 123 | 7B | 173 | 1111011 |
| 124 | 7C | 174 | 1111100 |
| 125 | 7D | 175 | 1111101 |
| 126 | 7E | 176 | 1111110 |
| 127 | 7F | 177 | 1111111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 128 | 80 | 200 | 10000000 |
| 129 | 81 | 201 | 10000001 |
| 130 | 82 | 202 | 10000010 |
| 131 | 83 | 203 | 10000011 |
| 132 | 84 | 204 | 10000100 |
| 133 | 85 | 205 | 10000101 |
| 134 | 86 | 206 | 10000110 |
| 135 | 87 | 207 | 10000111 |
| 136 | 88 | 210 | 10001000 |
| 137 | 89 | 211 | 10001001 |
| 138 | 8A | 212 | 10001010 |
| 139 | 8B | 213 | 10001011 |
| 140 | 8C | 214 | 10001100 |
| 141 | 8D | 215 | 10001101 |
| 142 | 8E | 216 | 10001110 |
| 143 | 8F | 217 | 10001111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 144 | 90 | 220 | 10010000 |
| 145 | 91 | 221 | 10010001 |
| 146 | 92 | 222 | 10010010 |
| 147 | 93 | 223 | 10010011 |
| 148 | 94 | 224 | 10010100 |
| 149 | 95 | 225 | 10010101 |
| 150 | 96 | 226 | 10010110 |
| 151 | 97 | 227 | 10010111 |
| 152 | 98 | 230 | 10011000 |
| 153 | 99 | 231 | 10011001 |
| 154 | 9A | 232 | 10011010 |
| 155 | 9B | 233 | 10011011 |
| 156 | 9C | 234 | 10011100 |
| 157 | 9D | 235 | 10011101 |
| 158 | 9E | 236 | 10011110 |
| 159 | 9F | 237 | 10011111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 160 | A0 | 240 | 10100000 |
| 161 | A1 | 241 | 10100001 |
| 162 | A2 | 242 | 10100010 |
| 163 | A3 | 243 | 10100011 |
| 164 | A4 | 244 | 10100100 |
| 165 | A5 | 245 | 10100101 |
| 166 | A6 | 246 | 10100110 |
| 167 | A7 | 247 | 10100111 |
| 168 | A8 | 250 | 10101000 |
| 169 | A9 | 251 | 10101001 |
| 170 | AA | 252 | 10101010 |
| 171 | AB | 253 | 10101011 |
| 172 | AC | 254 | 10101100 |
| 173 | AD | 255 | 10101101 |
| 174 | AE | 256 | 10101110 |
| 175 | AF | 257 | 10101111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 176 | B0 | 260 | 10110000 |
| 177 | B1 | 261 | 10110001 |
| 178 | B2 | 262 | 10110010 |
| 179 | B3 | 263 | 10110011 |
| 180 | B4 | 264 | 10110100 |
| 181 | B5 | 265 | 10110101 |
| 182 | B6 | 266 | 10110110 |
| 183 | B7 | 267 | 10110111 |
| 184 | B8 | 270 | 10111000 |
| 185 | B9 | 271 | 10111001 |
| 186 | BA | 272 | 10111010 |
| 187 | BB | 273 | 10111011 |
| 188 | BC | 274 | 10111100 |
| 189 | BD | 275 | 10111101 |
| 190 | BE | 276 | 10111110 |
| 191 | BF | 277 | 10111111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 192 | C0 | 300 | 11000000 |
| 193 | C1 | 301 | 11000001 |
| 194 | C2 | 302 | 11000010 |
| 195 | C3 | 303 | 11000011 |
| 196 | C4 | 304 | 11000100 |
| 197 | C5 | 305 | 11000101 |
| 198 | C6 | 306 | 11000110 |
| 199 | C7 | 307 | 11000111 |
| 200 | C8 | 310 | 11001000 |
| 201 | C9 | 311 | 11001001 |
| 202 | CA | 312 | 11001010 |
| 203 | CB | 313 | 11001011 |
| 204 | CC | 314 | 11001100 |
| 205 | CD | 315 | 11001101 |
| 206 | CE | 316 | 11001110 |
| 207 | CF | 317 | 11001111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 208 | D0 | 320 | 11010000 |
| 209 | D1 | 321 | 11010001 |
| 210 | D2 | 322 | 11010010 |
| 211 | D3 | 323 | 11010011 |
| 212 | D4 | 324 | 11010100 |
| 213 | D5 | 325 | 11010101 |
| 214 | D6 | 326 | 11010110 |
| 215 | D7 | 327 | 11010111 |
| 216 | D8 | 330 | 11011000 |
| 217 | D9 | 331 | 11011001 |
| 218 | DA | 332 | 11011010 |
| 219 | DB | 333 | 11011011 |
| 220 | DC | 334 | 11011100 |
| 221 | DD | 335 | 11011101 |
| 222 | DE | 336 | 11011110 |
| 223 | DF | 337 | 11011111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 224 | E0 | 340 | 11100000 |
| 225 | E1 | 341 | 11100001 |
| 226 | E2 | 342 | 11100010 |
| 227 | E3 | 343 | 11100011 |
| 228 | E4 | 344 | 11100100 |
| 229 | E5 | 345 | 11100101 |
| 230 | E6 | 346 | 11100110 |
| 231 | E7 | 347 | 11100111 |
| 232 | E8 | 350 | 11101000 |
| 233 | E9 | 351 | 11101001 |
| 234 | EA | 352 | 11101010 |
| 235 | EB | 353 | 11101011 |
| 236 | EC | 354 | 11101100 |
| 237 | ED | 355 | 11101101 |
| 238 | EE | 356 | 11101110 |
| 239 | EF | 357 | 11101111 |
| Dec | Hex | Oct | Bin |
|---|---|---|---|
| 240 | F0 | 360 | 11110000 |
| 241 | F1 | 361 | 11110001 |
| 242 | F2 | 362 | 11110010 |
| 243 | F3 | 363 | 11110011 |
| 244 | F4 | 364 | 11110100 |
| 245 | F5 | 365 | 11110101 |
| 246 | F6 | 366 | 11110110 |
| 247 | F7 | 367 | 11110111 |
| 248 | F8 | 370 | 11111000 |
| 249 | F9 | 371 | 11111001 |
| 250 | FA | 372 | 11111010 |
| 251 | FB | 373 | 11111011 |
| 252 | FC | 374 | 11111100 |
| 253 | FD | 375 | 11111101 |
| 254 | FE | 376 | 11111110 |
| 255 | FF | 377 | 11111111 |
When to Use Different Number Systems
Binary (Base 2) in Computing
Computers use binary because electronic circuits have two states: on (1) and off (0). Every piece of data in your computer - text, images, videos - is ultimately stored as binary numbers. Understanding binary helps programmers debug low-level code and work with bitwise operations.
Octal (Base 8) in Unix/Linux
Octal numbers are commonly used for Unix file permissions. The permission value 755 (rwxr-xr-x) means the owner has read, write, and execute permissions, while group and others have read and execute only. Each octal digit represents three binary bits, making it compact for permission representation.
Hexadecimal (Base 16) in Programming
Hexadecimal is the preferred format for representing memory addresses, color codes (#FF5733), and byte values. Two hex digits represent exactly one byte (8 bits), making it more readable than binary. Web developers use hex colors daily, and programmers see hex values in debuggers and memory dumps.
Common Important Values
- 255 (decimal) = FF (hex) = 11111111 (binary) - Maximum value for one byte, used in RGB color values
- 256 (decimal) = 100 (hex) = 100000000 (binary) - Number of possible values in one byte (0-255)
- 64 (decimal) = 40 (hex) = 1000000 (binary) - 26, commonly used in encoding (Base64)
- 128 (decimal) = 80 (hex) = 10000000 (binary) - 27, number of ASCII characters
Frequently Asked Questions
How do I convert binary to decimal?
To convert binary to decimal, multiply each digit by 2 raised to its position power (starting from 0 on the right), then sum all results. For example, 1010 in binary = 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 = 8 + 0 + 2 + 0 = 10 in decimal.
How do I convert decimal to hexadecimal?
To convert decimal to hexadecimal, repeatedly divide the number by 16 and record the remainders. The remainders, read from bottom to top, form the hexadecimal number. Remainders 10-15 are represented as A-F.
What is the difference between binary, octal, decimal and hexadecimal?
These are different number systems with different bases: Binary (base-2) uses digits 0-1, Octal (base-8) uses digits 0-7, Decimal (base-10) uses digits 0-9, and Hexadecimal (base-16) uses digits 0-9 and letters A-F.