






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Session One: History of programming languages
1.1 Session Objectives
By the end of this session, you should be able to:
Def: Computer
Data & Execution & Instructions storage
Data :What is fed into a computer (raw facts).
Information: is already processed data.
Information
Smartwatch Features You Need to Consider
N/b: For the above computer to work, it has to be programmed.
Computer program Def 1: - is a set of instructions written in the computer language specifying processing operations on data.
Def 2: -It is a coded list of instructions performing a set of calculations.
Example: A program to add three numbers, calculate average and display results. 1.Begin
N/B A program has input, process and output.
Computer Programming : process of producing a computer program. Programming involves:-
Programming Language : Language that is understood by the hardware.
1.3. Types of Programming Languages There are three levels of programming languages;
1.3.1 Machine language The lowest-level programming language (except for computers that utilize programmable microcode) Machine languages are the only languages understood by computers. While easily understood by computers, machine languages are almost impossible for humans to use because they consist entirely of numbers. It is a programming language in which the instructions are in a form that allows the computer to perform them immediately, without any further translation being required. Instructions are in the form of a Binary code also called machine code and are called machine instructions. Commonly referred to as the First Generation language
1.3.2 Assembly Language Introduced in 1950s, reduced programming complexity and provided some standardization to build and applications. Also referred to second generation language. The 1 and 0 in machine language are replaced by with abbreviations or mnemonic code. It consists of a series of instructions and mnemonics that correspond to a stream of executable instructions. It is converted into machine code with the help of an assembler. Common features includes;
Advantages of Assembly language over machine language
1.3.3 High level language A Machine independent and a Problem oriented (POL) programming language. High level language is portable across different machine types (architectures); The machine independence of the high level languages means that in principle it should be possible to make the same high- level language run on different machines. It reflects the type of problem solved rather than the features of the machine.
High level languages are more abstract, easier to use and more portable across platforms as compared to low-level programming languages. A programmer uses variables, arrays or Boolean expressions to develop the logic to solve a problem. Source programs are written in statements akin to English. A high level language code is executed by translating it into the corresponding machine language code with the help of a compiler or interpreter. High level languages can be classified into the following categories;
Procedure languages. High-level languages designed to solve general-purpose problems, example BASIC, COBOL, FORTRAN, C, C++ and JAVA. They are designed to express the logic and procedure of a problem. Though the syntax of the languages may be different, they use English-like commands that are easy to follow. They are portable.
Problem-oriented languages(4 th^ GL) Used to solve specific problems.
1.4.1 High Level language Translation High level languages need to be translated into machine language which is the computer language. The translation is done by a Compiler or Interpreter
1.4.2 Compiler A compiler is a manufacturer specifically written computer program which translates (or compiles) a source code computer program that translates the source code written in a high level language into the corresponding object code of the low level language. The translation process is called compilation. The entire high level source code / program is converted into the executable machine code file prior to the object program being loaded into main memory and executed. Translation done only ones and the object program can be loaded into the main storage and executed. A program that translates a low-level language into a high level language is called a Decompiler. Compiled languages includes C, C++, COBOL, FORTRAN etc.
Compilers are classified into single-Pass compilers and Multi-pass compilers. Single-pass compilers are generally faster than multi-pas compilers, but multi-pass compilers are required to generate high quality code
A Compiler:
1.4.3 Interpreter: The interpreter is a translation program that converts each high-level language statement into the corresponding machine code. The translation process is carried out just before the program statement is executed. Instead of the entire program, one program statement at a time is translated and executed immediately. When using an interpreter, the source code translated every time the program is executed
The commonly interpreted languages include BASIC and PERL. Though interpreters are easier to create as compared to compilers, the compiled languages can be executed more efficiently and are faster. Interpreters are appropriate in;
1.5.0 Session Summary
We use computer programs almost in all our day to day activities. Computers consisted
of hardware and software components. Programs consist of a group of instructions
designed to accomplish a certain computer task. In order to create computer programs,
we use other software called software development tools which include assemblers,
compilers, and interpreters.
1.5.1 Student Activity
a) What is a program?