bit shift - Need some help in java Bit operations? -


i have byte array as: 00sssmmm

i want retrieve sss , mmm values int values.

can me in implementing in java ?

thanks.

i think mean

int x = ... int m = x & 0b111; int s = (x >> 3) & 0b111; 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -