eolas/zk/Bitwise_operators.md
2024-04-20 15:10:04 +01:00

728 B

id title tags created
t127 Bitwise_operators
binary
Saturday, April 20, 2024

Bitwise operators

In addition to mathematical, logical and comparison operators, there are bitwise operators. These operators execute conditions based on the actual bits of a value rather than the values that the bits are encoded to represent.

Bitwise operators are typically represented with single characters of existing operators, e.g. & instead of &&:

Bitwise operation Operator
AND &
OR (single pipe)
NOT ~

An example of using the & operator:

x =5
y = 3