Free engineering calculators and unit convertersceo@instrumentationblog.in
Communication Protocols · Free Tool

Hex, Decimal, Binary and ASCII Converter

Convert PLC and Modbus register values between hex, decimal, signed decimal, binary and ASCII, with byte swap to check device byte order.

Hex ↔ decimalSigned 16 bitBinary bitsASCII
Hex0x41A2
Unsigned decimal16802
Signed decimal (INT)16802
Binary (bit 15 to 0)0100 0001 1010 0010
ASCII (high, low byte)A ·
Byte swapped0xA241 = 41537
Advertisement

How It Works

Unsigned: 0 to 65535
Signed (two's complement): value − 65536 if above 32767
Byte swap: low byte × 256 + high byte

A Modbus register holds 16 bits. The same bits can mean an unsigned number, a signed number, two ASCII characters or packed status bits.

Worked example

0x41A2 = 16802 unsigned, binary 0100 0001 1010 0010, ASCII "A" and a non printable byte, byte swapped 0xA241 = 41537.

Key insight: a value that looks like 65535 or 65000 is often a small negative number read as unsigned: check the data type in the device map.
Advertisement

Frequently Asked Questions

How do I convert hex to decimal?

Multiply each hex digit by 16 to the power of its position and add; this tool does it instantly.

What is two's complement?

The standard way to store negative integers: values above 32767 represent negative numbers in 16 bit.

Why swap bytes?

Some devices send the low byte first; swapping shows the intended value.

You May Also Like

Learn more on the blog

Introduction to number systems

A practical, field focused guide on instrumentationblog.in that explains the theory behind this tool and how engineers apply it on real plants.

Read Full Article

More Communication Protocols

More Instrumentation Tools