Programmers and hardware engineers switch between number bases all day. This converter handles very large numbers and shows two's complement values for fixed bit widths.
How to use this calculator
- Type a number — prefixes like 0x, 0b and 0o are understood.
- Choose the base it is written in.
- Pick a bit width to see the signed (two's complement) value.
Formula
N = Σ digit × base^positionWorked example
0xFF = 255 = 1111 1111₂. As an 8-bit signed number 0xFF is −1.
Frequently asked questions
What is two's complement?
The standard way computers store negative integers: invert all bits of the positive number and add one.
Is there a size limit?
No practical one — the converter uses arbitrary-precision integers.
Results are for learning and preliminary design. Check critical work against the relevant codes and a qualified engineer.