Binary, Decimal, Hex and Octal Converter
Convert a number between binary, decimal, hexadecimal and octal. Also shows the signed 16 bit value used in PLC and Modbus registers.
- Read 200 in base 10 = 200 in decimal, then divide repeatedly by 2, 8 and 16 to get the other bases.
How Number Bases Work
1 hex digit = 4 binary bits, 1 octal digit = 3 bits
A signed 16 bit integer (INT) uses two's complement: values above 32767 represent negative numbers, value − 65536.
Worked example
200 decimal = C8 hex = 1100 1000 binary = 310 octal. Hex FF9C read as a signed 16 bit register is −100.
Frequently Asked Questions
How do I convert binary to hex?
Group the binary digits in fours from the right and replace each group with one hex digit. 1100 1000 = C8.
What is FF in decimal?
255.
Why do PLCs show negative numbers as large values?
A signed value read as unsigned shows two's complement directly. Subtract 65,536 to get the signed value of a 16 bit register.
Learn more on the blog
Introduction to number systems
A practical, field focused guide on instrumentationblog.in that explains the theory behind this calculator and how engineers apply it on real plants.
Read Full Article