CS – 02: PROBLEM SOLVING METHODOLOGIES AND
PROGRAMMING IN C
INTRODUCTION COMPUTER LANGUAGES
Introduction of Computer Languages
To write a computer program, a standard programming
language (also called computer language) is used.
A language that is acceptable to a computer is called a
computer language or programming language. The
computer languages or programming languages are
used by programmers to write computer programs. The
computer programs provide the instructions to a
computer to do a desired job (task or work).
The programming languages (computer languages)
can be classified (categorized or divided) as follows:
1. Low-level Languages
Low-level language is one that is closer to the
native language of the computer. Low-level
languages are closer to the computer (machine).
Low-level languages are machine oriented
languages. The machine language and the
assembly language are known as low-level
languages.
a. Machine Language
A machine language is the only programming language
(computer language) that is understandable to the computer
(machine) very easily without using a translation program.
The machine language programs are written using binary
digits 1 and 0.
Page 1 of 5
Created by HIRAK BUCH - Bhavan's Shree HJ Doshi IT Inst., Jamnagar
CS – 02: PROBLEM SOLVING METHODOLOGIES AND
PROGRAMMING IN C
INTRODUCTION COMPUTER LANGUAGES
Advantage (Benefit) of Machine Language
Programs written in the machine language can be executed
directly and efficiently (very fast) by the computer. The
computer directly understands the instructions of the
machine language programs, and therefore no translation is
required. Therefore, the computer directly starts executing
the machine language programs instructions, and it takes
less execution time and gives fast execution speed.
Disadvantages (Limitations) of Machine Language
• Difficult to Use: The machine language is difficult to
use.
• Difficult to Read and Understand: The machine
language programs are difficult to read and
understand.
• Difficult to Write: Writing programs in the machine
language is difficult and time consuming.
• Difficult to Debug: Detecting (locating) and correcting
errors in the machine language programs is very
difficult, boring, and time consuming process.
b. Assembly Language
The assembly language programs are written using decimal
numbers (digits 0 ... 9), alphabets (letters), and symbols
(special characters) called mnemonic codes instead of
binary numbers (digits 0 and 1). So, the assembly language
program is easier to understand for the human
(programmer) than the machine language program.
The computer (machine) cannot understand the assembly
language easily; therefore, a program written in the
assembly language is first translated into machine language
using a translation program called Assembler so that the
computer (machine) can understand it easily.
Page 2 of 5
Created by HIRAK BUCH - Bhavan's Shree HJ Doshi IT Inst., Jamnagar
CS – 02: PROBLEM SOLVING METHODOLOGIES AND
PROGRAMMING IN C
INTRODUCTION COMPUTER LANGUAGES
Advantages (Benefits) of Assembly Language
• Easier to Use: The assembly language is easier to use
than the machine language.
• Easier to Read and Understand: The assembly
language programs are easier to read and understand
than the machine language programs.
• Easier to Write: Writing programs in the assembly
language is easier than writing programs in the
machine language.
• Easier to Debug: Detecting (locating) and correcting
errors in the assembly language programs is easier
than detecting (locating) and correcting errors in the
machine language programs.
Disadvantage (Limitation) of Assembly Language
The assembly language programs cannot be executed by
the computer directly. The assembly language program
must be first translated into the machine language program
using a translation program called Assembler, and then the
translated program can be executed (run) by the computer.
This two-step process takes more execution time, that is,
translation time plus actual execution time (and gives slow
execution speed). Therefore, the programs written in the
assembly language take more time to execute. So, the
assembly language have lower efficiency than the machine
language to do the same job (task or work).
2. Middle-level Language
The middle-level language lies in between (stands between) the
low-level and high-level language. C language is the middle-level
language. Like high-level languages, the middle-level language
programs are written using decimal numbers (digits 0 ... 9),
alphabets (letters), and symbols (special characters). Like high-
level languages, the middle-level language is similar to human
language; therefore, the middle-level language is understandable
to the human (programmer) very easily. The middle-level
language also supports certain low-level language features such
Page 3 of 5
Created by HIRAK BUCH - Bhavan's Shree HJ Doshi IT Inst., Jamnagar
CS – 02: PROBLEM SOLVING METHODOLOGIES AND
PROGRAMMING IN C
INTRODUCTION COMPUTER LANGUAGES
as bit-level operations, storage of values into CPU registers, and
direct memory access so that faster computing (calculation) of
values. In this way, C language supports the features of high-level
language as well as low-level language; therefore, C language is
called a middle-level language.
3. High-level Languages
The high-level languages such as COBOL, FORTRAN, and BASIC
are the programming languages that are understandable to the
human (programmer) very easily because these languages are
similar to human languages. Like human languages, the high-
level languages also have grammar rules usually called syntax
rules. The high-level language programs are written using
decimal numbers (digits 0 ... 9), alphabets (letters), and symbols
(special characters).
The computer (machine) cannot understand the high-level
languages easily; therefore, a program written in a high-level
language is first translated into machine language using a
translation program called Compiler or Interpreter so that the
computer (machine) can understand it easily.
Advantages (Benefits) of High-Level Languages
• Easier to Use: The high-level languages are easier to use
than the low-level languages.
• Easier to Read and Understand: The high-level language
programs are easier to read and understand than the low-
level language programs.
• Easier to Write: Writing programs in the high-level
languages is easier than writing programs in the low-level
languages.
• Easier to Debug: Detecting (locating) and correcting errors
in the high-level language programs is easier than detecting
(locating) and correcting errors in the low-level language
programs.
Page 4 of 5
Created by HIRAK BUCH - Bhavan's Shree HJ Doshi IT Inst., Jamnagar
CS – 02: PROBLEM SOLVING METHODOLOGIES AND
PROGRAMMING IN C
INTRODUCTION COMPUTER LANGUAGES
Disadvantage (Limitation) of High-level Languages
The high-level language programs cannot be executed by the
computer directly. The high-level language program must be first
translated into the machine language program using a translation
program called Compiler or Interpreter, and then the translated
program can be executed (run) by the computer. This two-step
process takes more execution time, that is, translation time plus
actual execution time (and gives slow execution speed).
Therefore, the programs written in the high-level languages take
more time to execute. So, the high-level language have lower
efficiency than the machine language to do the same job (task or
work).
Page 5 of 5
Created by HIRAK BUCH - Bhavan's Shree HJ Doshi IT Inst., Jamnagar