Kaishav65 / Hacktoberfest2023

Join Hactoberfest 2023, Make you Pull Request and contribute to open source. Raise Genuine PRs, Your PRs will be accepted. Don't forget to spread love and if you like give us a ⭐️
25 stars 217 forks source link

Even_or_Odd_Bitwise.cpp #164

Open ADARSH-863 opened 11 months ago

ADARSH-863 commented 11 months ago

This C++ program uses bitwise AND operator to quickly determine if a given number is even or odd. By performing a bitwise AND operation between the input number and 1, the program checks the least significant bit. If the result is 0, the number is even; if it's 1, the number is odd. This bitwise operation efficiently detects the parity of the number, providing a concise way to identify its even or odd status.