use bitwise and. if you want to read out the sixth bit from the right, use

if (myflaginteger & (1 << 6))