First the basics.What is a computer ?
A computer can simply be defined as an electronic device used for storing and processing information.
A computer is designed to accept input,process it and generate an output,which means a computer carries out tasks in phases. For example,to check your account balance on your mobile device,a certain code is keyed into the mobile device. This is called the input phase. The information is then processed to determine your balance. This is known as the process phase. Once the processing is complete,the result is displayed on your screen showing your account balance. This is called the Output phase. This cycle of activities is also known as the I-P-O- cycle.
The I-P-O Cycle
However for the I-P-O Cycle to be complete,the computer has to be provided with a set of instructions that will specify the kind of input that will be provided,the processing that needs to be done and the kind of output expected. This set of instructions are known as wwwwwwwwwwwwwwwwwwwwwwwprograms.
PROGRAMS
Programs are set of instructions a computer needs to perform a particular task,mainly input,processing and output activities.therefore for each task you'd like to run you would need a set of program.Instructions in a program can be any of the following:
- Iterative: These instructions are executed repeatedly,depending on the value of an expression (relation or condition)
- Sequential: These are instructions that are executed one after the other.
- Decision Making: These instructions first evaluate an expression (relation or condition) and then depending on the value of the expression whether true or false,it transfers the control to a particular statement.
NOTE: An Application is a collection of programs working together to solve a problem.
PROGRAMMING LANGUAGE
A programming Language like any other language is meant for communication,it's a language designed to communicate instructions to a computer as well as other machines.A computer only understands the Machine Language which uses the binary system that consist of two digits, "0 and 1". However to communicate and relay information to a computer we use High Level Language which consist of a set of instructions using simple English words.
Just as with real languages,programming languages has its own set of vocabulary and grammar rules. The vocabulary of the programming language is referred to as the set of keywords of that language,and the grammar is referred to as the syntax. Example of level programming languages are C,C++,Javascript and SQL.
It is also important to note that for each programming language there is a different compiler. Compilers are special programs that processes the statement written in a particular programming language and converts them into machine language for the computer to understand,this process of conversion is known as compilation. For example you would need a java compiler for the compiling of a java program.
No comments:
Post a Comment