- or download this
$_[0] & 0xff # A bitmask to gets the last (8 bit) byte from the intege
+r.
# It has exactly the same result as $_[0] % 256
>> 5 # bitshift the result of the above so all but
# the 3 MSB drop off the end.
- or download this
perl -le'print join "\t", $_, (unpack "B*", pack "I*", $_),($_ & 0xFF)
+ >> 5 for (0..256)'
- or download this
0 00000000000000000000000000000000 0
1 00000000000000000000000000000001 0
...
.
255 00000000000000000000000011111111 7
256 00000000000000000000000100000000 0