Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
99
Bit-by-Bit Operators
These operators make it possible to set, query or reset individual bits in variables.
Operator Description
& Bit-by-Bit AND
| Bit-by-Bit OR
^ Bit-by-Bit exclusive OR
~ Bit-by-Bit inversion
<< Move bits to the left
>> Move bits to the right
Logical Operators
All logical operators follow the same rule: 0 is FALSE, all other numbers are TRUE. These
operators either generate a 0 (FALSE) or a 1 (TRUE).
Operator Description
> Greater than
>= Greater than or equal to
== Equal to
!= Not equal to
<= Less than or equal to
< Less than
&& Logical AND
|| Logical OR
! Logical inversion