The bitwise OR compares two binary numbers one bit at a time. For each position, the result is 1 if at least one of the two bits is 1; otherwise the result is 0.
Make sure the result has a 1 in every place where either original number had a 1. A good quick check is to compare the final binary number with the inputs bit by bit.
If one number has a 1 in a certain position, the OR result must also have a 1 there. Only positions where both numbers have 0 stay 0.
Before submitting, recheck each bit separately. One small mistake in a single position changes the whole answer.
© 2023-2026 AI MATH COACH