What is a computer program ?

What is the use of a bat if you don't know how to play Cricket ?
Completely useless, right ?
Same thing happens with computers without a program to run on it.

With that said, here comes a formal definition of a computer program.

Computer Program: In computing, a program is an organised set of operations for a computer to perform. Program is more like a recipe for a computer which consists of  a set of ingredients (which are known as variables) and a set of instructions(which are called statements) to tell the computer what to do with the variables.

Program has an executable form for computer to use directly. This form is not suitable for human being. This is also known as Low-Level program or machine language. The instructions provided in this form can be directly used by the processor. Another form of a program is High-Level program or source code, which is suitable for human reading or editing.

The human readable source code must be converted to machine readable low level machine code by a compiler or assembler or interpreter.

Source Code: Source code is a program written in a high level language (Such as C, C++, Java etc.). This is used by computer programmers who specifies the computer how to work. Source codes are often written in a text format. Source code is not machine dependent. You can write a program in Machine A and can run the same program in Machine B.

These are then provided to a special process, known as compiler as an input to produce a low level machine code understood by compiler.

Source Code Program written in High Level Language


Machine Code: Machine code or machine language is a set of instructions to be used directly in the computer's central processing unit. Machine language is completely machine dependent.

Every processor or processor family has its own set of instruction due to the architecture of the processor. So machine code written for a particular family of processor can not be run on a different family of processor.

Following is a program in its Hex form. This program runs and prints Hello World !

Machine code of a program
Following is the bit string provided to CPU to perform. This is the lowest form of a computer program.
Instruction to CPU in bits (0 and 1)



Prev Next
Palash Kanti Kundu

13 comments:

  1. It really helps like us people, carry on.........

    ReplyDelete
    Replies
    1. If you liked my post, keep watching this space, I will add more when I get time and please share this blog...

      Delete
  2. I have to agree with your statement about source code, it is completely independent - you can run code on whichever machine you want!

    ReplyDelete
  3. A motherboard, otherwise called a principle board, is the essential circuit board within a PC, and is the place the focal preparing unit (CPU), memory, extension openings, drives, and other fringe gadgets are associated. MSI Mag B550M Mortar

    ReplyDelete
  4. Notwithstanding the way that innovation has progressed exponentially, there is as yet a set rundown of software tools accessible on the web, and these are really the best you will discover on the web. emvtools

    ReplyDelete
  5. Coordinating the more up to date advancements to enhance existing learning has gotten basic. When arranging is performed accurately, the instructive climate ought to have the option to utilize advancements to build educator/understudy correspondence. USB duplicator

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Being a writer isn't simple. A great deal of time is spent on editing the substance and giving last little details. Do you realize that there are many composing softwares or writer software items accessible to help writers compose better and spare time spent in editing the substance. prilex

    ReplyDelete
  8. In our present day and age, at the center of pretty much every fruitful organization is an extraordinary advanced establishment. The web has become a need, with even telephones currently running off the staple presently normally alluded to as 'The Cloud'.Professional graphic design

    ReplyDelete
  9. The principal programmable digital computer was created in 1944 by an organization among IBM and Harvard. This was not anyway a simply electronic computer. It was developed from seitches, transfers, turning shafts, and grips. wireless headsets for teaching online

    ReplyDelete
  10. Tablet computers are the most convenient. They can do a great deal, however with a lot more modest showcase. The tablets are an incredible, versatile data device that is one stage over a cell phone. IT support Vaughan

    ReplyDelete