bitwise operators


do these operators work only for numbers less than 16 bits?

if no, then how it will perform these operations?

No. AND operator works on integers as well.

How? The same way it used to do.

What is your query exactly?

If you want a comparison between arithmetic and bitwise operations in performance aspects, then I would say it hardly matters. Because ultimately, the compiler optimizes your code(operations) so irrespective of which way you used, you will hardly see any performance difference. See here for some good examples for what can be achieved.

1 Like