Number Base Converter

Convert numbers from one base to another

 

Type the value you want converted into the appropriate field.

The corresponding values will be displayed in the other supported bases.

 

Binary:
Ternary:
Quintal:
Octal:
Decimal:
Hexadecimal:



 

Procedure to Converting a Decimal Number to a Binary Number

There are about five steps involved in converting the number 35 to a binary number.

 

1. First you need to determine the greater power of 2 that is less than or equal to 35. So, starting with the largest number, 2 to the 5 (32) is smaller than 35. Place a "1" in that column and, then, calculate how much is left over by subtracting 32 from 35. The result is 9.

 

2. Next, you'll want to check to see if 16 (the next lower power of 2) that fits into 3. Because it does not, an "0" is placed in that column. The value of the next number is 8, which is larger than 3, so an "0" is placed in that column too.

 

3. The next value that we'll work with is 4, which is still larger than 3. So, again, we'll make this a "0."

 

4. Okay, our next value will be 2, which is smaller than 3. And, because it is, we'll place a "1" into the column. Now, you'll need to subtract 2 from 3, and the result will be 1.

 

5. The value of the last number is 1, which still works with the remaining number. Therefore, we'll place a "1" in the last column. Now we see that the binary number for the decimal number 35 is 100011.

 

 

Hex to Decimal Table

Here's a chart that shows the conversion between hex and decimal.

 
    0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F.
0  000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015
1  016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031
2  032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047
3  048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063
4  064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079
5  080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095
6  096 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111
7  112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
8  128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
9  144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
A  160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
B  176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
C  192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
D  208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
E  224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
F  240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255

 

If you're having trouble getting the hang of the above chart, here's a hint.
Hex 41 (written as 0x41 in the programming language C) is equivalent to decimal 65.

 

 

 

 

 

Hex to Octal Table

Here's a chart that shows the conversion between hex and octal.

 

    0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F.
0  000 001 002 003 004 005 006 007 010 011 012 013 014 015 016 017
1  020 021 022 023 024 025 026 027 030 031 032 033 034 035 036 037
2  040 041 042 043 044 045 046 047 050 051 052 053 054 055 056 057
3  060 061 062 063 064 065 066 067 070 071 072 073 074 075 076 077
4  100 101 102 103 104 105 106 107 110 111 112 113 114 115 116 117
5  120 121 122 123 134 125 126 127 130 131 132 133 134 135 136 137
6  140 141 142 143 144 145 146 147 150 151 152 153 154 155 156 157
7  160 161 162 163 164 165 166 167 170 171 172 173 174 175 176 177
8  200 201 202 203 204 205 206 207 210 211 212 213 214 215 216 217
9  220 221 222 223 224 225 226 227 230 231 232 233 234 235 236 237
A  240 241 242 243 244 245 246 247 250 251 252 253 254 255 256 257
B  260 261 262 263 264 265 266 267 270 271 272 273 274 275 276 277
C  300 301 302 303 304 305 306 307 310 311 312 313 314 315 316 317
D  320 321 322 323 324 325 326 327 330 331 332 333 334 335 336 337
E  340 341 342 343 344 345 346 347 350 351 352 353 354 355 356 357
F  360 361 362 363 364 365 366 367 370 371 372 373 374 375 376 377

 

If you're having trouble getting the hang of the above chart, here's a hint.
Hex 41 (written as 0x41 in the programming language C) is equivalent to octal 101.

 

 

 

 

 

How to Convert Numbers

Base conversion of whole numbers is fairly easy if you use remainders.

Let's start with an example. Convert 1208 to base-26 (base 26 is fun because it is the alphabet!)

Watch this series of divisions (R means remainder, which is ignored in the next division):

1208 / 26 = 46 R 12

46 / 26 = 1 R 20

 

Now, think about the last answer (1 R 20), it means that 1208/26/26 = 1 (plus bits), in other words it tells us that we should put a "1" in the "262" column!!!

Next we should put a 20 in the "261" column, and lastly a 12 in the units.

Why?

Because our division work just before has really said that:

1208 = 46 26 + 12

So, 12 belongs in the units column, and from here on we are dealing with the first power of 26:

46 = 1 26 + 20 (so 20 belongs in the 26 column, and we put 1 in the 2626 column)

So the answer is:

262

261

1s

1

20

12

 

And if we substitute letters for numbers we get: ATL

Now, let's see if it has worked:
1 26 = 676
+20 26 = 520
+12 1 = 12
==> Total: 1208

 

In short, you do repeated divisions and put the results in from right to left.