An idiom in C (and C++, but less so) for translating a zero/nonzero value to /1.

int bit_10_set = !! (x & 0x400);
It's a nice exercise to work out why it works.