The event flags in an Event Group may be tested by any execution entity in either the Foreground or the Background. However, only Background tasks can pend. Testing of the event flags in an Event Group is performed by Boolean AND or OR logic with a application-defined bit mask. For the AND condition to be TRUE, all event flags in a logic 1 state must match the corresponding bits in the bit mask that are also in a logic 1 state. For the OR test to be TRUE, any event flag in a logic 1 state must match the corresponding bit in a logic 1 state in the test mask.