A collection of binary helper functions.

Constructors

Methods

Constructors

Methods

  • Interpretes the given string as a binary number.

    Parameters

    • s: string

      A string that represents a binary number.

    Returns number

    The parsed number.

  • Creates a binary string representation of the given number.

    Parameters

    • n: number

      A number.

    • minBits: number = 64

      The minimum length of the string.

    Returns string

    The binary representation.