> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.codeandcompile.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bit and Number Converter

> Convert between decimal, hex, binary and BCD, see signed and unsigned values, toggle single bits, and get the matching Siemens M byte.bit addresses.

Status words, alarm words and bit masks are easier to read bit by bit. Type a value in any format, or click the bits directly, and every other representation updates.

16-bit (WORD / INT)
32-bit (DWORD / DINT)
Clear

Decimal
Hex
Binary

Show Siemens addresses for

Unsigned

Signed ()

Read as BCD

Decimal  as BCD

Bits set

of

## What each value means

* **Unsigned** (WORD, UINT, DWORD, UDINT): all bits count as a positive number.
* **Signed** (INT, DINT): two's complement. When the highest bit is 1, the number is negative. For 16 bits, `FFFF` is −1 and `8000` is −32768.
* **BCD**: each group of 4 bits holds one decimal digit 0–9. `0x1234` in BCD means 1234. A nibble above 9 is not valid BCD. Older S5/S7 timers and counters, thumbwheel switches and 7-segment displays use BCD.

> [!NOTE]
>
> **Siemens byte order:** S7 PLCs are big-endian. In `MW10`, the high byte is `MB10` and the low byte is `MB11`, so bit 0 of the word is `M11.0` and bit 8 is `M10.0`. Turn on **Show Siemens addresses** in the converter to see this for every bit.

## Related

> [card] [Modbus float converter](https://wiki.codeandcompile.com/tools/modbus-float-converter.md)
>
> Two 16-bit registers to a 32-bit float in all four byte orders.

> [card] [Drive control word builder](https://wiki.codeandcompile.com/tools/profidrive-control-word.md)
>
> Build PROFIdrive STW1 control words and decode ZSW1 status words.


## Related topics

- [Modbus RTU Frame Builder and CRC-16 Calculator](https://wiki.codeandcompile.com/tools/modbus-rtu-frame-builder.md)
- [Drive Control Word Builder (PROFIdrive STW1 / ZSW1)](https://wiki.codeandcompile.com/tools/profidrive-control-word.md)
- [Free Engineering Tools](https://wiki.codeandcompile.com/tools/index.md)
- [Code and Compile Wiki](https://wiki.codeandcompile.com/index.md)
- [Modbus Word to Float Conversion (Big-Endian Byte Swap)](https://wiki.codeandcompile.com/factory-automation/plc/articles/modbus-word-to-float-conversion-big-endian-byte-swap.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.