Swap two bits in an integer

Swapping 2 binary bits in number

We assume that given position are valid from (0 to size of integer). Here given code implementation process.


Please share your knowledge to improve code and content standard. Also submit your doubts, and test case. We improve by your feedback. We will try to resolve your query as soon as possible.

New Comment

© 2022, kalkicode.com, All rights reserved