Introduction to Programming Program: The term program refers to a set of Instructions that Instructs a computer on what to do. Programs are Solutions to Problems. These Instructions are written using programming languages.
A program can instruct a computer to: – Read/ accept Input data – Calculate or compare – store data – write or display output The term steward raters to a computer program or set of programs and Its associated documentation such as user guide, technical manual Programming Languages ; Programming: This refers to the process of writing computer programs using a regaining language ; The person who write such Instructions Is a programmer ; Mathematicians have been credited for designing most of the programming languages and programs In the history of computing ; Each natural language has a systematic method of using symbols of a language. TLS Is dictated by rules to grammar – semantic (structure}and syntax (words and symbols) ; Similarly, computer programming languages are governed by the structure and syntax. In natural languages one can break the syntax rule, but we can use Inference (guesswork) to get what the person means. However, computers being machines, are receptive to only the exact syntax rules of the language being used. Types to Programming Languages ; A programming Language – Is a set of rules that provides a way of writing Instructions that Instructs a computer on what operations to perform. ; Programming languages can be classified into two broad categories namely: ; Low level programming Languages ; High level programming Languages ; Low level languages further classified into two generations namely: -? First Generation- Machine languages – Second Generation -Assembly languages Types of Programming Languages 2.
High-level languages further classified into three generations namely: – Third Generation- Procedural languages – Fourth Generation – Problem-oriented languages – Fifth Generation – Natural languages Low Level Languages Machine languages ; This is the oldest form of computer programming used to program first generation computers such as UNIVAC and MANIAC. Plug boards were used to represent data in binary (machine) form in the computer the circuitry. ; Data represented in series of Is and So are said to be in machine language. For example, the code below represent a segment of a machine code: 1011010100 ; Machine language also varies according to make of computer, another characteristic that make them hard to work with.
Assembly languages Assembly language use symbolic (mnemonics) such as ADD which allowed programmers to specify instructions simple words such as ADD, PM etc. To convert a program from assembly to binary form, a translator known as assembler was used. Compared to machine languages, assembly languages are much easier for humans to understand and to use. The machine language code we gave above could be expressed in assembly languages as: ADD PACK PM Advantages of low level languages 1 . They are executed very fast since no translator or minimum translation is involved. 2. 3. They require very little memory space. They have a high level of security since a program written in machine language is difficult to change or alter. Disadvantages of low-level languages 1 . 2. 3. 4.
Machine languages are time-consuming because the binary code instructions are complex. They are difficult to understand. They are difficult to debug and hence difficult to maintain. They are not portable I. Can only be used by specific computers. High level languages Procedural Languages ; Procedural languages, also known as third generation languages uses human language. The are intended to solve general problems. Examples of procedural languages are C, Pascal, FORmula TRANslation (FORTRAN), Common Business- Oriented Language (COBOL) . ; Like assembly languages, procedural languages must be translated into machine language so that the computer processes it. Pending on ten language tons translation Is permeate Day letter a compiler or an Interpreter. Language Processors