Search code examples
binaryhex

Convert hexadecimal to binary


I am converting the hexadecimal number 0XA85D10 to binary. However, I am told you can convert this number without using paper or a calculator.

Is this possible?

Thanks


Solution

  • Easily. Each digit in a hex number translates to 4 digits in a binary number, so you only need to know the binary numbers from 0 to f, or 0000 to 1111.

    As an example:

    0xc3e2
    
    c = 12 decimal = 1100
    3 =              0011
    e = 14 decimal = 1110
    2 =              0010
    

    Then just string them together.

    0xc3e2 = 1100001111100010 binary