SDG Electronics

Number base and bit converter

Exact integer conversion with word-width limits and explicit two’s-complement interpretation.

Development preview. Check the assumptions below before relying on a result. Calculations run in your browser.

Loading calculator…

How it calculates

Model: Negative two’s-complement word = 2^width + signed value; decode words with the sign bit set by subtracting 2^width.

Assumptions

  • Integer arithmetic is exact with BigInt up to 256 bits. Raw-word input is always non-negative; number input obeys the selected signed range. Underscores are optional visual separators.

Worked example

These are the calculator's default inputs. Change any input above to recalculate.

Inputs

Integer digits
255
Input base
10
Word width
8
Interpretation
unsigned
Input meaning
number

Results

Hexadecimal
FF
Binary
11111111
Interpreted decimal
255
Unsigned word
255
Octal
377
Minimum representable integer
0
Maximum representable integer
255
Number of set bits
8

All electronics calculators