Bitwise Operators:
Bit Shifting
Bit Flags:
int alive = 1;
int tired = 2;
Using Bit Flags to pack multiple pieces of knowledge into a single variable
int student_status= alive | tired;
Bit Masking
allows us to detect which bits are set in a variable
This is useful when packing multiple pieces of data into a single variable, and then checking to see what has been packed.
RGBA Colour