🚧 We’re making Tools Pasal better. Found a broken tool or have an idea? Tell us →
Tools Pasal

Number System Converter

Convert between binary, octal, decimal and hexadecimal (and any base 2–36) instantly. Built for Nepali CSIT, BCA and +2 Computer Science students — type once, see every base, and learn the exam methods below.

Input is in

Type a number above to see it in binary, octal, decimal, hex and any custom base.

Exact for numbers of any length (uses BigInt). Whole numbers only; a leading minus is allowed. Accepts 0x/0b/0o prefixes and spaces. Runs entirely in your browser.

How to use this converter

Choose which base your number is written in (Binary, Octal, Decimal, Hex, or a Custom base), type the number, and the other bases appear instantly with copy buttons. Binary is grouped in 4-bit blocks with a bit count. Use Also show in base for any base from 2 to 36 — handy for base-5, base-12 or base-36 questions.

The four number systems

SystemBaseDigitsDecimal 13 looks like
Binary20, 11101
Octal80–715
Decimal100–913
Hexadecimal160–9, A–FD

Binary → Decimal (place-value method)

Each bit is worth a power of 2. Multiply and add. For 1010:

bit:    1    0    1    0
value:  8    4    2    1
        ↓              ↓
       1×8 + 0×4 + 1×2 + 0×1  =  10

Decimal → any base (repeated division)

Divide by the base, keep the remainders, read them bottom-to-top. Example — 156 to hexadecimal:

156 ÷ 16 = 9  remainder 12  (C)
  9 ÷ 16 = 0  remainder 9   (9)
read up →  9C   (so 156 = 9C in hex)

Binary ↔ Hex / Octal (grouping shortcut)

Group binary digits from the right: 4 bits = 1 hex digit, 3 bits = 1 octal digit. For example 1001 11109E (hex), and 10 011 110 236 (octal). This is why programmers write addresses and colours in hex.

Why this matters for Nepali students

Number-system conversion appears across NEB +2 Computer Science, BCA, BSc CSIT, BIT and Loksewa Computer Operator / IT exams. Practise the by-hand methods above for the written exam, and use this tool to check your answers quickly. It uses BigInt, so large values stay exact — unlike many calculators that round past ~16 digits.

Sources & notes

Standard positional number-system definitions (base 2–36, digits 0–9 then A–Z). This tool handles whole numbers (a leading minus is allowed); fractional and two’s-complement conversions may be added later. General educational information.

Working with code too? Try the JSON Formatter and Password Generator.

Frequently asked questions

How do I convert binary to decimal?

Multiply each binary digit by 2 raised to its position (starting at 0 from the right) and add them up. For 1010: (1×8) + (0×4) + (1×2) + (0×1) = 10. This tool does it instantly, but the place-value method is what you write in exams.

How do I convert decimal to binary, octal or hex?

Use repeated division: divide the decimal number by the target base, write down the remainder, and repeat with the quotient until it reaches 0. Read the remainders from bottom to top. For 156 → hex: 156 ÷ 16 = 9 r 12 (C), 9 ÷ 16 = 0 r 9, so 156 = 9C.

What is the quick way between binary and hex?

Group the binary digits into 4s from the right — each group of 4 bits is exactly one hex digit. 1001 1110 = 9E. For octal, group into 3s. This is why programmers like hex: it's a short way to write binary.

Does it handle very large numbers?

Yes, exactly. It uses BigInt, so even a 200-digit binary number converts without rounding errors. Ordinary calculators and many websites use floating-point and quietly give wrong answers past about 16 digits.

Can it convert any base, like base 5 or base 12?

Yes — pick 'Custom' for the input base, and use 'Also show in base' for the output. Any base from 2 to 36 is supported (digits 0–9 then A–Z).

Is my input sent anywhere?

No. Everything is computed in your browser — nothing is uploaded or stored.