P. 1
Advanced Javascript Book

Advanced Javascript Book

4.5

|Views: 223|Likes:
Published by api-3832192

More info:

Published by: api-3832192 on Oct 18, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

11/16/2015

pdf

text

original

The bitwise NOT operator returns the reverse of its operand. Therefore, it is also
called the bit flip operator or the invert operator. All 1s are converted to 0s, and all 0s
are converted to 1s. Here is the truth table:

Table 7-7. Bitwise NOT truth table.

Bit

~Bit

0

1

1

0

For example,

~

70 000000000000000000000000010001102

=

–71 111111111111111111111111101110012

102 n Chapter 7

Note that this operator refers to all operands (integers) as 32 bits. If they are not
32-bit integers, they are converted for the operation and then converted back to their
initial form.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->