11 - 9 11 - 9
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
BIN$
Function
BINary $
• Returns a character string of the binary expression of an integer.
BIN$ ( <arithmetic expression> )
Syntax
arithmetic expression
• • • •
Specify an integer to return a character string.
A$=BIN$(10)
• • • •
Stores the character string of binary expression of
integer 10 to A$.
Examples
Decimal
10
Binary
1010
Description
• The BIN$ function returns a character string for the binary expression of an integer.
• If the value of <arithmetic expression> contains a fractional part, the fractional part is
rounded down to an integer, then converted.
Decimal
Hexadecimal
Binary
Same
result
65535
32768
32767
0
-1
-32768
FFFFH
8000H
7FFFH
0000H
FFFFH
8000H
1111
1111
1111
1111
1111
1111
1111
1111
1111
1111
0111
1111
1000
0000
0000
0000
1000
0000
0000
0000
0000
0000
0000
0000
to
to
to
to
to
to
to
to
to
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.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...