Showing posts with label introduction. Show all posts
Showing posts with label introduction. Show all posts

Friday, September 21, 2018

Hierarchy from machine language to high level language



A Diagram depicting the working of a programming language in a computer, meaning after we write code on a computer in a programming language following happens inside computer.





Hardware
|
\/
Machine Language
|
\/
Assembly Language
|
\/
High Level  Language
|
\/
Fortran,C,Pascal



Hierarchy from machine language to high level language



Machine Language:
They send instructions in the form of 0's and 1's which only the machine can understand.

Assembly language:
It contains symbolic machine language instructions.These are called mnemonics.It is little bit english.

High Level Language:
It contains a set of insructions which are simple english like,like spoken languages and are easy to understand and use.C,C++,Pascal,Basic are some exaplesof high level languages in which english words are used as instructions.

The figure shows how computer's hardware,machine language,assembly language and high level language are related to each other.

Introduction-Program in general

Suppose we have to add :

10+20

We see there is a plus sign between the numbers.We can understand that it is a sum of addition but the computer can't.It has no brains.To make computer understand this statement we will have to give a set of instructions.This set of instructions is called programming.
:

So,we can say:

A program is a set of instructions which,when executed cause the machine to behave in a predetermined manner.


Programs are written to solve problems.But before writing the program,you should solve the problem by yourself somewhere in rough.
When you have solved the program,just write the main steps somewhere in rough.
This is a rough sketch  of your program.
Thus,the method of solving the problem,it's main steps will make the statements of your program.

In short:

1.Studythe problem.
2.Gather information to solve the problem.
3.Write the main steps to solve the particular problem.
4.Check your result with your book.

In a program,this method of solving the particular program will apply to all such problems.