Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 651 Bytes

README.md

File metadata and controls

39 lines (27 loc) · 651 Bytes

Binary

Work with sequences of binary numbers.

>>> [ 1, 0, 0, 0 ]
..>   |> Binary.fromIntegers
..>   |> Binary.shiftRightBy 1
..>   |> Binary.toDecimal
4

>>> 4
..>   |> Binary.fromDecimal
..>   |> Binary.shiftLeftBy 1
..>   |> Binary.toIntegers
[ 1, 0, 0, 0 ]

Convertors

  • Hexadecimal
  • Decimal
  • Integers
  • Booleans
  • Strings

Operations

  • Basics: and, or, xor, not (complement)
  • Shifting: left & right shift, left & right rotation
  • Maths: add, subtract

Utilities

  • Collections: append, chunksOf, concat, dropLeadingZeros
  • Sizing: ensureBits, makeIsomorphic, width