In the comments - the value of b in debug:
byte b = 80; // 1010_0000 b >>>= 7; // b = 0 b after the shift was 0000_0000 , although the shift is unsigned and should have been 0000_0001 .
What is wrong and then how to get the "sign" bit?
In the comments - the value of b in debug:
byte b = 80; // 1010_0000 b >>>= 7; // b = 0 b after the shift was 0000_0000 , although the shift is unsigned and should have been 0000_0001 .
What is wrong and then how to get the "sign" bit?
Source: https://ru.stackoverflow.com/questions/599274/
All Articles