Flag Checking Practice (8-bit)

Flashcard

Is the flag (Mask) set within the Value? (Check if (Value & Mask) != 0)

How to calculate: Perform a Bitwise AND between Value and Mask. If the result is *not zero*, it means at least one bit position that was 1 in the Mask was also 1 in the Value, so the flag is considered "set". If the result is zero, the flag is not set.
Example: Value = 0x0D (00001101), Mask = 0x04 (00000100). 0x0D & 0x04 results in 0x04 (00000100). Since this is not zero, the flag is set (Yes).
Example: Value = 0x0D (00001101), Mask = 0x02 (00000010). 0x0D & 0x02 results in 0x00 (00000000). Since this is zero, the flag is not set (No).

?