Number System (Binary, Hex, Octal) Converter
Type in any box to convert instantly between binary, octal, decimal, hexadecimal and any base from 2 to 36. Includes 16 bit and 32 bit register views for PLC and Modbus troubleshooting.
How Number System Conversion Works
Number systems represent the same value with different bases. PLCs, Modbus registers and digital electronics use binary (base 2), octal (base 8) and hexadecimal (base 16) alongside everyday decimal.
Each digit in a number has a weight equal to the base raised to its position. To convert into decimal, multiply each digit by its weight and add the results. To convert out of decimal, divide repeatedly by the new base and collect the remainders.
Quick reference: 0 to 15
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
Frequently Asked Questions
How do I convert decimal to binary?
Divide the number by 2 repeatedly and write down the remainders, then read them from bottom to top. For example 13 gives remainders 1, 0, 1, 1, so 13 in binary is 1101.
How do I convert hexadecimal to decimal?
Multiply each hex digit by 16 raised to its position (starting at 0 from the right) and add them. For example 0x1F = 1 × 16 + 15 = 31.
Why do PLCs and Modbus use hexadecimal?
Each hex digit represents exactly four bits, so a 16 bit register fits in four hex digits. This makes status words, bit masks and register addresses much easier to read than long binary strings.
What is a signed 16 bit value?
A signed 16 bit integer uses two’s complement, so values from 0x8000 to 0xFFFF represent negative numbers from −32768 to −1. This tool shows both unsigned and signed readings for register values up to 65535.
Does this converter handle very large numbers?
Yes. It uses arbitrary precision integer maths, so you can convert values far larger than 32 or 64 bits without rounding errors.
Learn the theory behind it
SCADA communication protocols
A practical, field focused guide on instrumentationblog.in that explains where these units come from and how engineers use them on real plants.
Read Full ArticleMore Other Converters
Popular Engineering Converters
Frequently used tools from our full library of 76 unit converters.