Why aren't EXE's in binary?

前端 未结 8 692
轻奢々
轻奢々 2021-01-12 03:02

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

8条回答
  •  耶瑟儿~
    2021-01-12 03:22

    You're confusing content with representation. Every single file on your computer can be represented with binary (1s and 0s), and indeed that's how it's generally stored on disk (alignment of magnetic particles) or RAM (charge).

    You're viewing your exe with a "hex editor", which represents the content using hexadecimal numbers. It does this because it's easier to understand and navigate hex than binary (compare "FA" to "11111010").

    So the hexadecimal symbol "C0" represents the same value as the binary "11000000", "C1" == "11000001", "C2" == "11000010", and so on.

提交回复
热议问题