I have a number in hex that I need to convert into binary, to be able to perform bitwise operations on it. The problems is that all the functions I found that convert numbers into binary - like format() - return strings, but I need the number in a data type that can be manipulated like binary.
Found fomrat(), but that returns Strings. I found int(), which can turn it into an integer, but can't find an equivalent for binary.
What I'm trying to do is for example: add 1 to 0b0001 and get the sum as 0b0010 and I did not find a way of doing it when 0b0001 is a String.