The fastest way to master base conversions is practice. 30 problems with answers. Work by hand, check with the Number Base Converter.
Decimal to binary: (1) 7 (2) 15 (3) 25 (4) 42 (5) 100
Binary to decimal: (6) 1011 (7) 11001 (8) 101010 (9) 11111111 (10) 10000000
| # | Problem | Answer | Method |
|---|---|---|---|
| 1 | 7→bin | 111 | 4+2+1 |
| 2 | 15→bin | 1111 | 8+4+2+1 |
| 3 | 25→bin | 11001 | 16+8+1 |
| 4 | 42→bin | 101010 | 32+8+2 |
| 5 | 100→bin | 1100100 | 64+32+4 |
| 6 | 1011→dec | 11 | 8+2+1 |
| 7 | 11001→dec | 25 | 16+8+1 |
| 8 | 101010→dec | 42 | 32+8+2 |
| 9 | 11111111→dec | 255 | All 8 bits |
| 10 | 10000000→dec | 128 | Only bit 7 |
Decimal to hex: (11) 26 (12) 127 (13) 255 (14) 1000 (15) 48879
Hex to decimal: (16) 1A (17) 7F (18) FF (19) 3E8 (20) BEEF
| # | Problem | Answer | Method |
|---|---|---|---|
| 11 | 26→hex | 1A | 26/16=1r10(A) |
| 12 | 127→hex | 7F | 127/16=7r15(F) |
| 13 | 255→hex | FF | 255/16=15r15 |
| 14 | 1000→hex | 3E8 | 1000/16=62r8, 62/16=3r14(E) |
| 15 | 48879→hex | BEEF | |
| 16 | 1A→dec | 26 | 1×16+10 |
| 17 | 7F→dec | 127 | 7×16+15 |
| 18 | FF→dec | 255 | 15×16+15 |
| 19 | 3E8→dec | 1000 | 3×256+14×16+8 |
| 20 | BEEF→dec | 48879 | 11×4096+14×256+14×16+15 |
(21) 10110011 (22) 11111110 (23) 101011001101 (24) A5→bin (25) DEAD→bin
| # | Problem | Answer | Method |
|---|---|---|---|
| 21 | 10110011→hex | B3 | 1011=B, 0011=3 |
| 22 | 11111110→hex | FE | 1111=F, 1110=E |
| 23 | 101011001101→hex | ACD | 1010=A, 1100=C, 1101=D |
| 24 | A5→bin | 10100101 | A=1010, 5=0101 |
| 25 | DEAD→bin | 1101111010101101 | D=1101,E=1110,A=1010,D=1101 |
(26) 493→oct (27) Oct 755→dec (28) Oct 644→bin (29) 110100101→oct (30) FF→oct
| # | Problem | Answer | Method |
|---|---|---|---|
| 26 | 493→oct | 755 | 493/8=61r5,61/8=7r5,7/8=0r7 |
| 27 | Oct 755→dec | 493 | 7×64+5×8+5 |
| 28 | Oct 644→bin | 110100100 | 6=110,4=100,4=100 |
| 29 | 110100101→oct | 645 | 110=6,100=4,101=5 |
| 30 | FF→oct | 377 | FF=255, div by 8 |
More: Base64 Encoder, Regex Tester.