Skip to main content

COMPILER & INTERPRETER

A compiler is a program that translates the entire source program written in some high-level programming language (such as Java) into machine code for some computer architecture (such as the Intel Pentium architecture).
Image result for compiler
  1. A computer program which reads entire source code and outputs assembly code or executable code is called compiler.
  2. A program that translates software written in source code into instructions that a computer can understand Software used to translate the text that a programmer writes into a format the CPU can use.
  3. A piece of software that takes third-generation language code and translates it into a specific assembly code. Compilers can be quite complicated pieces of software.
An Interpreter is a program that translates a source program written in some high-level programming language (such as BASIC) into machine code for some computer architecture (such as the Intel Pentium architecture) line by line.
  1. A computer program which reads line by line source code and outputs assembly code or executable code is called interpreter.

Difference between Compiler and Interpreter

NoCompilerInterpreter
1Compiler Takes Entire program as inputInterpreter Takes Single instruction as input .
2Intermediate Object Code is GeneratedNo Intermediate Object Code is Generated
3Conditional Control Statements are Executes fasterConditional Control Statements are Executes slower
4Memory Requirement : More (Since Object Code is Generated)Memory Requirement is Less
5Program need not be compiled every timeEvery time higher level program is converted into lower level program
6Errors are displayed after entire program is checkedErrors are displayed for every instruction interpreted (if any)
7Example : C CompilerExample : BASIC

Comments

Popular posts from this blog

Factors to consider when selecting a transmission medium (TRANSMISSION IMPAIRMENTS)

There are many transmission media available and each media type has certain characteristics, so it’s necessary to aware about all the benefits and shortcomings of each one.
•Cost & Ease of installation •Attenuation •Delay Distortion •Capacity (Bandwidth and throughput) •Transmission delay •Propagation delay •Interference •Noise •Thermal/White Noise •Intermodulation Noise •Crosstalk •Impulse Noise
•Cost & Ease of installation : Costing is an important factors , when we select a media. Because absolute cost and ease of installation data are difficult to provide without referring to specific implementations, one can make relative judgments by comparing each medium to the others. •Attenuation : Attenuation refers to the tendency of electromagnetic waves to weaken or become distorted during transmission. It is loss of energy as the signals propagates outwards. Attenuation increases with distance, as a wave passes through a medium, some of its energy is absorbed or scattered by the medium’s ph…

Signed and Unsigned Numbers

Service primitives of Network Software

Service primitivesA service is formally by a set of primitives or operations a user or other entities can invoke to access the service. That is what materializes an interface. We commonly classify service primitives into 4 classes:
primitivemeaningrequest an entity is requesting a service (we are requesting a connection to a remote computer) indication an entity is informed of an event (the receiver has just received a connection request) response an entity is responding to an event (the receiver is sending the permission to connect) confirm an entity acknowledges the response to its request (the sender acknoledge the permission to connect to the remote host) Most primitives need parameters. For instance, parameters of a CONNECT.request (used to query a connection) are the machine you want to connect to, the service you want to use (FTP, telnet...) and the maximum size of exchanged packets.
A acknowledged service is a service that requires a request, an indicatio…