What isTypes of Codes
2 minute read
What is Types of
Codes
there are two
types of codes that are as follows:
1.source code
2.object code
1 Source Code
A program written in a high-level language is called source
code. Source code is also
called source program Computer cannot understand the
statements of high-level language.
The source code cannot be executed by computer directly. It
is converted into object code and
then executed.
2 Object Code
A program in machine language is called object code. It is
also called object program
or machine code. Computer understands object code directly
.What is Language
Processor
Computer understands only machine language. A program
written in high-level or
assembly language cannot be run on a computer directly. It
must be converted into machine
language before execution. Language processor or translator
is a software that converts these
programs into machine language. Every computer language has
its own translators.
Different types of language processors are as follows:
1 Compiler
A compiler is a program that converts the instruction of a
high level language into
machine language as a whole. A program written in high-level
language is called source
program. Compiler converts source program into machine code
known as object program.
The compiler checks each statement in the source program and
generates machine
instructions. Compiler also checks syntax errors in the
program. A source program
containing an error cannot be compiled. A compiler can
translate the programming to only that
language for which is written. For example C compiler can translate only (hone
programs that written in C language.
2Interpreter
An Interpreter Is a program that converts one statement Of
program one time
executes this statement before translating the next statement
of the source program. If there is
an error in the statements, the interpreter stop working and
displays errors
The advantage of interpreters over compiler in that error is
found immediately
The disadvantage of interpreter is that it is not very
efficient, interpreter does produce an object program, It must convert the time
it executed, Visual Bask
uses Interpreter.
3.Assembler
An assembler is translating program that translates the
instruction of a assembly
language into machine language,