Loading

->BIN

conversion binary

The ->BIN function converts the byte array or the string on top of the stack to its binary representation.

Since the 2.8.0 version, it also converts a LONG to its 64 bits binary representation. Thus, this function and TOBIN are equivalent.

Applied on a string, ->BIN replaces 'utf-8' ->BYTES ->BIN

If the encoded content is not a valid UTF-8 representation, the resulting string will reflect that.

->BIN is available since version 1.0.6.

See also

Signatures

Examples

'Hello' ->BIN 'Hello' 'utf-8' ->BYTES ->BIN //same output