How to use this tool
Choose the input base and enter a signed integer or a binary/hex two's-complement pattern.
For two's complement, state the bit width before interpreting the high bit as negative. Fractional values are outside this tool.
Positional integer conversion; two's complement interprets the high bit as negative
Worked example
255 · decimal integer
Fixed example using the settings below. Monetary examples use USD; dates and times use their stated reference values. This example stays unchanged when you edit your calculation.
Example inputs
- Signed integer or two's-complement bit pattern: 255
- Input base: Decimal
- Input representation: Signed magnitude text (+/−)
- Bit width for two's complement: 16
Method illustration: Decimal 255 is binary 11111111 and hex FF. In 8-bit two's complement, FF is −1.
Assumptions and limits
- Supports integers up to 256 bits. Signed text uses an explicit minus; two's-complement input requires binary/hex and a stated width.
- A two's-complement output is shown only if the signed value fits the chosen width.
Check or report a result
Check the units, selected calculation and assumptions first. Compare the fixed example above with your inputs to identify what changed.
Report a calculation issue with the page address, hypothetical inputs, result displayed and result expected. Do not include passwords, bank details or other private information.