0% found this document useful (0 votes)
26 views

Programming Language

Uploaded by

bezalelolushakin
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Programming Language

Uploaded by

bezalelolushakin
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Programming Language

Translators
Integrated development
environments (IDEs)
WHAT IS A PROGRAM
A computer program is a list of instructions that enable a computer to
perform a specific task.
Computer programs can be written in high-level languages and
low-level languages depending on the task to be performed and the
computer to be used.
Most programmers write programs in high-level languages.
PROGRAMMING LANGUAGES

• HIGH LEVEL LANGUAGE


• LOW LEVEL LANGUAGE
High-level languages
High-level programming languages
are closer to human language and
are easier to understand. They
provide an abstract and user-
friendly way of writing computer
programs compared to low-level High-level languages offer a higher
languages. level of abstraction from the
hardware and low-level operations,
allowing programmers to focus on
problem-solving rather than
worrying about specific hardware
details.
Some characteristics of high-level
languages include:
• Abstraction: High-level languages provide built-in functions, data structures
and allow programmers to work with more understandable and intuitive
concepts.
• Readability: High-level languages use English-like keywords, syntax, and
expressions, making the code more readable and easier to comprehend.
• Portability: Programs written in high-level languages can be easily ported
across different platforms since they are not tightly bound to specific
hardware or system dependencies.
• Productivity: They often have features that automate common tasks, which
increases programmer productivity such as a wide range of libraries,
frameworks, and tools that expedite the development process.
Examples of High-level language
High-level programming languages includes the following:
• C++
• Delphi
• Java
• Pascal
• Python
• Visual Basic and many more.
Once a programmer has learned the techniques of programming in any
high-level language, these can be transferred to writing programs in other
high-level languages.
Low-level languages
Low-level programming languages are programming languages that provide a
closer correspondence to the hardware and have a higher level of control over
the computer's resources.
They typically have minimal abstraction and are more closely tied to the
hardware architecture.
Low-level languages are used when precise control over system resources or
high performance is required.
Low-level languages can refer to machine code, the binary instructions that a
computer understands, or assembly language that needs to be translated into
machine code.
• Machine Language: Machine language is the lowest level of programming
language. It consists of binary instructions that are directly executed by the
computer's hardware. Machine language instructions are represented as
sequences of 0s and 1s, which are understandable by the computer's
processor.
Writing programs in machine language is extremely difficult and error-prone,
as it requires a detailed knowledge of the processor's instruction set
architecture.
Assembly Language
• Assembly language is a low-level language that uses mnemonic codes to
represent specific machine instructions. Assembly language provides
direct control over memory, registers, and other system resources.
• Fewer programmers write programs in an assembly language. Those
programmers who do, do so for the following reasons:
» to make use of special hardware
» to write code that doesn’t take up much space in primary memory
» to write code that performs a task very quickly.
The following snippet of program to add two numbers together
Differences between high-level
and low level
TRANSLATOR
Humans find it very difficult to read binary, but computers can only
perform operations written in binary. Therefore, a program must be
translated into binary before a computer can use it; this is done by a
utility program called a translator.

There are several types of translator program in use; each one performs a
different task.
• Compiler
• Interpreter
• Assembler
Compilers
A compiler is a program that translates an entire program written in a
high level language (HLL) into machine code all in one go so that it can
be directly used by a computer to perform a required task.
Once a program is compiled the machine code can be used again and
again to perform the same task without re-compilation.
If errors are detected, then an error report is produced instead of a
compiled program.
An interpreter reads a statement from a program written in a high-level
language line by line, translates it, performs the action specified and then does
the same with the next statement and so on.
If there is an error in the statement then execution ceases and an error message
is output, sometimes with a suggested correction.

Assemblers
An assembler is a computer program that translates a program written in
an assembly language into machine code so that it can be directly used by a
computer to perform a required task. The assembly language program
statements:

You might also like