Search code examples
programming-languagesexevm-implementationmachine-code

What's machine readable code's language?


Basically, what I'm asking is what's the language that the computer understands... I have seen this post explaining a little https://www.quora.com/How-are-exe-files-created-And-what-programming-language-are-used-in-creating-them but it only refers to it as "machine readable code".

I wanna know what all the programming languages are converted to when compiled. Is it possible to code knowing that "machine language" without using a compiler?

It's says it converts to "operating system" or "execution engine (virtual machine)" but is that it, can I take the notepad and just writte there that, save it as .exe and it will do what it says?

If you can't create a .exe without .exe then how do you do it?

Like, can I create a stand-alone windows application without any program like Visual Studio/Visual Basic?


Solution

  • The computer executes machine-code. That depends on its CPU. That's the reason you need to compile software for a special CPU-class (e.g. i386, SPARC, ...). Because they understand different machine-codes or they are built up very differently (e.g. RISC vs. CISC).

    Between the highest level of program-code and the lowest level of machine-code there can be multiple layers between (e.g. assembler, object-code, ...). Layering (hiding of complexity in the layer below) is one of the most important concepts in technology.

    And basically we differ between compiler and interpreter. The compiler translates a high-level code (from the human) to a low-level (e.g. machine-code). The interpreter is a running program that takes its input as commands. So it reads the code and acts as requested.

    Normally interpreters are slower but more independent regarding the platform (if you have the the interpreter-program on multiple platforms). The compiled program is much quicker but needs to be special for every CPU.

    EXE is a format of machine-code. There are several different regarding the operating system.

    I already mentioned assembler. It is a bit above machine-code and therefore readable for humans. In disassembling you take a program (a machine-code binary) and translate is into assembler. Machine-code and assembler is a pretty straight mapping. So 1 line in assembler will produce - lets say - 1 to 5 lines in machine code. 1 line in a high-level language (e.g. C++) will produce much more lines in machine-code. So in disassembling you try to understand the program and can use that information for further needs (e.g. how is a unlock-code expected, cracking, ...).