+ 1
What is the uses and benefits of bitwise operator...?
I am really confused about bitwise operators....is it necessary to use them...
3 ответов
+ 4
They are usually faster and sometimes more convient to use.
However, except for "not" operations, I think you wouldn't really need them.
For example dividing a number by some power of two can take a lot of clock cycles since divison is an expensive operation.
Shifting the bits by this power yields the same result but is a lot faster, since you directly change the bit representation of that number.
+ 1
you can use it eg for bitmap graphics operations too, or for manipulating with numbers in relation to hardware representation of numbers
https://code.sololearn.com/cXggwKNQQ8kF/#java
+ 1
Thank you guys...☺☺