I have a variable that is initialized to a hexadecimal value. What I am trying to do is break the value into several parts. So pretty much my variable is set to something like 0x22510064 which is 0010 0010 0101 0001 0000 0000 0110 0100 in binary and I want to copy the first six bits into another variable(001000). I am not sure if I have to write code that will convert the hex into binary or if I could I just leave it in the hex format.
What I was thinking about doing accomplish the partition was to copy the entire binary to the other variables and then deleting the parts I don't want.