you can use the bits of an integer to represent the flags....
OR (| not ||) their status with 0x01, 0x02, 0x04, or 0x08 etc to set flags,
AND (& not &&

their status with them to check them...
thats how a lot of things work in the emu and everywhere else in programming, it works very well.