Computer fundamentals Computer fundamentals Computer Language www Assignment

  • Slides: 21
Download presentation
Computer fundamentals Computer fundamentals Computer Language www. Assignment. Point. com

Computer fundamentals Computer fundamentals Computer Language www. Assignment. Point. com

Introduction Computer fundamentals Computer fundamentals • A language which is acceptable to a computer

Introduction Computer fundamentals Computer fundamentals • A language which is acceptable to a computer system, is called a computer language or programming language, and the process of writing instructions is such a language for an already planned program is called programming coding. 12/22/2021 www. Assignment. Point. com 2

Computer fundamentals Computer fundamentals • All the computer languages can be broadly classified into

Computer fundamentals Computer fundamentals • All the computer languages can be broadly classified into three categories • Machine language • Assembly language and • High-level language 12/22/2021 www. Assignment. Point. com 3

Machine Language Computer fundamentals Computer fundamentals • A programming language, which can be understood

Machine Language Computer fundamentals Computer fundamentals • A programming language, which can be understood by a computer without using a translation program, is called the machine language of the computer. • It is normally written as strings 1 s and 0 s. 12/22/2021 www. Assignment. Point. com 4

Advantages and Limitations of Machine Language Computer fundamentals Computer fundamentals • Program written in

Advantages and Limitations of Machine Language Computer fundamentals Computer fundamentals • Program written in machine language can be executed very fast by the computer. • This is because machine instructions are directly understood by the computer, and no translation of the program is required. • However writing a program in machine language has several disadvantages, which are described below : – Machine dependent : Because the internal design of every type of computer is different from every other type of computer, the machine language also differs from computer to computer. Hence, after becoming proficient in the machine language of a particular computer, if a company decides to change to another computer, its programmers will have to learn a new machine language, and would have to rewrite all the existing programs. 12/22/2021 www. Assignment. Point. com 5

Computer fundamentals Computer fundamentals – Difficult program: Although machine language programs are directly and

Computer fundamentals Computer fundamentals – Difficult program: Although machine language programs are directly and efficiently executed by the computer, it is difficult to program in machine language. It is necessary for the programmer either to memorize the dozens of operation code numbers for the commands in the machine’s instruction set or to constantly refer to a reference card. – A programmer is also forced to keep track of the storage locations of data and instructions. Moreover, a machine language programmer must be an expert who knows about the hardware structure of the computer. 12/22/2021 www. Assignment. Point. com 6

Computer fundamentals Computer fundamentals • Difficult to modify: It is difficult to correct or

Computer fundamentals Computer fundamentals • Difficult to modify: It is difficult to correct or modify machine language programs. Similarly, modifying a machine language program later is so difficult that many programmers would prefer to code the new logic afresh, instead of incorporating the necessary modifications in the old program. • Error prone: For writing programs in machine language, since a programmer has to remember the opcodes, and must keep track of the storage locations of data and instructions, it becomes very difficult for him/her to concentrate fully on the logic of the problem. This frequently results in programming errors. 12/22/2021 www. Assignment. Point. com 7

Assembly Language Computer fundamentals Computer fundamentals • A language, which allows instructions and storage

Assembly Language Computer fundamentals Computer fundamentals • A language, which allows instructions and storage locations to be represented by letters and symbols, instead of numbers, is called assembly language or symbolic language. A program written in an assembly language is called assembly language program or a symbolic program 12/22/2021 www. Assignment. Point. com 8

Advantages of Assembly Language over Machine language Computer fundamentals Computer fundamentals – Easier to

Advantages of Assembly Language over Machine language Computer fundamentals Computer fundamentals – Easier to understand use – Easier to locate and correct errors – Easier to modify – No worry about addresses – Easily relocatable – Efficiency of machine Language 12/22/2021 www. Assignment. Point. com 9

Limitations of Assembly Language Computer fundamentals Computer fundamentals • The following limitations of machine

Limitations of Assembly Language Computer fundamentals Computer fundamentals • The following limitations of machine language are not solved by using assembly language – Machine dependent – Knowledge of hardware required – Machine level coding 12/22/2021 www. Assignment. Point. com 10

High-level Language Computer fundamentals Computer fundamentals • Machine and assembly languages are often referred

High-level Language Computer fundamentals Computer fundamentals • Machine and assembly languages are often referred to as low-level programming languages, because they are machine dependent, they require the programmers to have a good knowledge of the internal structure of the computer being used, and they deal with machinelevel coding requiring one instruction to be written for each machine-level operation. High-level programming languages overcome these limitations of low-level programming languages. 12/22/2021 www. Assignment. Point. com 11

Compiler Computer fundamentals Computer fundamentals • A compiler is a translator program, which translates

Compiler Computer fundamentals Computer fundamentals • A compiler is a translator program, which translates a high-level language program into its equivalent machine-language program Input compiler Output High-level language program 12/22/2021 Machine language www. Assignment. Point. com 12

Linker Computer fundamentals Computer fundamentals • A linker is a software, which takes multiple

Linker Computer fundamentals Computer fundamentals • A linker is a software, which takes multiple object program files of a software, and fits them together to assemble them into the program’s final executable form, which is sometimes called a load module. 12/22/2021 www. Assignment. Point. com 13

Interpreter Computer fundamentals Computer fundamentals • An interpreter is a translator program, which translates

Interpreter Computer fundamentals Computer fundamentals • An interpreter is a translator program, which translates a high-level language program into its equivalent machine language program. • However, unlike a compiler, which merely translators the entire source program into an object program and is not involved in its execution, an interpreter takes one statement of source program, translates it into machine language instructions, and then immediately executes the resulting machine language instructions, before taking the next statement for translation. • No object program of the source program is generated by the interpreter. 12/22/2021 www. Assignment. Point. com 14

Advantages and Limitation of High-level Languages Computer fundamentals Computer fundamentals • High-level languages enjoy

Advantages and Limitation of High-level Languages Computer fundamentals Computer fundamentals • High-level languages enjoy the following advantages over assembly and machine languages: – Machine independence – Easier to learn and use – Fewer error – Lower program preparation cost – Better documentation – Easier to maintain 12/22/2021 www. Assignment. Point. com 15

Limitations of high-level Languages Computer fundamentals Computer fundamentals • The two limitations of high-level

Limitations of high-level Languages Computer fundamentals Computer fundamentals • The two limitations of high-level languages are as follows : – Lower efficiency – Less flexibility 12/22/2021 www. Assignment. Point. com 16

What was the first generation of programming languages? Computer fundamentals Computer fundamentals • Machine

What was the first generation of programming languages? Computer fundamentals Computer fundamentals • Machine languages were the first languages available for programming computers – First-generation languages • A machine language provides a set of commands, represented as a series of 1 s and 0 s 12/22/2021 www. Assignment. Point. com 17

What is a second-generation languages? Computer fundamentals Computer fundamentals • An assembly language allows

What is a second-generation languages? Computer fundamentals Computer fundamentals • An assembly language allows programmers to use abbreviated command words, called op codes, rather than 1 s and 0 s • Classified as a low-level language • Most often used to write system software 12/22/2021 www. Assignment. Point. com 18

What is a third generation languages? Computer fundamentals Computer fundamentals • Third-generation languages use

What is a third generation languages? Computer fundamentals Computer fundamentals • Third-generation languages use easy-to-remember command words to take the place of several lines of assembly language or endless strings of machine language – COBOL – FORTRAN – Pascal –C – BASIC 12/22/2021 www. Assignment. Point. com 19

What is a fourth generation languages? Computer fundamentals Computer fundamentals • Fourth-generation languages more

What is a fourth generation languages? Computer fundamentals Computer fundamentals • Fourth-generation languages more closely resemble human languages • Eliminate many of the strict punctuation and grammar rules complicating third-generation languages • Typically used for database applications – SQL – RPG-I 12/22/2021 www. Assignment. Point. com 20

What about fifth-generation languages? Computer fundamentals Computer fundamentals • Some believe a fifth-generation language

What about fifth-generation languages? Computer fundamentals Computer fundamentals • Some believe a fifth-generation language is a computer programming language based on a declarative programming paradigm • Other experts feel fifth-generation languages are those that allow programmers to use graphical or visual tools to construct programs 12/22/2021 www. Assignment. Point. com 21