4th Class Computers A brief about Computer Languages A Brief About Computer Languages

A Brief About Computer Languages

Category : 4th Class

A Brief About Computer Languages

 

Introduction

You communicate with your family and friends by speaking languages like English, Hindi or your mother tongue. A computer can understand only binary language because it operates upon electricity Electric signals have two states ? ON or OFF (or 10 be very specific ? high voltage or low voltage,) If we denote ON by 1 and OFF by 0,, it becomes a binary language i.e. a language with just two symbols. For the computer 1 means ?Yes there is power? and 0 means ?No, there is no power?. Thus, it can understand only electric signals and the computer can understand binary language as n symbolizes electric signal.

 

A computer follows the instructions given by the programmer to perform a specific job, such as add, read a file, etc. This sequence of instructions is known as a program. A program written for a computer is known as software. The computer understands only the binary language which is also known as Machine Language or Low Level Language.  Earlier programs were written only in machine language in which, each instruction was in the form of long strings of 1?s and 0?s. These programs were understood by the computer but not easily understood by human beings. Therefore, the computer remained a mystery to the common man till High Level Languages were developed. The 'journey of the computer software from the machine language to high level languages is an interesting one which we will discuss in some detail in this chapter.

 

Low Level Programming Language

People use languages like English, French, and Japanese. Computer use languages like machine language and assembly language. They are CPU specific, making direct use of internal registers. Mnemonics are use as programming code such as MOV or ADD. In computer science, Low level languages allow for close control of the CPLI, for example many device drivers are coded in assembly language. They can be very efficient. Well optimised code written in a low level language can be made to run very quickly compared to other programming paradigms.

Low-level programming languages are sometimes divided into two categories:

 

First Generation Language 1 GLs (Machine Language)

When the human being first started programming the computer, he used machine language or binary language. A machine language is a collection of binary digits or bits that the computer reads and interprets. This language is only understood by computers. While since it is understood by computers, machine languages are almost impossible for humans to use because they consist entirely of numbers. For example, an electric toothbrush has a processor and main memory. The processor can rotate the bristles left and right and can check the ON/OFF switch. The machine instructions are one byte long and correspond to the following machine operations:

 

Machine Instruction

Machine Operation

0000 0000

Stop

0000 0001

Rotate bristles left

0000 0010

Rotate bristles left

0000 0100

Go back to start of program

0000 1000

Skip next instruction if switch is off

 

Second Generation Language 2 GLs (Assembly Language)

The first-generation programming language or 1 GL is machine code. Since machine codes are too hard to remember, each processor manufacture designs an ?easy-to-remember? names for each op-code. Assembly language is a second generation language. This language is a mnemonic system for representing machine instruction codes:

 

  • Mnemonic means for op-codes
  • Name for all registers.
  • Identifiers: Descriptive names for memory locations, chosen by the programmer. To overcome the drawbacks of the machine language, computer engineers developed a new programming language which uses symbolic instructions. This symbolic instructions oriented programming language is known as assembly language.

            The meaning of mnemonic is memory sake or to remember. For example:

 

 

ADD

For addition

SUB

For subtraction

MUL

For multiplication

STA

For store at accumulator

HALT

For halt

JMP

For jump

INR

For increment and so on

 

In assembly language it is easy to remember operation codes, easy to write the programs, modify and debug as compared to machine language.

 

There is no need to remember is addresses of operands and instruction locations.

 

For example:

 

Machine Language Program

 

156 C

166 D

5056

30 CE

C000

 

 

Assembly language program

 

 

 

High Level Programming Languages

Each type of CPU has its own machine language and assembly language, so an assembly language program written for one type of CPU will not run on another. Therefore, the need for a new type of language across.

 

The Third generation programming languages were designed to suit the requirements of the programmer. The 3 GL are the first to use true English - like phrasing, making them easier to use than pervious languages. It is portable, meaning the object code created for one type of system can be translated for use on a different type of system,

 

The following languages are 3 GLS:

 

            FORTAN               C

            COBOL                C++

            BASIC              Java

            PASCAL

 

HLL is a programming language in which instructions are written in a language that resembles human language. It has human sounding words and syntax (like words in a sentence). These normally use statements consisting of English-like keywords such as ?FOR?, ?PRINT? or ?GOTO?, where each statement corresponds to several machine language instructions. It is much easier to program in a high-level language than in assembly language though the efficiency of execution depends on how good the compiler or interpreter is at optimizing the program.

 

Fourth Generation Language

The 4GL are also known as very high level language. They are non-procedural languages. 4GL may use a text based environment (like a 3GL) or may allow the programmer to work in a visual environment, using graphical tools.   

                                                                 

The 4GL are much easier to use than third generation language, 4GL allow users, or non-computer professionals develop software. Two types of language translators used with this language are following:-

 

 

  • Compilers: Perform translation from a high - level (machine independent) statement to an equivalent short sequence of machine codes.
  • Interpreters: Perform translation and execution of high-level statements at the same time, note that there is no intermediate machine code being generated.

 

Advantage of HLL

 

  • Resemblance to commonly used English Language.
  • Easy to learn and use.
  • Easy documentation.
  • Modifications can be done more easily.
  • Independent of the structure of the computer.

 

 



LIMITED OFFER HURRY UP! OFFER AVAILABLE ON ALL MATERIAL TILL TODAY ONLY!

You need to login to perform this action.
You will be redirected in 3 sec spinner

Free
Videos