tranlators. machine language the lowest-level programming languageprogramming language machine...

24
Tranlators

Upload: harry-quinn

Post on 29-Dec-2015

220 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Tranlators

Page 2: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Machine Language

• The lowest-level programming language • 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.

Page 3: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Machine Language

• Programs written in high-level languages are translated into machine language by a compiler.

• Sometimes referred to as machine code or object code, machine language is a collection of binary digits or bits that the computer reads and interprets. Machine language is the only language a computer is capable of understanding.

Page 4: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Machine Language

Page 6: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Assembly Language

• A program written in assembly language consists of a series of instructions mnemonics that correspond to a stream of executable instructions, when translated by an assembler, that can be loaded into memory and executed.

Page 7: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

• An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices.

Page 8: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

• It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture.

• This representation is usually defined by the hardware manufacturer, and is based on mnemonics

Page 9: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Assembly Language Program

• MOV AX, 47104MOV DS, AXMOV [3998], 36INT 32

Page 10: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Assembly Language

• Transforming assembly into machine language is accomplished by an assembler

Page 11: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers
Page 12: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

High Level Language

• A programming language such as C, FORTRAN, or Pascal that enables a programmer to write programs that are more or less independent of a particular type of computer.

• Such languages are considered high-level because they are closer to human languages and further from machine languages.

Page 13: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

High Level Language

• In contrast, assembly languages are considered low-level because they are very close to machine languages.

• A computer language whose instructions or statements each – correspond to several machine language instructions,

designed to make coding easier.

• Also known as higher-level language; higher-order language.

Page 14: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

High Level Language

• The main advantage of high-level languages over low-level languages is that they are – easier to read, write, and maintain.

• Ultimately, programs written in a high-level language must be translated into machine language by a compiler or interpreter.

Page 15: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

High Level Language

• The first high-level programming languages were designed in the 1950s.

• Now there are dozens of different languages, including Ada, Algol, BASIC, COBOL, C, C++, FORTRAN, LISP, Pascal, and Prolog.

Page 16: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Assembler

• An assembler converts basic computer instructions (Assembly Language) into a pattern of bits which can be easily understood by the computer and the processor can use it to perform its basic operations.

Page 17: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Assembler

• Some people call these instructions assembler language and others use the term assembly language.

Page 18: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Compiler

• A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code).

• The most common reason for wanting to transform source code is to create an executable program.

Page 19: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Compiler

• Compiler converts the entire source code into object code at once which can be then executed by the user

• This object code can then be executed multiple times by the user

• During execution the compiler is not required

Page 20: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Interpreter

• Converts High Level language into Machine Code

• Line by line execution of the source code

• Reads source code line by line->Converts into machine readable form->executes the line->proceeds to next line

Page 21: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

System Software

• Provides basic functionality to a computer

• System software is computer software designed to operate the computer hardware and to provide a platform for running application software.

Page 22: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

System Software

• Acts as an interface between user, application software and computer hardware

Page 23: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Application Software

• Software used for accomplishing a specific task is the Application software

• Maybe a single program or set of programs

• Set of programs that are written for a specific purpose and provide the required functionality is called software package

Page 24: Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers

Application Software

• Different kinds of applications:• Graphics• Word processors• Media Players• Database Applications• Accounting Purpose