if (inputs & x ==0)
== has higher precedence than & which means that the above is equivalent to
if (inputs & (x ==0))
Try
if ((inputs & x) ==0)
if (inputs & x ==0)
== has higher precedence than & which means that the above is equivalent to
if (inputs & (x ==0))
Try
if ((inputs & x) ==0)