numZeroRightBits :: Integer -> Integer
numZeroRightBits a = numBits 0 a
    where
        numBits n 0 = n
        numBits n a = case a .&. 1 of
                          0 -> numBits (n + 1) (a `shiftR` 1)
                          otherwise -> n
numZeroRightBits :: Integer -> Integer
numZeroRightBits a = numBits 0 a
    where
        numBits n 0 = n
        numBits n a = case a .&. 1 of
                          0 -> numBits (n + 1) (a `shiftR` 1)
                          otherwise -> n
numZeroRightBits a = numBits 0 a
    where
        numBits n 0 = n
        numBits n a = case a .&. 1 of
                          0 -> numBits (n + 1) (a `shiftR` 1)
                          otherwise -> n