This hex to binary converter writes each hex digit as four bits: 0x8005 is 1000 0000 0000 0101, which is 32,773 unsigned or −32,763 signed in 16 bits, with bits 0, 2 and 15 set.
- Unsigned
- –
- Signed (two’s complement)
- –
- Hex
–- Binary
–- Bits set
- –
Bits, highest first
noneBitThis value does not fit: check the digits for the base and that it fits in the width.
How it works
How do you convert hex to binary?
Each hex digit is four bits, so 16 bits are four hex digits. Binary writes every bit; the lowest bit, bit 0, is on the right.
Signed values use two’s complement: when the highest bit is set, the value is the unsigned number minus 2width. 0xFFFE is 65534 unsigned and −2 signed in 16 bits.
Devices often pack alarms and states into one register, one bit each. 0x8005 has bits 0, 2 and 15 set.
Glossary Modbus register
Questions
Questions about the hex to binary converter
What is two’s complement?
The usual way to store negative integers: the highest bit carries the sign, and a negative value is stored as 2width plus the value. −1 in 16 bits is FFFF.
How do I read a status word?
Find which bits are set and look them up in the device manual’s bit table; bit 0 is the lowest. The bit grid shows each bit with its number.
More tools

