Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Copilot.Language.Operators.BitWise
Description
Bitwise operators.
Documentation
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
Bitwise "and"
(.|.) :: a -> a -> a infixl 5
Bitwise "or"
complement :: a -> a
Reverse all the bits in the argument