toBinary
This function is used by Ignition's Expression language.
Description​
Returns a binary formatted string representing the unsigned integer argument. If the argument is negative, the binary string represents the value plus 232.
Syntax​
toBinary(number)
Parameters
- Integer number - The value to convert to binary.
Results
- String - The string form of the binary representation of the specified number.
Examples​
Code Snippet
toBinary(255) //returns "11111111"
Code Snippet
toBinary(-255) //returns "11111111111111111111111100000001"