Need help with coding :

"val" is a boolean, it can only be 1 or 0. Guess it flips at 512.