Mitsubishi QD51 Programming Manual page 179

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
BIN$
Function
• Returns a character string of the binary expression of an integer.
BIN$ ( <arithmetic expression> )
Syntax
arithmetic expression
A$=BIN$(10)
Examples
Decimal
10
• The BIN$ function returns a character string for the binary expression of an integer.
Description
• If the value of <arithmetic expression> contains a fractional part, the fractional part is
rounded down to an integer, then converted.
11 - 9
BINary $
• • • •
Specify an integer to return a character string.
• • • •
Stores the character string of binary expression of
integer 10 to A$.
Binary
1010
A 16-bit can handle an integer of -32768 through 32767, and their hexadecimal expression is
as follows. If a decimal value of 32768 through 65535 is specified, it is regarded as specified
as -32768 through -1.
Decimal
Hexadecimal
65535
FFFFH
to
to
32768
8000H
32767
7FFFH
to
to
0
0000H
-1
FFFFH
to
to
-32768
8000H
Binary
1111
1111
1111
to
1000
0000
0000
0111
1111
1111
to
0000
0000
0000
1111
1111
1111
to
0000
1000
0000
MELSEC-Q
1111
0000
1111
Same
result
0000
1111
0000
11 - 9

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents