Programming Language
Programming Language
Computer programming is a step – by – step instruction which tells the computer what to do. Programming is a process
by which a user (programmer) specifies to the computer in a logical sequence, step – by – step what it wants it to do.
The computer is a machine and as such only understands machine language. It does not understand human language.
Therefore, for human to communicate with computer, they must understand the computer language (i.e. Machine
Language). Programming Language is a medium or notation of communicating with the computer system. The process
of writing the set of instructions in a language acceptable to the computer is called PROGRAMMING and the person who
writes the instruction is called a PROGRAMMER.
EVALUATION
1. What is Program?
2. What is Programming?
Programming Language is a medium or notation of communicating with computer system. There are three types of
programming Language.
1. Machine Language (Low Level Language)
2. Assembly Language (Low level language)
3. High level Language
LOW LEVEL LANGUAGE
A low level computer language is either a machine language or assembly language.
MACHINE LANGUAGE
In machine language, instructions are written in binary. It consists of binary codes using strings of 0s and 1s. This is the
only language computer understands. A program written in machine language is directly executable by the computer.
ASSEMBLY LANGUAGE
An assembly language program is one written using mnemonic code in which instruction names are to remember like
MPY for multiply and STO for store). Assembly language program eliminates all the problems encountered using machine
language. However, a translator called ASSEMBLER translates assembly language program to machine language because
this is the only language in which a computer can run programs.
HIGH LEVEL LANGUAGE
These were developed to further ease the work of programmers making the programs problem oriented against machine
– oriented low level language. The statements of high – level language are close to natural human language (i.e. English
Language). A high – level language program is translated (compiled) by a COMPILER to an equivalent machine language
programs. Each high level language has its own compiler.
Examples of high level languages are
1. BASIC – Beginners All-Purpose Symbolic Instruction Code.
2. COBOL – Common Business Oriented Language
3. FORTRAN – Formula Translator
4. ALGOL – Algorithmic Language
5. C++
6. PASCAL
7. JAVA
8. VISUAL BASIC
9. LOGO
10. ADA etc
EVALUATION
1. What is programming language?
2. List the THREE example of High level languages.
TOPIC - BASIC PROGRAMMING
CONTENT
BASIC stands for BEGINNNERS ALL-PURPOSE SYMBOLIC INSTRUCTION CODE. It is a single easy to use
language designed also for beginners. It is science oriented. Professor John Kemeny and Thomas Kurtz developed the
language in 1964 at Dartmouth College, U.S.A. The program can be used to solve problem covering a wide range of
application on many different types of digital computer..
There are different versions of Basic. They include:
- Turbo Basic (T-BASIC)
- BASIC PLUS
- GW BASIC
- QUICK BASIC (Q-BASIC)
- VISUAL BASIC (V-BASIC)
EVALUATION
1. What is BASIC?
2. List FIVE versions of BASIC.
THE BASIC INTERPRETER
The BASIC interpreter converts your program into a form that can be executed directly by the computer.
KEYWORDS IN BASIC
This is also referred to as BASIC statement or a reserved word. It is an instruction in BASIC, which has a specific means
to the compiler or interpreter.
1. REM STATEMENT
The REM statement is a remark statement. It is used to insert remarks in the program. Such remarks are used to
explain what the program is all about.
Example:
10 REM This program finds the average of 5 numbers
2. LET STATEMENT
The LET statement is used to assign (or give) values to variables.
Examples:
10 LET A = B + C
3. INPUT STATEMENT
Input is used to assign or give values to variables while program is running. It can be used with both numeric and
string variables.
Examples:
10 INPUT A, B, C
4. PRINT STATEMENT
The print statement tells your computer to display the output of the executed program on the screen of the monitor
(VDU).
Example:
10 PRINT SUM
5. END STATEMENT
End Statement is an instruction used to terminate the program. One the computer encounters END statement, it
automatically terminates the program.
6. RUN STATEMENT
The RUN statement is used to execute a program. In Q-BASIC, F5 is used to RUN a program. Note that the
program will not RUN if any mistake or error is detected in it.
EVALUATION
1. Write the function of the following BASIC keywords
(a) LET (b) INPUT (c) PRINT (d) REM (e) RUN