answersLogoWhite

0

Why is compiling necessary?

Updated: 8/10/2023
User Avatar

Wiki User

11y ago

Best Answer

Compilers are only necessary for programmers; ordinary users do not require them. A compiler is a program which converts a high-level source input into a lower-level source output, reducing the amount of abstraction. In most cases the output is native machine code and/or an assembly source, however there are some exceptions, such as the Java compiler which outputs Java byte code, and cross-language compilers such as C++ to C compilers.

Machine's do not understand either high-level source code or low-level assembly code, they only understand their own native machine code. Thus conversion to machine code is necessary. Once converted to machine code, no further translation is necessary.

Assembly sources must be converted using an assembler, however assembly is a machine-dependent language (it is non-portable). High-level languages are generally portable and are either compiled or interpreted. Interpretation requires a runtime program to perform the conversion while the source code is executing and performs poorly compared to a native machine code program. Java is both compiled and interpreted. That is; Java source code compiles to Java byte code which is suitable for interpretation by the Java virtual machine.

It is not possible to compile a low-level source to produce a high-level output. For example, you cannot convert C to C++ using a compiler, just as you cannot convert assembly language to C. Compilers can only reduce the amount of abstraction in the source code, not increase it. If you want to add more abstraction, you need to do so manually.

User Avatar

Wiki User

6y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

Because no one wants to transfer all of that code into a different code manually jezzz so we used a compiler to do it.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why is compiling necessary?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the practice of compiling dictionaries?

Lexicography


Stages in data processing?

compiling and organizing information


What is a sentence with the word compile?

I was compiling work to have published.


What is the difference between compiling and interpreting?

Compiling is a form of 'gathering' information to come to a solution. Interpreting is seeing the information already presented, and then making a decision or judgment based on that. (:


What is the present participle of compile?

Compiling is the present participle of compile.


Which part of the programming process takes the longest to complete?

compiling


Sentence for the word lexicography?

Lexicography is the practice of compiling dictionaries.


When does a program show a compiling error?

When a program contains a compiler error, the compiler will detect it, preventing the program from compiling. Compiler errors must be fixed before a program will compile successfully.


Which organisation is responsible for compiling the catalogues of south African books?

SACat


A condensed summary compiling information about a particular field of knowledge is a?

Compendium


What agency is responsible for compiling the NCVS?

Bureau of Justice Studies (BJS)


What is a condensed summary compiling information about a particular field of knowledge?

Compendium