Questions tagged [bitwise-operators]

For questions relating to bitwise operators, which operate on the individual bits of integer types.

Filter by
Sorted by
Tagged with
9 votes
2 answers

What should be the precedence of the bitwise operators relative to each others?

In C, the relative precedence of bitwise operators is as follows, from high to low precedence: ...
5 votes
1 answer

Should bitwise operations have dedicated operators? [closed]

Many programming languages have built-in support for bitwise operations, often using C's syntax: ~ = NOT & = AND ...
12 votes
6 answers

What are the disadvantages of this far-fetched idea: All integers can be treated as boolean arrays?

I do not know of any languages that support this idea but I just thought that since numbers are just bits, why should we not be able to access those bits directly? In most languages such as C or C++, ...