answersLogoWhite

0

How do you change source code into machine code?

Updated: 8/20/2019
User Avatar

Wiki User

10y ago

Best Answer

A program called a compiler, or sometimes an assembler (depending on the programming language) does this for you. You write the source code, then invoke the program that will convert this into machine language.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you change source code into machine code?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is pre processing?

A preprocessing directive is a directive that programmers can write into their code to make the compiler do something when compiling the source code to machine code. It will not actually become machine code but rather change the source code before it is sent to the compiler.


What is a pre-processer directive?

A preprocessing directive is a directive that programmers can write into their code to make the compiler do something when compiling the source code to machine code. It will not actually become machine code but rather change the source code before it is sent to the compiler.


Can object code and source code of a compiler be in same language?

No, they are two different things, source code is human-readable and machine code is machine-readable (though it can be represented in assembly)


What does a compiler perform?

A compiler converts high-level source code into native machine. In the case of Java, source code is compiled to Java byte code suitable for interpretation by the Java virtual machine which produces the machine code.


An assembler converts source program into?

An Assembler converts an assembly language source code into machine-specific code.


When you compile source code the resulting collection of instructions is called code which is placed in a new file?

Is called machine code


What is use of compiler in c?

The compiler translates source code into machine code. As opposed to java, this is a machine specific operation.


What is role of compiler?

It coverts your source code into machine code so the computer can execute it.


How will you recover a file if it is OBJ file and you want to change it to CPP file?

You cannot. Object code files are machine code files that have yet to be linked. There is no way to convert object code back to its original source code.


What is a source code in Visual BASIC?

In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.


What is this native code and what is difference between native code and machine code?

They are the same thing. Every machine type has its own version of machine code, the native language of the machine (native machine code). All high-level code must be converted to native machine code before it can execute. Machine code is machine dependent but high-level code is generally machine-independent, thus the same source code can generally be converted to suit any type of machine using a suitable compiler or interpreter.


Is there any chance a computer that convert the program into machine language is called as a interpreter?

No. Computers do not convert program source code into machine code, period. That job is the responsibility of another piece of software, known as the interpreter or compiler, a machine code program which effectively tells the computer how to perform the translation from source code to machine code. The computer cannot do this job by itself as computers only understand machine code and nothing else. An interpreter simply converts each statement of source code into the equivalent machine code and executes it, one statement at a time. This is extremely slow because subroutines that are called many times must be translated each time they are called, for instance. Thus the source code must always be executed within the interpreter software. A compiler, on the other hand, converts the entire source program into object code which can then be linked to produce the required machine code. Once linked, the machine code will execute without any further interpretation, and is therefore known as a standalone executable.