EasyManua.ls Logo

turck BL20 Series - Page 511

turck BL20 Series
537 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
509
2020/09
Conversion of the decimal values into hexadecimal/ binary values
The decimal value can easily be converted into hexadecimal value. The two’s complement for the
16 bit values corresponds to the dual numbers in the positive range.
The conversion of negative decimal values into hexadecimal values is more complicated, because
the values have to be coded as a two’s complement. The following example explains the method of
conversion:
The 4-digit hexadecimal number for the voltage value -6 V is searched:
decimal value = 3276.8 1/V× (-6 v) = -19660.8
Some calculators can be used to convert negative decimal values directly in a hexadecimal value
coded as two’s complement.
Without such a calculator, convert the value as follows:
1 Convert the amount of the negative decimal value to a binary number:
|-19660,8| = 19660,8 100.1100.1100.1100
2 Fill the 16 bit of the binary number with ”0”:
100.1100.1100.11000100.1100.1100.1100
3 Invert the 16-digit binary number:
0100.1100.1100.1100 1011.0011.0011.0011
4 Add ”1” to this inverted number:
1011.0011.0011.0011
0000.0000.0000.0001
1011.0011.0011.0100
5 The number is now coded as a two’s complement and can be converted into a hexadecimal num-
ber.
1011.0011.0011.0100 B334
6 The result is:
19660.8 B334

Table of Contents

Related product manuals