An idiom in C (and C++, but less so) for translating a zero/nonzero value to 0/1.
int bit_10_set = !! (x & 0x400);