Decimal, hex, binary and octal converter
Type in any base and the rest update live, with a clickable bit grid and a two’s-complement signed view at 8, 16, 32 or 64 bits.
The formula
unsigned = Σ bit[i] · 2^i signed (two’s complement) = unsigned − 2^bits, if the top bit is set
When to use it
Reading a register dump, building a bitmask, checking what a negative value looks like in hex, or just converting a value while reverse-engineering a protocol. The bit grid is the fastest way to see which flags are set without doing the arithmetic yourself.
Pitfalls
- A value typed as unsigned can be out of range for the same width signed, and the other way around — the field goes red instead of silently wrapping.
- 0xFF is 255 unsigned but −1 signed at 8 bits; the same bit pattern means different numbers depending on how the code reads it.
- 64-bit values exceed what JavaScript’s plain numbers can represent exactly past 2^53 — this tool uses BigInt throughout so the full 64-bit range stays exact.
- The ASCII column only means something for the low byte; it is a convenience for text bytes, not a property of the whole value.
Reading a protocol or a register map you didn’t design? We reverse-engineer firmware and hardware.