Unexpected behaviour of bitwise not on a byte

@johnwasser: your answer is very helpfull.
Thanks a lot.