I started to learn principle of programming lately. There are some concepts that are abstract to me at the moment. I would like to know what a "machine" is in terms of compiling. Or an example of machine would also be good for me to understand that. How to understand the machine is "it is itself the foundation that other things must stand on"?

有帮助吗?

解决方案

In this context, a machine is anything which executes code in the broadest sense of the word. This prominently includes physical computing hardware (from microcontrollers to smartphones to desktop computers to supercomputers), but also software which performs the same function, such as virtual machines/emulators/interpreters/what-have-you.

其他提示

Machine in this meaning would be the actual physical computer. In terms of compiling: every code you write needs to be compiled to the machine code in the end. More precisely it is the microprocessor of the computer and all inputs to the CPU must be in machine language. When you program in high level languages (C, Java etc.) all machine code stuff is handled for you by compilers (or also by virtual machine/emulator).

As CPU is the one doing all calculations and program execution, it and the language it understands is the foundation on top of which other languages are built. In broader sense machine could be also the virtual machine which runs on top of physical machine and it depends on the perspective.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top