UNIT 5.
Programming Languages
Learning objectives
- to acquire basic knowledge about programming languages as an engineering tool
- to understand the main difference between high-level and low-level languages
- to understand the role of assembly language in computer programming
Before reading the text watch the video from
https://www.youtube.com/watch?v=EGQh5SZctaE&ab_channel=Codecad
emy to get some information on the topic. What do you already know
about the topic?
Read the following text and do the exercises given after it
Programming is an important engineering tool. It is a process of writing
a computer program using computer language. Computer programs are collections of instructions
that tell a computer how to internet with the user and the computer hardware and how to process
data. Our work would have been very demanding and time consuming without programming.
Programming languages can be classified as either low-level languages or high-level languages. Low-
level programming languages or machine languages are the most basic type of programming
languages and can be understood directly by a computer. It is extremely tedious to program directly
in machine language because instructions are written as sequences of Is and 0s called bits. Assembly
languages are used to make machine language programs easier to write. For example, assembly
languages use abbreviations such as ADD, SUB, MPY to represent instructions. The program is then
translated into machine language by software called an assembler.
Assembly language is designed to be easily translated into machine language. Although blocks of
data may be referred to by name instead of by their machine addresses, assembly language does not
provide more sophisticated means of organizing complex information. Like machine language,
assembly language requires detailed knowledge of internal computer architecture. It is useful when
such details are important, as in programming a computer to interact with peripheral devices
(printers, scanners, storage devices, and so forth).
High-level languages are relatively sophisticated sets of statements utilizing words and syntax from
human language and therefore easier to read, write, and maintain. Examples of high-level languages
are Pascal (widely used as a beginner or as a teaching language), C (used to write system software,
graphics and commercial programs), C++ (primarily utilized with system / application software,
drivers, client-server applications), Cobol (popular for business applications), Fortran (used for
scientific and mathematical applications), Java (designed to run on the Web), Visual Basic (used to
create Windows applications) and shell scripting languages such as those found in the UNIX, Linux
and Mac OS X environment. The languages used to create Web documents are called markup
languages, they use instructions (markups) to format and link text files, for example, HTML
(Hypertext Markup Language).
Regardless of what language you use you need to translate it into machine language so that a
computer can understand and process it. There are two ways to do this: to compile the program and
interpret the program. In a compiled language, the programmer writes more general instructions and
a compiler (a special piece of software) automatically translates these high level instructions into
machine language. The machine language is then executed by the computer. A large portion of
software in use today is programmed in this way. In an interpreted programming language, the
statements that the programmer writes are interpreted as the program is running. This means they
are translated into machine language on the fly and then are executed as the program is running.
People communicate instructions to the computer in programming languages and the choice
of the language depends on the type of computer, the sort of program, the expertise of the
programmer, etc. [10].
Thousands of different programming languages have been created, and more are being
created every year. Many programming languages are written in an imperative form (i.e., as a
sequence of operations to perform) while other languages use the declarative form (i.e. the desired
result is specified, not how to achieve it).
The description of a programming language is usually split into the two components of
syntax (form) and semantics (meaning). Some languages are defined by a specification document (for
example, the C programming language is specified by an ISO Standard) while other languages (such
as Perl) have a dominant implementation that is treated as a reference. Some languages have both,
with the basic language defined by a standard and extensions taken from the dominant
implementation being common.
Programming language theory is a subfield of computer science that deals with the design,
implementation, analysis, characterization, and classification of programming languages.
[btips://en.wikipedia.org/wiki/Programming._ language]
1. Text-based Assignments
1.4. Read the text again and decide if the following statements are true or false
1) Computer programs are collections of instructions that tell a user how to interact with a computer.
2) Our work would have been very demanding and easy without programming.
3) High-level programming languages or machine languages are the most basic type of programming
languages and can be understood directly by a computer.
4) Assembly language is designed to be easily translated into machine language.
5) High-level languages are relatively sophisticated sets of statements utilizing words and syntax from
human language and therefore easier to read, write, and maintain.
6) Visual Basic is used to write system software, graphics and
commercial programs.
7)In a compiled language, the programmer writes more general instructions and a compiler (a special
piece of software) automatically translates these high level instructions into machine language.
8) The description of a programming language is usually split into the three components of syntax
(form) and semantics (meaning) and links between them.
1.5. Answer the following questions on the text
1) Which programming languages do you use? Why do you use them?
2) What are the examples of high-level languages?
3) Assembly language doesn’t require detailed knowledge of internal computer architecture, does it?
4) What does “to compile the program” mean?
5) What does programming language theory deal with?
6) What would happen if you forgot to include the correct punctuation in a statement?