Computer Languages
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.
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.
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.
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.
Machine Language
Assembly Language
Short Code
FORTRAN
Ans: C
BASIC
ALGOL
PERL
C++
Ans: A
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
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.