Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Copilot.Language.Operators.BitWise
Contents
Description
Bitwise operators applied on streams, pointwise.
Documentation
class Eq a => Bits a where Source #
The Bits
class defines bitwise operations over integral types.
- Bits are numbered from 0 with bit 0 being the least significant bit.
Minimal complete definition
(.&.), (.|.), xor, complement, (shift | shiftL, shiftR), (rotate | rotateL, rotateR), bitSize, bitSizeMaybe, isSigned, testBit, bit, popCount
Methods
(.&.) :: a -> a -> a infixl 7 Source #
Bitwise "and"
(.|.) :: a -> a -> a infixl 5 Source #
Bitwise "or"
complement :: a -> a Source #
Reverse all the bits in the argument
Instances
(.<<.) :: (Bits a, Typed a, Typed b, Integral b) => Stream a -> Stream b -> Stream a Source #
Shifting values of a stream to the left.
(.>>.) :: (Bits a, Typed a, Typed b, Integral b) => Stream a -> Stream b -> Stream a Source #
Shifting values of a stream to the right.