interpreter vs compiler and (assembler)

?
  • Created by: roshan231
  • Created on: 25-01-20 12:30
When would you use a compiler?
when translation and executing software written on that specific CPU.
1 of 9
When would you use an interpreter?
When trying to run code written on a different computer with a diff CPU.
2 of 9
When would you use an assembler?
When translating assembly to machine code.
3 of 9
How does a compiler work?
a compiler translates all the code written on that CPU to machine code at once. the program is then executed and all error are listed at the end. The code is turned into object code before execution.
4 of 9
How does an interpreter work?
The code is translated and executed one line at a time simultaneously. This code displays errors of the code one line at a time.
5 of 9
what is ByteCode?
this is a set of instructions(object code) used for programming that can be executed on any computer using a virtual machine.
6 of 9
How does bytecode work and why is it so good?
The way bytecode works is the the code (in this case Java) can be COMPILED to a "Intermediate " stage. at this point this code can be sent to any other computer/cpu for further processing. the way this works is through a virtual machine(JVM).
7 of 9
Answer Contunied:
As long as the computer recieveing the intermediate bytecode has the Java Virtual Machine installed, the code will compiles/interpreted to machine code for that computer. once it is compiled from intermediate code once, it doesn't need it again.
8 of 9
Main advantage of a compiler?
the source code of the compiler will not be needed once the source code has finished compiling. this means the final .exe can be distributed without the possibility of theft of the program source code.
9 of 9

Other cards in this set

Card 2

Front

When would you use an interpreter?

Back

When trying to run code written on a different computer with a diff CPU.

Card 3

Front

When would you use an assembler?

Back

Preview of the front of card 3

Card 4

Front

How does a compiler work?

Back

Preview of the front of card 4

Card 5

Front

How does an interpreter work?

Back

Preview of the front of card 5
View more cards

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Software resources »