Im puting a bitmask over a register read value and execute a logical and on the value.
what i expect is:
clear_reg_val: 00000000000000000100100000000000
My actual output is:
# reg_value is: 00000000000000000100100000001100
# mask_inverted: 11111111111111111111100000000011
# clear_reg_val: 00000000000000000100100000001000
# reg_value is: 00000000000000000100100000001100
# mask_inverted: 11111111111111111111100000000011
# clear_reg_val: 00000000000000000100100000001000
So i don't know why bit 4 of clear_reg_val becomes a '1' instead of a '0' The Python code of the function is added in the screenshot below: