EasyManua.ls Logo

Mitsubishi Electric melsec q03ud(E)cpu - Page 81

Mitsubishi Electric melsec q03ud(E)cpu
622 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...
2 - 42
(b) Calculation example
Calculation examples are shown below. (The "X" in (nnnnnn) x indicates the numeral system used.)
1) Storing "10"
(10)
10
(1010)
2
(1.010000..... 2
3
)
2
Sign: Positive 0
Exponent: 3 401
H (100 0000 0001)
2
Mantissa: (0100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000)
2
In this case, the value will be encoded as 4014000000000000H.
2) Storing "0.75"
(0.75)
10
(0.11)
2
(1.100..... 2
-1
)
2
Sign: Positive 0
Exponent: -1 3FDH (011 1111 1101)2
Mantissa: (1000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000)2
In this case, the value will be encoded as 3FD8000000000000H.
Values after the decimal point (in binary) is calculated as follows.
(0.1101)
2
(0.1101)
2 = 2
-1
+ 2
-2
+ 2
-4
= 0.5 + 0.25 + 0.0625 = (0.8125)10
0.1101
The bit represents 2
-1
The bit represents 2
-2
The bit represents 2
-3
The bit represents 2
-4
Sign Exponent Mantissa
0 100000000010100000000000000000000000000000000000000000000000000
4 014000000000000
Sign Exponent Mantissa
0 011111111011000000000000000000000000000000000000000000000000000
3 FD8000000000000
Example

Table of Contents

Related product manuals