Search code examples
c++binaryexecutablemachine-code

Why aren't EXE's in binary?


Why is it that if you open up an EXE in a hex editor, you will see all sorts of things. If computers only understand binary then shouldn't there only be 2 possible symbols seen in the file? Thanks


Solution

  • The hexadecimal values are interpreted binary values in memory. The software only make it a bit more readable to human beings.

    0000 = 0
    0001 = 1
    0010 = 2
    0011 = 3
    0100 = 4
    0101 = 5
    0110 = 6
    0111 = 7
    1000 = 8
    1001 = 9
    1010 = 10 A
    1011 = 11 B
    1100 = 12 C
    1101 = 13 D
    1110 = 14 E
    1111 = 15 F