11.5 The Ones Complement Operator (NOT) ()

I l @ ve RuBoard

11.5 The Ones Complement Operator (NOT) (~)

The NOT operator (also called the invert operator or bit flip) is a unary operator that returns the inverse of its operand, as shown in Table 11-6.

Table 11-6. NOT operator

Bit

~Bit

1

1

Here's an example of NOT performed on a byte:

 c=      0x45      01000101 ________________________________ ~c=     0xBA      10111010 
I l @ ve RuBoard


Practical C++ Programming
Practical C Programming, 3rd Edition
ISBN: 1565923065
EAN: 2147483647
Year: 2003
Pages: 364

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net