The equipment log stores several states in flags. Inspection uses bit 2, worth 4 when set. Test that one position with &. Comparing the entire number to 4 would fail if another flag were on too.
inspection mask to test flags with bitwise AND. Print Inspected: 1 when the bit is set, or Inspected: 0 otherwise, using %u and a boolean comparison in the print call. Keep the initial flags unchanged.Use (flags & inspection) != 0u; cast the comparison to unsigned int for %u.