Programs and programming
A program is a very specific set of rules that
tell the computer what to do. It is a sequence
of primitives to be executed by a computer in
order to automate a certain business,
industrial or scientific task.
The process of creating a program is called
programming.
The computer only knows what it is told
through programs, so they must be accurate
and very specific.
Steps in programming
Deciding if there is a task to be accomplished or problem
to be solved using a computer, eg, is there a need for a
program?
Determining the nature of the task or problem, eg, what
must the program do?
Developing a plan that will accomplish the task or solve
the problem, eg, generating the step-by-step process
that the program will follow (algorithm)
Converting the plan into a computer language program
Implementing the program to accomplish the task or
solve the problem
Testing the program to ensure it accomplishes task or
solves problem defined earlier
Types of programming and
languages
Interpreted Programming Language : each
statement translated as it is executed--slow
but easy to use while developing programs
Compiled Programming Language: entire
program is converted to binary--executes
faster, but more difficult to use (.exe files are
compiled programs)
Language translation process
Total = 0 10111000 11011000
Current = 10 10110001 00000100
Do while current <> 0 11100010 10101000
Total = Total + 11100011 00010001
Current Translation 10111000 11011000
Program
Current = Current – 1 10110001 00000100
Loop 11100010 10101000
11100011 00010001
11100010 10101000
High level language
program Machine language
program