Clearing the most significant bit from an integer – codegolf.stackexchange.com

Input

The input is a single positive integer n

Output

The output isn with its most significant bit set to 0.

Test Cases

1 -> 0
2 -> 0
10 -> 2
16 -> 0
100 -> 36
267 -> 11
350 …

For Get Answer – Click here

Leave a Reply

Your email address will not be published. Required fields are marked *