I have a hexadecimal number that I need to convert to binary, shift the bits and then convert back to decimal again. Let me explain with examples,
The starting hexadecimal number is 5006048ACCC86A32.
I strip off the first 7 digits (5006048), using =RIGHT() function, leaving the remaining hex characters..
A C C C 8 6 A 3 2
I then need to convert each character , one by one, to their binary equivalent, in this case it's ...
1010 1100 1100 1100 1000 0110 1010 0011 0010
..then shift the binary digits two places to the left, and take only the first seven bits. So the binary string becomes
1011 0011 0011 0010 0001 1010 1000
..this then needs to convert each bit back to hex, giving...
B 3 3 2 1 A 8
..finally converting this hex number to decimal to arrive at the answer
B3321A8 hex = 187900328
I can't find out a combination of functions to do this, or should it be VBA ? Any help is greatly appreciated.
The starting hexadecimal number is 5006048ACCC86A32.
I strip off the first 7 digits (5006048), using =RIGHT() function, leaving the remaining hex characters..
A C C C 8 6 A 3 2
I then need to convert each character , one by one, to their binary equivalent, in this case it's ...
1010 1100 1100 1100 1000 0110 1010 0011 0010
..then shift the binary digits two places to the left, and take only the first seven bits. So the binary string becomes
1011 0011 0011 0010 0001 1010 1000
..this then needs to convert each bit back to hex, giving...
B 3 3 2 1 A 8
..finally converting this hex number to decimal to arrive at the answer
B3321A8 hex = 187900328
I can't find out a combination of functions to do this, or should it be VBA ? Any help is greatly appreciated.