− | These are examples of converting an eight-bit two's complement number to decimal. To do this, you first check if the number is negative or positive by looking at the sign bit. If it is positive, simply convert it to decimal. If it is negative, make it positive by inverting the bits and adding one. Then, convert the result to decimal. The negative of this number is the value of the original binary.
| + | To change the '''sing''' of a binary number you must invert it add 1 to it. In the case of signal strength, you don't need both register values to do so, only the second one (register 4), which is, in our example, 65477. When converted to binary it's: '''65447 → 1111 1111 1100 0101'''. Next, we'll to invert it and add 1: |
− | First, note that the number is negative, since it starts with a 1.
| + | [[File:Configuration examples modbus negative binary.png]] |