← Back

Two's Complement

Signed 8-bit Two's Complement calculator with step-by-step logic.

Theory & Scientific Principles

Two's Complement System: Standard computer arithmetic encoding for signed integers. In an $n$-bit system, the most significant bit (MSB) carries negative weight: $-d_{n-1}2^{n-1} + \sum_{i=0}^{n-2} d_i 2^i$.

Representable Dynamic Range: For $n=8$ bits: $[-2^7, 2^7 - 1] = [-128, +127]$.

Negative Conversion Algorithm: To negate a number $x$: (1) Take magnitude $|x|$ in binary, (2) Invert all bits (1's complement: $\sim x = 2^n - 1 - x$), (3) Add $1$: $2\text{'s complement} = 2^n - x$.

Operating Instructions: Input any integer between $-128$ and $+127$. Inspect step-by-step bitwise inversion and $+1$ increment steps.

Parameters

Calculation Steps