0% found this document useful (0 votes)
2 views5 pages

Computer Languages

The document explains computer languages, categorizing them into low-level and high-level languages. Low-level languages, such as machine and assembly languages, interact directly with hardware, while high-level languages, like C++ and Python, are closer to human language and easier to use. It also discusses the roles of compilers, interpreters, and assemblers in translating these languages into machine code for execution.

Uploaded by

Nidhi Maria
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
2 views5 pages

Computer Languages

The document explains computer languages, categorizing them into low-level and high-level languages. Low-level languages, such as machine and assembly languages, interact directly with hardware, while high-level languages, like C++ and Python, are closer to human language and easier to use. It also discusses the roles of compilers, interpreters, and assemblers in translating these languages into machine code for execution.

Uploaded by

Nidhi Maria
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 5

Computer Languages

How do you think we communicate with a computer? A computer cannot understand any
commands that you may give in English or in any other language. It has its own set of instructions for
communication, or what we call computer languages.

The user of a computer must be able to communicate with it. That means, he must be able to give
the computer commands and understand the output that the computer generates. This is possible
due to the invention of computer languages.

Basically, there are two main categories of computer languages, namely Low-Level Language and
High Level Language.

1] Low Level Languages

Low level languages are the basic computer instructions or better known as machine codes. A
computer cannot understand any instruction given to it by the user in English or any other high-level
language. These low-level languages are very easily understandable by the machine.

The main function of low level languages is to interact with the hardware of the computer. They help
in operating, syncing and managing all the hardware and system components of the computer. They
handle all the instructions which form the architecture of the hardware systems.

Machine Language

This is one of the most basic low level languages. The language was first developed to interact with
the first-generation computers. It is written in binary code or machine code, which means it basically
comprises of only two digits – 1 and 0.

Assembly Language

This is the second generation programming language. It is a development on the machine language,
where instead of using only numbers, we use English words, names, and symbols. It is the most basic
computer language necessary for any processor.

2] High Level Language

When we talk about high level languages, these are programming languages. Some prominent
examples are PASCAL, FORTRAN, C++ etc.

The important feature about such high level languages is that they allow the programmer to write
programs for all types of computers and systems. Every instruction in high level language is
converted to machine language for the computer to comprehend.

Scripting Languages

Scripting languages or scripts are essentially programming languages. These languages employ a
high-level construct which allows it to interpret and execute one command at a time.

Scripting languages are easier to learn and execute than compiled languages. Some examples are
AppleScript, JavaScript, Pearl etc.

Object-Oriented Languages
These are high level languages that focus on the ‘objects’ rather than the ‘actions’. To accomplish
this, the focus will be on data than logic.

The reasoning behind is that the programmers really cares about the object they wish to manipulate
rather than the logic needed to manipulate them. Some examples include Java, C+, C++, Python,
Swift etc.

Procedural Programming Language

This is a type of programming language that has well-structured steps and complex procedures
within its programming to compose a complete program.

It has a systematic order functions and commands to complete a task or a program. FORTRAN,
ALGOL, BASIC, COBOL are some examples.

Practice Questions for You

Q: Which was the first computer language for an electronic device?

Machine Language

Assembly Language

Short Code

FORTRAN

Ans: C

Q: Visual Basic (VB) was derived from which of the following?

BASIC

ALGOL

PERL

C++

Ans: A

Q: FORTRAN was developed at ____?

Apple

Sun Technology

IBM

Intel

Ans: C
High- and Low-Level Languages
A computer program is a list of instructions that enable a computer to perform a
specific task.
Computer programs can be written in high- and low-level languages, depending on
the task and the hardware being used.
High Level Languages
High level languages are written in a form that is close to our human language,
enabling the programmer to just focus on the problem being solved.
Examples include: C++, Java, Pascal, Python, Visual Basic.
Advantages
1. Easier to modify as it uses English like statements
2. Easier/faster to write code as it uses English like statements
3. Easier to debug during development due to English like statements
4. Portable code – not designed to run on just one type of machine
Low Level Languages
Low level languages are used to write programs that relate to the specific
architecture and hardware of a particular type of computer.
They are closer to the native language of a computer (binary), making them harder
for programmers to understand.
Examples of low-level language:
Assembly Language
Machine Code
Assembly Language
used for developing code for specialist hardware, such as device drivers.
Advantages
 Can make use of special hardware or special machine-dependent
instructions (e.g. on the specific chip)
 Translated program requires less memory
 Write code that can be executed faster
 Total control over the code
 Can work directly on memory locations
Machine Code
Programmers rarely write in machine code (binary) as it is difficult to understand.
Translators
Computers only understand machine code (binary), this is an issue
because programmers prefer to use a variety of high and low-level programming
languages instead.
Compiler

Compilers are used to translate a program written in a high-level language into


machine code (object code).
Once compiled (all in one go), the translated program file can then be directly used
by the computer and is independently executable.
Compiling may take some time but the translated program can be used again and
again without the need for recompilation.
An error report is often produced after the full program has been translated. Errors
in the program code may cause a computer to crash. These errors can only be fixed
by changing the original source code and compiling the program again.
Interpreter

Interpreter programs are able to read, translate and execute one statement at a time
from a high-level language program.
The interpreter stops when a line of code is reached that contains an error.
Interpreters are often used during the development of a program. They make
debugging easier as each line of code is analysed and checked before execution.
No executable file is produced. The program is interpreted again from scratch every
time you launch it.
Assembler
Assemblers are used to translate a program written in a low-level assembly
language into a machine code (object code) file so it can be used and executed by
the computer.
Once assembled, the program file can be used again and again without re-assembly.

Compiler Interpreter Assembler

Temporarily executes high-level Translates low-level


Translates high-level languages into
languages, one statement at a assembly code into
machine code
time machine code

No executable file of machine An executable file of


An executable file of machine code
code is produced (no object machine code is produced
is produced (object code)
code) (object code)

Compiled programs no longer Interpreted programs cannot be Assembled programs no


need the compiler used without the interpreter longer need the assembler

Error report produced once the One low-level language


Error message produced
entire program is compiled. These statement is usually
immediately (and program stops
errors may cause your program to translated into one
at that point)
crash machine code instruction

Interpreted code is run through


Compiling may be slow, but the
the interpreter (IDE), so it may
resulting program code will run quick
be slow, e.g. to execute
(directly on the processor)
program loops

One high-level language statement


may be several lines of machine
code when compiled

You might also like