Two’s Complement Converter
Convert signed integers to fixed-width binary and hex, or read a binary word as a signed integer.
twos-complement-converterLOCAL WORKSPACE
Enabling local controls…
Results
Review the settings and run. Editing inputs clears old results.
Processing model and limits
The leading bit is the sign. A width of n bits covers −2ⁿ⁻¹ through 2ⁿ⁻¹ − 1.
Data and model checked: ECMAScript BigInt.asIntN ↗
How to use this tool
Load the example, confirm field units and processing rules, then run locally. Editing any input clears the old result. Copy or download the complete output explicitly.
When not to use it
The leading bit is the sign. A width of n bits covers −2ⁿ⁻¹ through 2ⁿ⁻¹ − 1.