Object Pascal <-> PHP | Bitwise not

Object Pascal

not

Description

not par1
Used keywords: not

Input


Output

Examples

Object Pascal

Bitwise not the possible of use:
x := not(32 shr 2);       // x = -9
y := not x;              // y = 8
z := not(x and 5) and y;    // z = 8

Object Pascal

Even one example in what situations we can use the operation bitwise not:
not i
not$abcd
not(i and 4)
.
PHP

~

Description

~ par1
Used keywords: ~

Input


Output

Examples

PHP

Bitwise not the possible of use:
$x = ~(32 >>2);       // x = -9
$y = ~$x;              // y = 8
$z = ~($x & 5) & $y;    // z = 8

PHP

Even one example in what situations we can use the operation bitwise not:
~$i
~0xabcd
~($i & 4)

You can find it in the following collections: bitwise operators
Languages: en hu cz sk