BinaryCon Binary Converter

Signed vs Unsigned Converter

Result

Signed vs Unsigned Converter

Convert between signed and unsigned integer representations.

Example: -5 (signed)

Definition: Interprets the input in signed or unsigned form and converts between representations (two's complement handling).

Conversion formula

Signed vs Unsigned (two's complement):
For N-bit two's complement signed value with bits b_{N-1}..b_0:
If MSB (b_{N-1}) = 0 → value = Σ (b_i × 2^i)
If MSB = 1 → value = Σ (b_i × 2^i) - 2^N

Example (8-bit 0b11111101): unsigned=253, signed=253-256 = -3