Number system conversion is one of the most frequently tested topics in BCA, CSIT, BIT, and +2 Computer Science exams across Nepal and India. This guide explains every conversion method step by step and gives you a free tool to check your work instantly.
Number System Converter
Convert between binary, octal, decimal, and hexadecimal instantly — with step-by-step working shown
Try this free toolThe four number systems you need to know
| System | Base | Digits used | Prefix |
|---|---|---|---|
| Binary | 2 | 0, 1 | 0b |
| Octal | 8 | 0–7 | 0o |
| Decimal | 10 | 0–9 | none |
| Hexadecimal | 16 | 0–9, A–F | 0x |
In hexadecimal: A=10, B=11, C=12, D=13, E=14, F=15
Binary to Decimal — step by step
Write the binary number, assign position values (powers of 2 from right to left), multiply, and add.
Example: Convert 1101 (binary) to decimal
| Bit | 1 | 1 | 0 | 1 |
|---|---|---|---|---|
| Position | 3 | 2 | 1 | 0 |
| Power of 2 | 2³=8 | 2²=4 | 2¹=2 | 2⁰=1 |
| Value | 1×8=8 | 1×4=4 | 0×2=0 | 1×1=1 |
Result = 8 + 4 + 0 + 1 = 13 (decimal)
Example: Convert 10110101 (binary) to decimal = 1×128 + 0×64 + 1×32 + 1×16 + 0×8 + 1×4 + 0×2 + 1×1 = 128 + 0 + 32 + 16 + 0 + 4 + 0 + 1 = 181
Decimal to Binary — step by step (division method)
Divide the number by 2 repeatedly, note the remainder each time, then read remainders bottom to top.
Example: Convert 45 (decimal) to binary
| Division | Quotient | Remainder |
|---|---|---|
| 45 ÷ 2 | 22 | 1 |
| 22 ÷ 2 | 11 | 0 |
| 11 ÷ 2 | 5 | 1 |
| 5 ÷ 2 | 2 | 1 |
| 2 ÷ 2 | 1 | 0 |
| 1 ÷ 2 | 0 | 1 |
Read remainders bottom to top: 101101 Verify: 32+8+4+1 = 45 ✓
Hexadecimal to Decimal
Each hex digit represents 4 binary bits. Multiply each digit by its power of 16.
Example: Convert 2AF (hex) to decimal
| Digit | 2 | A (=10) | F (=15) |
|---|---|---|---|
| Position | 2 | 1 | 0 |
| Power of 16 | 16²=256 | 16¹=16 | 16⁰=1 |
| Value | 2×256=512 | 10×16=160 | 15×1=15 |
Result = 512 + 160 + 15 = 687
Decimal to Hexadecimal
Divide by 16, note remainders (using A–F for 10–15).
Example: Convert 255 to hexadecimal
| Division | Quotient | Remainder |
|---|---|---|
| 255 ÷ 16 | 15 | 15 = F |
| 15 ÷ 16 | 0 | 15 = F |
Read bottom to top: FF Verify: 15×16 + 15 = 255 ✓
Binary to Hexadecimal (shortcut — no decimal needed)
Group binary digits into sets of 4 from the right. Convert each group directly.
Example: Convert 11010111 to hexadecimal
- Group from right: 1101 | 0111
- 1101 = 8+4+1 = 13 = D
- 0111 = 4+2+1 = 7 = 7
- Result: D7
Octal to Decimal
Multiply each digit by its power of 8.
Example: Convert 347 (octal) to decimal = 3×64 + 4×8 + 7×1 = 192 + 32 + 7 = 231
Common conversions quick reference table
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 5 | 0101 | 5 | 5 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1024 | 10000000000 | 2000 | 400 |
Memorize the conversions for 0–15 (0–F in hex) — they are the building blocks of every other conversion.
Why number systems matter for Nepal college exams
In BCA, CSIT, BIT, and +2 Computer Science curricula across Nepal:
- Number system conversion appears in almost every board exam
- BCA entrance exams (Tribhuvan University) regularly include 4–6 conversion problems
- IOE entrance (Pulchowk Engineering) tests binary, hex, and octal
- NEB +2 Computer Science: number systems are Chapter 1 in all textbooks
Practice with the Number System Converter which shows the step-by-step working for each conversion — ideal for understanding, not just getting the answer.