You're right. The layout of the bits after the line:
Bits X-5: 0 Bit 4: (C == TRUE && D == TRUE) Bit 3: 0 Bit 2: B == TRUE Bit 1: A == TRUE Bit 0: (X && Y)
From the most significant to the least significant bit. Perhaps something like this would be more readable (a matter of taste):
unsigned int error_bits = 0; if( X && Y ) error_bits |= 1; if( A == TRUE ) error_bits |= 2; if( B == TRUE ) error_bits |= 4; if( C == TRUE && D == TRUE ) error_bits |= 16;
Fox32 source share