answersLogoWhite

0

A computer program is a list of instructions written in a special language that the computer understands. It tells the computer which operations to perform and in what sequence to perform them. Programs can be written in various "languages", such as C/C++, Java, Assembly, etc., which will then be converted to machine language by one of two pieces of software, a compiler or an interpreter.

A computer program is a sequence of one or more instructions and their operands written in machine code that a computer can understand. Programs are usually written in a high-level language that is easier for humans to understand, which the computer itself can then compile (using another program) into machine code that it understands. Once a program is compiled it can then be executed. Machine code can also be hand-crafted using a low-level language known as Assembler. Every machine has its own version of Assembler, specific to its particular architecture. By contrast, Disassembly is the process of reverse-engineering machine code in order to reproduce the original Assembler instructions. However, the resulting code will lack the comments and symbolic code that were used by the original author of the program (all of which were stripped out during assembly).

Some computer programs are not compiled into machine code. These programs are designed to be run within another program (which is itself machine coded). For instance, Java programs are compiled into byte code suitable for the Java virtual machine (JVM). The JVM is a machine code program that understands the byte code instructions and translates them into suitable machine code. This is known as interpretation, thus Java is an interpretive high-level language.

As a result of this interpretation, Java programs are very much slower than their equivalent machine coded programs. By contrast, C++ is compiled to native machine code and is therefore many times faster than an equivalent Java program. However, C++ programs must be compiled separately for each supported platform, whereas Java will run on any platform that runs a JVM implementation, without any need to recompile.

User Avatar

Wiki User

12y ago

What else can I help you with?