Number System Converter
Convert between Binary, Decimal, Octal & Hexadecimal instantly. Perfect for CS students & programmers.
Binary, Decimal, Octal & Hexadecimal — the complete converter
This tool converts any whole number between the four number systems that matter in computing — binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) — and updates all four fields the instant you type. Unlike a plain converter that just spits out an answer, it also shows the step-by-step working for each conversion, so it doubles as a study aid when you need to reproduce the method by hand in an exam or lab viva.
How number system conversion actually works
Every number system is a positional system: each digit's value depends on its place, and each place is a power of the base. In decimal, 352 means 3×10² + 5×10¹ + 2×10⁰. The same logic drives every other base — only the base changes. Understanding that one idea lets you convert in any direction without memorising separate rules.
Any base → decimal: multiply each digit by its place value (base raised to the position, counting from 0 on the right) and add them up.
FF = F×16¹ + F×16⁰ = 15×16 + 15×1 = 240 + 15 = 255. That is why one byte (8 bits) tops out at 255 and why colours run #000000 to #FFFFFF.
Decimal → any base: divide repeatedly by the target base, keep each remainder, then read the remainders bottom to top.
156÷2 = 78 r0 · 78÷2 = 39 r0 · 39÷2 = 19 r1 · 19÷2 = 9 r1 · 9÷2 = 4 r1 · 4÷2 = 2 r0 · 2÷2 = 1 r0 · 1÷2 = 0 r1. Read bottom-up → 10011100.
The shortcut between binary and hex (or octal): you never need decimal as a middle step. Group binary digits into nibbles of 4 for hex, or groups of 3 for octal, from the right. Each group maps to a single hex/octal digit.
2=0010, A=1010, F=1111 → 001010101111. This nibble trick is the fastest way to read memory dumps and register values by hand.
Who this converter is for
It's built for the everyday base-conversion moments in Indian tech education and work:
- Engineering & BCA/MCA students revising Digital Electronics, Computer Organization & Architecture (COA), or Microprocessors — the step-by-step view mirrors how conversions are marked in university semester papers and GATE.
- Web developers translating hex colour codes like
#16A34Ainto RGB, or decoding hex values in APIs and config files. - System administrators reading and setting Linux/Unix file permissions, which are written in octal (
chmod 755). - Embedded & IoT developers working with register masks, bit flags, and memory addresses that are almost always written in hex.
Common mistakes and edge cases
- Reading remainders top-down. The single most common exam error. In repeated division, the first remainder is the least significant bit — always read the column bottom to top.
- Dropping leading zeros in nibbles. When grouping binary into hex, pad the left-most group to a full 4 bits.
101111is0010 1111=2F, not101111read as two loose chunks. - Hex letter case.
ff,FfandFFare the same value; case is cosmetic. This tool accepts either and outputs uppercase by convention. - Confusing octal with decimal. In octal there is no digit 8 or 9. If a "number" contains an 8, it isn't valid octal — a frequent slip when reading chmod values.
- Negative numbers. This converter handles unsigned whole numbers. Computers store negatives using two's complement: to get −5 in 8-bit, take 5 (
00000101), invert every bit (11111010), add 1 (11111011). That bit pattern reads as 251 if you treat it as unsigned — which is exactly why signed and unsigned interpretations of the same bits differ. - Fractions. Base conversion of decimals (e.g. 0.625 → binary) uses repeated multiplication, not division, and is a separate method — this tool focuses on integers, the case that covers the vast majority of coursework and dev work.
Frequently asked questions
How do I convert decimal to binary by hand?
Divide the number by 2, note the remainder, and repeat with the quotient until you reach 0. Then read all the remainders from bottom to top. For example, 156 gives remainders 0,0,1,1,1,0,0,1 which, read upward, is 10011100.
Why is hexadecimal used so much in programming?
Because it maps cleanly onto binary — each hex digit represents exactly 4 bits (one nibble). That makes long binary values far easier to read and write. A 32-bit value is 8 hex digits instead of 32 ones and zeros, which is why memory addresses, colour codes, and register values all use hex.
What is octal actually used for today?
Its most common everyday use is Unix and Linux file permissions. A command like chmod 755 uses three octal digits, where each digit's 3 bits map to read (4), write (2), and execute (1) permissions — so 7 is rwx and 5 is r-x.
Does this converter handle negative numbers or decimals?
It converts unsigned whole numbers, which covers almost all coursework and development needs. Negative numbers require two's complement representation and fractional values require a repeated-multiplication method — both are distinct techniques outside this tool's scope.
Is there a limit to how large a number I can convert?
You can convert everyday and exam-sized values without issue. Extremely large numbers beyond standard integer precision may lose accuracy, as with any browser-based calculator — for typical binary, hex, and octal work up to and well past 32-bit values, results are exact.
