What is the uses and benefits of bitwise operator...?

I am really confused about bitwise operators....is it necessary to use them...

6/11/2019 5:54:27 AM


3 Answers

New Answer


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.


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


Thank you guys...☺☺