Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Language Reference Guide
    • Readme
    • Types in the Nu Language
      • Basic Types
        • Any
        • Boolean
        • Integer
        • Float
        • Filesize
        • Duration
        • Datetime
        • Range
        • String
        • Record
        • List
        • Table
        • Closure
        • Nothing
        • Binary
        • Glob
        • Cell-Path
      • Other Data Types

        • Types that cannot be used to declare variables
          • Path
        • Types which are not declarable
          • Error
          • CustomValue
          • Block
      • Type signatures
      • Commands that interact with types
    • Operators
    • Flow control
      • if/else
      • loop
      • while
      • match
      • try/catch
      • break
      • return
      • continue
    • Filters
      • each and par-each
      • Filters to select subsets of data
      • where and filter
      • Understanding the difference between get and select
    • Custom Commands
    • Declarations
    • Variable Scope
    • Strings and Text Formatting
    • Helpers and debugging commands
    • Pipelines
    • MIME Types for Nushell

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 bits
  • bits subcommands (see help bits for a list)
  • bytes subcommands (see help bytes for a list)
  • encode
  • take
Edit this page on GitHub
Contributors: NotTheDr01ds, fdncred
Prev
Nothing
Next
Glob