+ 1

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

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

11th Jun 2019, 5:54 AM
Dedseć
Dedseć - avatar
3 odpowiedzi
+ 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.
11th Jun 2019, 6:37 AM
Matthias
Matthias - avatar
+ 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
12th Jun 2019, 12:38 AM
zemiak
+ 1
Thank you guys...☺☺
18th Jun 2019, 12:00 PM
Dedseć
Dedseć - avatar