Two's Complement Calculator

Signed decimal to two's complement binary and hex.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Two’s complement calculator

See how a signed decimal integer is stored in two’s complement form at 8, 16, 32 or 64 bits. The tool shows the binary pattern, the hexadecimal value, and both the unsigned and signed interpretations of the same bits.

Two’s complement is how nearly every modern CPU represents negative integers: −n is stored as 2^w − n for a width of w bits, which lets addition and subtraction work with a single circuit. Everything runs locally in your browser.

Ad placeholder (rectangle)