Files
postgrest/docs/Bits.md
T
2016-12-10 13:28:32 +00:00

1.5 KiB

Bits

Bit Operations

.&.

(.&.) :: Bits a => a -> a -> a

Example:

.|.

(.|.) :: Bits a => a -> a -> a

Example:

xor

xor :: Bits a => a -> a -> a

Example:

complement

complement :: Bits a => a -> a

Example:

shift

Example:

shift :: Bits a => a -> Int -> a

Example:

rotate

rotate :: Bits a => a -> Int -> a

Example:

zeroBits

zeroBits :: Bits a => a

Example:

bit

bit :: Bits a => Int -> a

Example:

Bit Testing

setBit :: Bits a => a -> Int -> a
clearBit :: Bits a => a -> Int -> a
complementBit :: Bits a => a -> Int -> a
testBit :: Bits a => a -> Int -> Bool
isSigned :: Bits a => a -> Bool

Bit Size

bitSize :: Bits a => a -> Int
popCount :: Bits a => a -> Int

Bit Shifting

shiftL :: Bits a => a -> Int -> a
shiftR :: Bits a => a -> Int -> a

Bit Rotation

rotate :: Bits a => a -> Int -> a
rotateL :: Bits a => a -> Int -> a
rotateR :: Bits a => a -> Int -> a

Byte Swapping

byteSwap16 :: Word16 -> Word16
byteSwap32 :: Word32 -> Word32
byteSwap64 :: Word64 -> Word64