New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Hex to binary converter, with decimal and bit viewer

Free hex to binary converter: hex, binary and decimal in 8, 16 or 32 bits, signed and unsigned, with a bit viewer for the status words devices send.

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.

For example 0x8005, 1000 0000 0000 0101 or −2.

Unsigned
–
Signed (two’s complement)
–
Hex
–
Binary
–
Bits set
–

Bits, highest first

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.