1, Q: floating point operation what kind of benefits, in the results of the operation of his small point is not allowed to carry? What is the difference between floating point operations and double fine floating point operations?

A: floating-point operations support the operation with a decimal point, which is its benefit, floating-point operations each of the number of operations accounted for two channels and double-precision floating-point operations accounted for 4 channels.

2, CP1H series, BCD in addition to the results with a decimal point, how to carry the decimal? For example / BL (435) # 1499664 # 1000 D70
So that the value obtained in D70 is 1500. How to carry it?


A: You can use the comparison remainder to achieve. / BL division obtained by the remainder stored in the D72, D73 channel, use the comparison instruction CMP to determine, if the need to carry, in the D70 channel plus # 1.

3, the floating-point multiplication of the result is BCD code?


A: The result of a floating-point instruction is a private floating-point format. You can use the FIX instruction to convert the floating-point number to hexadecimal, and then use the BCD instruction to convert the hexadecimal to BCD.

4, signed binary operation and unsigned binary operation What is the difference? Does the sign mean a negative sign? Does it include a decimal point?


A: In the binary operation of the sign, the most significant bit of the result obtained after the calculation is the sign bit. If it is 1: it is negative, 0 is the positive number
The unsigned binary data range is 0000-ffff (4-bit hexadecimal)
0 ~ 65535 (decimal number)
Signed binary data Negative range: 8000 ~ ffff (4 hexadecimal)
0 to -32768 (decimal number) Positive range: 0000 to 7fff (4-bit hexadecimal)
0 ~ 32768 (decimal number)

Leave a Reply

Your email address will not be published. Required fields are marked *