I want to use Data.Bits bitwise operators on a binary data. What data type I need to use? I wrote this function for example :
ch :: Int8 -> Int8 -> Int8 -> Int8
ch x y z = (x .&. y) `xor` ((complement x) .|. z)
I want to get as input binary type or at least String
(not Int
) but still use Data.Bits
So what I need to change to use it like this for example? :
ch 11111111 101110011 10110101