When the application asks you for a quality value it expects to receive either,
Name Bit pattern Name Bit pattern
GOOD 00000000 PATCHED 01000000
BAD 00000010 ARITH 00000100
MISSING 00000001 IGNORE 10000000
The binary number does not HAVE to be 8 bits long i.e.
11 = 00000011