Problem Description

Use bitwise AND with 1 to check even/odd instantly.
Real Life: Fastest way to check even/odd in programming.

Step-by-Step Logic:
1. Last bit of even numbers is 0
2. Last bit of odd numbers is 1
3. num & 1 gives last bit
4. If result is 0, number is even

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next