I mean, you are converting a byte to an int, the resulting int can never be negative. And an int that’s -1 has a hex value of 0xFFFFFFFF the same as one that’s 2^32-1. One thing that might bite you is if you are doing right-shifts at some point in the future, you probably want to use
ushr
not
shr
.
shr
will fill the left side with 1s if the number was negative.