https://kotlinlang.org logo
a

Animesh Sahu

01/12/2020, 12:33 PM
How do i extract different data from the binary representation of an int? There are mode, sadc, badc, and gain(pg0, pg1), brng. I want to read/write them , and if possible change some binary digit, like changing 11th and 12th digits only or 8th 9th and 10th, and so on with/without reading/parsing like that.?
k

Kroppeb

01/12/2020, 2:43 PM
You can use bitwise operators
and
and
or
a

Animesh Sahu

01/12/2020, 2:49 PM
@Kroppeb ah yeah i just thought and does like xor and got confused now i understand 😃