Help with syntax

Status
Not open for further replies.
Solution
The expression on the right tests whether the leftmost bit of byte_Y is set. If so it sets bit_X to 1, otherwise it sets it to 0.

byte_Y & 0x80

Is the test (0x80 is 10000000 in binary).

(A ? 1 : 0)

Is the conditional.
The expression on the right tests whether the leftmost bit of byte_Y is set. If so it sets bit_X to 1, otherwise it sets it to 0.

byte_Y & 0x80

Is the test (0x80 is 10000000 in binary).

(A ? 1 : 0)

Is the conditional.
 
Solution
Status
Not open for further replies.