updating oE not_bits
not_bits
<builtin> function not_bits(object a)
performs the bitwise NOT operation on each bit in an object. A bit in the result will be 1 when the corresponding bit in x1 is 0, and will be 0 when the corresponding bit in x1 is 1.
Parameters:
 a : the object to invert the bits of.
Returns:
An object, the same shape as a. Each bit in an atom of the result is the reverse of the corresponding bit inside a.
Comments:
The argument to this function may be an atom or a sequence.
The argument must be representable as a 32bit number, either signed or unsigned.
If you intend to manipulate full 32bit values, you should declare your variables as atom, rather than integer. Euphoria's integer type is limited to 31bits.
Results are treated as signed numbers. They will be negative when the highestorder bit is 1.
A simple equality holds for an atom a: a + not_bits(a) = 1.
Example 1:
a = not_bits(#000000F7)  a is 248 (i.e. FFFFFF08 interpreted as a negative number)
See Also:
Not Categorized, Please Help
