Every number system works the same way: each position is worth the base raised to a power, counting from 0 on the right. Decimal uses base 10, binary base 2, octal base 8 and hexadecimal base 16. Hexadecimal needs six extra symbols, so A to F stand for 10 to 15. Computer awareness sections in SSC, bank and railway exams test conversions between these bases, usually with small numbers that can be worked by hand in under a minute.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
Learning this table removes most of the work: the binary-to-octal and binary-to-hex methods below are just lookups in it.