7. Clear the Bit in an 8-bit Register

You are working with an 8-bit control register. Write a function to clear (set to 0) the bit at a given position without affecting other bits.

Use 0-based indexing for bit positions (0 = LSB, 7 = MSB).


Example 1

Input: reg = 0b00000111, pos = 0 
Output: 0b00000110


Example 2

Input: reg = 0b00001111, pos = 3 
Output: 0b00000111
Loading...

Input

7 0

Expected Output

6