You can add brackets around the separate operations and apply them in order. e.g.
!(!(~x))
i.e. !! is 2 NOT's
What happens to some value if you perform one NOT is:
If x == 0
then !x == 1
, otherwise !x == 0
So, if you would perform another NOT, you invert the truth-value again. i.e.
If x == 0
then !!x == 0
, otherwise !!x == 1
You could see it as getting your value between 0 and 1 in which 0 means: "no bit of x is '1'", and 1 means: "at least one bit of x is '1'".
Also, x & 0xFF
takes the least significant byte of your variable. More thoroughly explained here: