NumEx v0.1.0 Binary View Source
A module to perform binary operations on enumerables
Link to this section Summary
Functions
Takes an Integer, returns its binary representation
Takes an two enumerables, performs bitwise_and on them, element_wise
Takes an two enumerables, performs bitwise_or on them, element_wise
Takes an two enumerables, performs bitwise_or on them, element_wise
Takes an enumerable, performs bitwise_not on its elements
Takes two values, performs arithmetic left shift on them
Takes two values, performs arithmetic right shift on them
Link to this section Functions
Takes an two enumerables, performs bitwise_and on them, element_wise.
Examples
iex> Binary.bitwise_and([2,3,4],[4,5,6])
[0, 1, 4]
Takes an two enumerables, performs bitwise_or on them, element_wise.
Examples
iex> Binary.bitwise_or([2,3,4],[4,5,6])
[6, 7, 6]
Takes an two enumerables, performs bitwise_or on them, element_wise.
Examples
iex> Binary.bitwise_xor([2,3,4],[4,5,6])
[6, 6, 2]
Takes an enumerable, performs bitwise_not on its elements.
Examples
iex> Binary.invert([32, 5, 1])
[-33, -6, -2]
Takes two values, performs arithmetic left shift on them.
Examples
iex> Binary.left_shift(2, [4,5,6])
[32, 64, 128]