Performance objectives.
Students should be able to:
1. Identify a computer program
2. Define a computer programming language
3. Give examples of computer programming languages
4. state the meaning of the acronym basic
5. list key statements of basic
6. write simple basic program
UNIT ONE: PROGRAMING LANGUAGE
8.1. WHAT IS A COMPUTER PROGRAM?
Computer programs are set of programs or instructions which tell the computer what to do, when and how to do it. Programs are commonly referred to as computer softwares.
8.1.1. PROGRAMMING LANGUAGES
Language is the medium of communication between two or persons, or things. We have English language, Hausa, Yoruba. These are common languages used for communication in Nigeria. However, computers donot understand nor interpret human languages (hausa, Yoruba, Ibo, English etc). Therefore, man invented what is called computer language/programming language. This is the language man uses to communicate with the computer.
8.1.2. EXAMPLES OF PROGRAMMING LANGUAGES
There are two major types of programming languages. These are:
8.1.2.1. Low Level Languages
8.1.2.2. Assembly language
8.1.2.3. High Level Languages
8.1.2.1. Low Level Languages- Machine Language
The low level languages are the first computer languages developed and used in the 1960s. The languages use binary numbers only-1s and 0s to tell the computer what to do (to instruct the computer). Example of the low level language is the Machine Language, also called machine code. A machine language instruction consists of two parts: an instruction part called operation Code (Opcode) and an address part. The operation code (opcode) tells the computer what to do and how. While he address part specifies the address/place the operation will take place. For example, a program instruction or code may look like this:
8.1.2.2. Assembly Language
Low level languages use figures (binary) only, "0"s and "1"s. However, computers normally use not figures only but letters, and symbols or abbreviations. The assembly language is developed to take care of letters, figures and symbols or abbreviations.
The programmer first develops the source codes which are converted into mnemonic and later on into the machine code (1's and 0's) by the Assembler. So what the assembler does is to assemble the source codes, read them and then translate them into machine codes.
The assembly Language makes use of abbreviations called mnemonics. Uses descriptive names for operations and data, e.g. , "LOAD value", "ADD data", "STORE value". Assemblers will translate these to machine languages.
Example: LOAD BASIC SALARY
ADD ALLOWANCES
STORE TOTALPAY