unsigned int error_bits =
( X && Y )
| ( A == TRUE) << 1
| ( B == TRUE) << 2
| ( C == TRUE &&
D == TRUE) << 4;
I believe the general concept here is to set each of the 32 bits to true or false based on certain conditions – with each bit representing an error of something.
With the syntax above, I’m a little confused as to what is being set, shifted and where/why.
Any clarification is helpful.
Thank You.
You are right. The layout of the bits after the line are:
From most significant to least significant bit.
Propably something like this would be more readable (a matter of taste):