Conversion Functions in Integrator
The following Integrator Calc functions provide decimal, binary, octal, and hexadecimal conversion capabilities.
Given a non-negative integer number, returns a binary representation of the number.
binary(value : numeric) : numeric
For example:
binary(256) returns 100000000
Given a string representing a non-negative integer in base base, converts it into a decimal number. base must be an integer from 2 through 16. If base is not supplied, 16 (hexadecimal) is assumed. If string is not a valid representation of the given base, this function returns -1.
decimal(value : string, base : numeric) : numeric
For example:
decimal(a0) returns 160
decimal(ff) returns 255
decimal(100, 2) returns 4
decimal(177, 8) returns 127
Given a non-negative integer number, returns a hexadecimal representation of the number.
hex(value : numeric) : numeric
For example:
hex(64) returns 40
Given a non-negative integer number, returns an octal representation of the number.
octal(value : numeric) : numeric
For example:
octal(27) returns 33