Binary

Description: Represents binary data
Annotation: binary
Literal Syntax: 0x[ffffffff] - hex-based binary representation
0o[1234567] - octal-based binary representation
0b[10101010101] - binary-based binary representation
Casts: into binary
See also: Types of data - Binary

Additional Language Notes

  1. Incomplete bytes are left-padded with zeros.

  2. Spaces can be used to improve readability. For example, 0x[ffff ffff].

Common commands that can be used with binary

  • into binary
  • bits subcommands (see help bits for a list)
  • bytes subcommands (see help bytes for a list)
  • encode
  • take
  • chunks to split binary into individual bytes or groups

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.