100% satisfaction guarantee Immediately available after payment Read online or as PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

INTRODUCTION TO PROGRAMMING.................................................................................. 1 Development of computer programming languages.................................................................... 1 Introduction...............

Rating
-
Sold
-
Pages
25
Grade
A+
Uploaded on
10-08-2023
Written in
2023/2024

INTRODUCTION TO PROGRAMMING Definitions Computer programming is the aspect of translation of user’s ideas in to a form that can be understood by the computer by the use of an acceptable tool called computer programming language. A computer program is a set of coded instructions for the computer to obey and process data. Programming language is set of instructions or a tool used for writing computer programs. NB the purpose of computer programming is to solve the users needs i.e. developing instructions for the computer with the aim of solving a particular user problem. This enables the computer to accept and manipulate data and print results automatically. Development of computer programming languages. Introduction Primary function of programming languages is to provide instructions to the computer system so that it can perform a processing activity. Each programming language uses a set of symbols that have special meaning. Each language has its own rules called syntax of the language. The language syntax dictates how the symbols should be combined into statements capable of conveying meaningful instructions to the CPU. Programming languages can be grouped into the following major categories: a) Machine language They are the most basic level of programming languages. In the early stages of computer developments, all program instructions had to be written using binary codes( O’s and 1’s) , unique to each computer. This type of programming involves the difficult task of writing instructions in the form of strings of binary digits (ones & zeros) or other number systems. In this type of programming language data and instructions were all made in O’s and 1’s which made it difficult to locate and differentiate. Programmers must have a detailed knowledge of the internal operations of the specific type of CPU they are using. For this reason programming work was left to hardware engineers who had internal knowledge of the computer. They must write long series of detailed instructions to accomplish even simple processing tasks. Programming in machine language requires specifying the storage locations (memory address) for every instruction and item of data used. Execution of instructions was done in the order in which they occurred in the main storage. These requirements make machine language programming a difficult and error-prone task. A machine code instruction is made up of two parts: i.) The operation code: It instructs the computer on what to be done ii.) Operand code: It instructs the computer on the address of the memory location whose contents are to be worked upon. Advantages i.) The instructions written using this language are executed very fast because no translation required. ii.) There is efficient use of the C.P.U as this instructions do not occupy large memory space Disadvantages Introduction to programming Prepared by Fred lisalitsa 2 i.) Both data and instructions are expressed in binary digits hence difficult to differentiate ii.) The programs are lengthy and time consuming iii.)The programs are machine dependent hence difficult to be executed by different machine iv.)Programs are error prone. b) Assembly language(Low level language) Assembly languages are the next level of programming languages. They were developed to reduce the difficulties in writing machine languages programs. Programs were written using symbols to represent the instructions (symbolic representation of machine code). Assembly languages are frequently called symbolic languages, because symbols are used to represent operation codes and storage locations. Convenient alphabetic abbreviations called mnemonics ( memory aids) and other symbols are used to represent operation codes, storage locations, and data elements example Sub for subtraction com for computer add for addition e.t.c. the symbolic address are used in place of machine address. Comments can be incorporated in the programs statements to make it easier to be understood by the human programmer. It become possible to include macros and subroutines on programs. A macro is a single instruction written as part of a program and generates many machine code instructions. The use of assembler languages requires language translator programs called assemblers, which allow a computer to convert the instructions of such languages into machine instructions. The process of translating a program is as follows:  The assembler translates the symbolic operation codes into machine code and symbolic address into actual machine address. This is done on the basis of one to one mapping.  During the process it includes the necessary linkages for closed sudroutines and program macros.  The assembler allocates areas in the main memory  The assembler then indicates any invalid source language instructions.  Produces the object program on disk or tape.  It then produces a printed listing of the source code together with comments NB Assembler languages are still widely used as a method of programming a computer in a machine-oriented language. Most computer manufacturers provide an assembler language that reflects the unique machine language instruction set of a particular line of computers. This feature is particularly desirable to systems programmers, who program system software (as opposed to applications programmers, who program applications software), since it provides them with greater control and flexibility in designing a program for a particular computer. They can then produce more efficient software – that is, programs that require a minimum of instructions, storage, and CPU time to perform a specific processing assignment. Advantages a) In an assembly language, alphabetic abbreviations that are easier to remember are used in place of the actual numeric addresses of the data. b) It is readable both by man and machine c) These programs run faster because they are machine specific and closer to machine code. d) It is concise with few instructions and consequently needs smaller storage space for the code. e) It is quite efficient with translation time, execution time and storage requirements. Introduction to programming Prepared by Fred lisalitsa 3 Disadvantages a) Assembly language is machine dependent hence it is not portable and compatible between various computer systems. b) Assembly language is hard to learn compared to high level languages. c) Program takes longer to code due to intricate nature of the language. d) Each computer has a different language and retraining programmers presents a problem whenever a company acquires a new computer. e) It makes stand by arrangements in case of breakdown difficult because work cannot be run on a different computer. f) It lacks debugging aids. c) High Level languages High level languages allow problems to be specific in a human and problem oriented manner. The programs of high level languages are very close to human language or the standard notation of mathematics hence it is easy to learn and use. The instructions of High level languages are called Statements and closely resemble human language. Individual high￾level language statements are actually macro instructions; each individual statement generates several machine instructions when translated into machine language by high-level language translator programs called compilers or interpreters. High-level language statements resemble the phrases or mathematical expressions required to express the problem or procedure being programmed. The syntax (vocabulary, punctuation, and grammatical rules) and the semantics (meaning) of such statements do not reflect the internal code of any particular computer. The development of high level languages was intended to overcome the main limitations of the low level languages. The high level languages are therefore machine independent and problem oriented .i.e. they reflect the type of problem being solved rather than the features of the machine. The machine independence of high level languages means that it is possible to make a program that can be run on different machines i.e. program portable. The portability of a program has the following advantages: i.) A user of a program can easily change to newer or bigger computer without the need of re-writing the program again. ii.) Users of different computers can exchange programs. iii.)Users can develop programs and sell them to different organizations. iv.) Portability has enabled the coming up of software companies which develop and maintain programs for companies and individuals. Features of high level languages a) They have extensive vocabulary of words and symbols. b) Programs are written in one language and the statements are translated into many machine instructions. This translation is done by a special program called compiler or interpreter. c) Libraries of macros and subroutines can be incorporated. d) Because they are problem oriented the programmer is able to work at least to some extend independent of the machine. Introduction to programming Prepared by Fred lisalitsa 4 e) A set of rules must be obeyed when writing a source program. These rules which govern the structure of the statements in the language constitute what is called syntax of the language. f) Program written in a high level language must be translated into machine code before it can be executed. Types of high level languages High level languages can be categorized into the following groups a) Commercial languages These are programming languages that were created to be used in commercial firm’s .i.e. in business. The most common commercial language is COBOL( COmmon Business Oriented Language. It is the most widely used programming language for business applications. COBOL has an extensive file handling facilities e.g. movement and processing. The language resembles English. .i.e. it incorporates common English terms such as MOVE ADD Another example of commercial language is RPG : (Report Program Generator). A problem￾oriented language that generates programs that produce reports and perform other data processing tasks. It is a popular language with many business minicomputer users. Example COBOL ( Procedure Division) 3GL PROCEDURE DIVISION. MAIN. PERFORM INITIALIZATION. PERFORM PROCESS-RECORDS UNTIL END-OF-FILE. PERFORM END-OF-JOB. INITIALIZATION OPEN INPUT IN-FILE. OPEN OUTPUT OUT-FILE. PERFORM READ-RECORDS. PROCESS-RECORDS. ADD SCORES TO STORE-SCORE. ADD 1 TO STORE-NUMBER. MOVE NAME-IN TO NAME-OUT. MOVE SCORE TO SCORE-OUT. WRITE OUT-REC FROM PRINTER-LINE AFTER ADVANCING 1. PERFORM READ-RECORD. END-OF-JOB. DIVIDE STORE-NUMBER INTO STORE-SCORE GIVING AVERAGE. WRITE OUT-REC FROM AVERAGE-LINE. AFTER ADVANCING 2 LINES. CLOSE IN-FILE. CLOSE OUT-FILE. STOP RUN. READ-RECORD. READ IN-FILE. AT END MOVE “Y” TO EOF-FLAG. Introduction to programming Prepared by Fred lisalitsa 5 b) Scientific languages These are programming languages that are used for scientific and engineering purpose e.g. ALGOL : (ALGOrithmic Language). An international algebraic language designed primarily for scientific and mathematical applications. It is widely used in Europe in place of FORTRAN. FORTRAN : (FORmula TRANslation). The oldest of the popular high-level languages. It is still widely used for scientific and engineering applications. These programming languages have extensive mathematical and computation ability. They also have a large library of inbuilt mathematical functions. c) Special Purpose Languages These are programming languages intended to be tailor made language for particular type of problem e.g machine control, simulation and control of experiments e.g o Coral 66 o IRTB(Industrial Real Time Basic ) used for real time applications. o Modular 2- it was developed for development of computer systems. o Ada : Named after Augusta Ada Byron, considered the world’s first computer programmer. Developed for the U.S. Department of Defense as a standard “high-order language” to replace COBOL and FORTRAN. d) Multi-purpose languages: These are languages used to solve both business and scientific problems. Examples include the following: APL : ( A Programming Language). A mathematically oriented interactive language. It utilizes a very concise symbolic notation designed for efficient interactive programming of analytical business and scientific applications. BASIC : (Beginner’s All-Purpose Symbolic Instruction Code). A simple procedure-oriented language widely used for end user programming. C : A mid-level structured language developed as part of the UNIX operating system. It resembles a machine-independent assembler language and is presently popular for system software programming and development of application software packages. Pascal : Named after Blaise Pascal: Developed as a powerful successor to ALGOL, and designed specifically to incorporate structured programming concepts. PL/1 : (Programming Language/1). A general-purpose language developed to combine some of the features of COBOL, FORTRAN,ALGOL, and other languages. It is a flexible language used for business and scientific applications. Example of programs: WHAT ARE THE AVERAGE EXAM SCORES FOR STUDENTS IN MIS 200? BASIC 10 REM AVERAGE EXAM SCORE PROGRAM 20 LET COUNTER = 0 30 LET TOTAL = 0 40 OPEN “STUDDATA” FOR INPUT AS #1 50 INPUT #1, SCORE 60 WHILE SCORE 9999 70 LET COUNTER = COUNTER +1 80 LET TOTAL = TOTAL + SCORE 90 INPUT #1, SCORE

Show more Read less
Institution
INTRODUCTION TO PROGRAMMING
Course
INTRODUCTION TO PROGRAMMING










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
INTRODUCTION TO PROGRAMMING
Course
INTRODUCTION TO PROGRAMMING

Document information

Uploaded on
August 10, 2023
Number of pages
25
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Nechemia17 Campbell University
View profile
Follow You need to be logged in order to follow users or courses
Sold
140
Member since
4 year
Number of followers
124
Documents
1880
Last sold
3 weeks ago
BEST HOMEWORK HELP AND TUTORING ,ALL KIND OF QUIZ or EXAM WITH GUARANTEE OF A

WELCOME TO MY WORLD, GET ALL KIND OF EXAMS ON THIS PAGE, COMPLETE TEST BANKS, SUMMARIES,STUDY GUIDES, PROJECT PAPERS, ASSIGNMENTS, CASE STUDIES AND YOU CAN ALSO COMMUNICATE WITH THE SELLER FOR ANY PRE WORK EXAMS, I ASSURE YOU A SATISFACTORY WORK IF YOU WILL USE MY WORK.

3.9

20 reviews

5
11
4
1
3
5
2
1
1
2

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions