import Data.Bits import Data.ByteString ( hGet ) import System.IO ( stdin ) import Unsafe.Coerce main :: IO () main = do b1 <- unsafeCoerce $ hGet stdin 1 b2 <- unsafeCoerce $ hGet stdin 1 putStrLn $ show $ twiddle b1 b2 --0b10010001 0b00000010 twiddle :: Word -> Word -> Word twiddle w1 w2 = w1 .|. 0b00000100 .|. w2 .|. 0b11000001