Using bit operations

If the programming language supports bit operations, perform the following steps:

  1. Select one of the following values, according to the type of encoding required: Call the value A.
  2. Combine the Encoding field with A using the bitwise AND operation; call the result B.
  3. B is the encoding required, and can be tested for equality with each of the values that is valid for that type of encoding.