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

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -