The conversion is calculated by dividing the base 10 representation by 2 and applying the remainder in the reverse order. I do it in my head, it seems to work.
So you say what 0xAAAA5555 looks 0xAAAA5555
I just understand how A looks and 5 looks by doing
A = 10 10 / 2 = 5 r 0 5 / 2 = 2 r 1 2 / 2 = 1 r 0 1 / 2 = 0 r 1
so I know that A looks like 1010 (note that 4 fingers is a good way to remember leftovers!)
You can group 4-bit blocks together, so AA is 1010 1010. To convert the binary back to hex, I go back to base 10 again, adding authority 2. You can do this by forming blocks of 4 bits (padding with 0s ) and a string of results.
therefore, 111011101 is 0001 1101 1101 , which is (1) (1 + 4 + 8) (1 + 4 + 8) = 1 13 13 , which is 1DD
source share