Binary
| Description: | Represents binary data |
| Annotation: | binary |
| Literal Syntax: | 0x[ffffffff] - hex-based binary representation |
0o[377 001] - octal-based binary representation | |
0b[10101010101] - binary-based binary representation | |
| Casts: | into binary |
| See also: | Types of data - Binary |
Additional Language Notes
Incomplete bytes are left-padded with zeros. Spaces are ignored, so the padding applies to the literal as a whole:
0x[1 23] | to nuon # => 0x[0123]Spaces can be used to improve readability. For example,
0x[ffff ffff].In an octal literal, each byte is written as three octal digits between
000and377.
Common commands that can be used with binary
into binaryformat bitsto show the bits of a binary value (or a number) as a string of0s and1sbitssubcommands (seehelp bitsfor a list)bytessubcommands (seehelp bytesfor a list)encode,decodetakechunksto split binary into individual bytes or groups