fullAdder :: Bits a => a -> a -> a -> (a, a)
fullAdder x y c_in = (s, c_out)
    where s = (x `xor` y) `xor` c_in;
          c_out = ((x .&. y) .|. (x .&. c_in)) .|. (y .&. c_in)
fullAdder :: Bits a => a -> a -> a -> (a, a)
fullAdder x y c_in = (s, c_out)
    where s = (x `xor` y) `xor` c_in;
          c_out = ((x .&. y) .|. (x .&. c_in)) .|. (y .&. c_in)
fullAdder x y c_in = (s, c_out)
    where s = (x `xor` y) `xor` c_in;
          c_out = ((x .&. y) .|. (x .&. c_in)) .|. (y .&. c_in)