For example:
Bitwise NOT 0111 (decimal 7) = 1000 (decimal 8)
Bitwise NOT is equal to the two's complement of the value minus one. If two's complement arithmetic is used, then Bitwise NOT x = -x − 1.
For unsigned integer, Bitwise NOT of a number is the "mirror reflection" of the number across the half-way point of the unsigned integer's range.
For example, for 8-bit unsigned integers:
Bitwise NOT x = 255 - x
which can be visualized on a graph as a downward line that effectively "flips" an increasing range from 0 to 255, to a decreasing range from 255 to 0. A simple but illustrative example use is to invert a grayscale image where each pixel is stored as an unsigned integer.