Free engineering calculators and unit convertersceo@instrumentationblog.in
Electronics · Free Calculator

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.

BinaryHexadecimalOctalSigned 16 bit
Decimal200
HexadecimalC8
Binary1100 1000
Octal310
Bits needed8
As signed 16 bit (INT)200
How this result was calculated
  1. Read 200 in base 10 = 200 in decimal, then divide repeatedly by 2, 8 and 16 to get the other bases.
Advertisement

How Number Bases Work

Value = Σ digit × baseposition
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.

Key insight: when a Modbus register shows 65,436 instead of −100, the value is being read as unsigned; change the data type to INT rather than recalculating.
Advertisement

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.

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 calculator and how engineers apply it on real plants.

Read Full Article

More Electronics Calculators

More Calculator Categories