Number Base Converter

Convert integers between binary, octal, decimal, hexadecimal and any base from 2 to 36, with step-by-step math, bitwise operations and two’s complement view.

Allowed characters: 0-9
Binary0b
11111111
Copied!
Octal0o
377
Copied!
Decimalbase 10
255
Copied!
Hex0x
FF
Copied!
Show step-by-step conversion
Frequently asked questions
Why do computers use binary?
Digital circuits have two stable voltage states — on and off. Representing data with two symbols (0 and 1) is the simplest and most reliable mapping to these physical states. Every higher-level number base ultimately compiles down to binary inside the hardware.
Why is hexadecimal used in programming?
Hex is a compact way to display binary. Four binary digits map to exactly one hex digit, so a 32-bit value fits in 8 characters (e.g. 0xDEADBEEF) instead of 32. Memory addresses, colors (#FF8800) and byte dumps are almost always shown in hex.
How does step-by-step conversion work?
Base → decimal: multiply each digit by the base raised to the position power and sum. For 1A3 in base 16: 1·16² + 10·16¹ + 3·16⁰ = 256 + 160 + 3 = 419.
Decimal → base: divide by the base repeatedly, collect remainders, read them bottom-up.
What is two's complement?
Two's complement is how signed integers are stored. To negate a number, invert every bit and add 1. An n-bit two's complement value can represent the range -2ⁿ⁻¹ … 2ⁿ⁻¹-1, so 8-bit signed runs from -128 to 127. The leftmost bit acts as the sign bit.
What are bitwise operations used for?
AND masks bits (clear unwanted bits), OR sets bits, XOR toggles / compares equality, NOT inverts. Left shift multiplies by powers of 2, right shift divides. They are core to flags, permissions, hashing, graphics and low-level protocols.
What bases does this converter support?
Any integer base from 2 to 36. Digits 0-9 are followed by letters A-Z, where A=10, B=11, …, Z=35. Base 36 is the widest base that fits in a single alphanumeric character per digit.
Integer conversion only. Bitwise and two's complement panels treat values as 32-bit signed integers.

This number base converter translates integers between binary, octal, decimal, hexadecimal and any custom base from 2 through 36. Type a value, pick the input base, and four common bases update instantly with a copyable result for each.

Every conversion shows the math: place-value expansion when going to decimal, and successive division with remainders when going from decimal. For example, 1A3 in base 16 expands to 1·16² + 10·16¹ + 3·16⁰ = 256 + 160 + 3 = 419 in decimal.

The Bitwise tab computes AND, OR, XOR, NOT and shift left/right on 32-bit operands. The Two’s Complement tab shows 8-, 16- and 32-bit signed and unsigned views, so you can see how -1 becomes 0xFF, 0xFFFF or 0xFFFFFFFF.