Use ~ bitwise operator.