Chapter 1 a13

Post on 06-Aug-2015

70 views 2 download

Tags:

Transcript of Chapter 1 a13

Chapter No.1

INTRODUCTION TO COMPUTERINTRODUCTION TO COMPUTER

COMPUTERCOMPUTER

An Electronic Device (Hardware).

which is used to solve our problem according to given instructions

(Software).

SOFTWARESOFTWARE

A set of Instruction given to computer to perform a specific task.

HOW THEY WILL COMMUNICATE?HOW THEY WILL COMMUNICATE?

• In simple word language is a way of communication for any person to other person in order to understand his talk.

• Language is very important medium of communication

LANGUAGELANGUAGE

How can I give Instructions

to computerCan You Help Me?

PROGRAMMING LANGUAGEPROGRAMMING LANGUAGE

A way by which we give instructions to computer is called computer programming language.

A way of communication between user and computer.

PROGRAMMING LANGUAGEPROGRAMMING LANGUAGE

TYPES OF LANGUAGESTYPES OF LANGUAGES

LOW LEVEL LANGUAGE.

HIGH LEVEL LANGUAGE

LANGUAGE

LOW LEVEL HIGH LEVEL

ASSEMBLY

MACHINE

Low level language is also called machine language.

These languages are close to machine and easily understand by machine as, it is majorly in binary form (0 & 1).

LOW LEVEL LANGUAGELOW LEVEL LANGUAGE

Machine language

Assembly language

TYPES OF LOW LEVEL LANGUAGETYPES OF LOW LEVEL LANGUAGE

Machine language is the only language a computer is capable of understanding.

Machine code is consisting of 0 & 1. Which mean off and on bit.

Program written in machine language is very fast but machine dependent.

It is also referred as “First Generation Language”.

MACHINE LANGUAGEMACHINE LANGUAGE

Assembly language is also low level language close to machine language.

It is also referred as assembly or ASL, assembly language and “Second Generation Language”.

Assembly language uses structured commands as substitutions for numbers allowing humans to read the code more easily than looking at binary.

Although easier to read than binary, assembly language is still a complex language

ASSEMBLY LANGUAGEASSEMBLY LANGUAGE

MACHINE LANGUAGEMACHINE LANGUAGE

ASSEMBLY LANGUAGEASSEMBLY LANGUAGE

High level programming languages use the syntax which closes to human languages.

It is easy to understanding the languages. This type of language is machine-

independent, and uses similar language as English, which is easily understandable by human.

This type of language’s processing is slow as compared to low level languages.

HIGH LEVEL LANGUAGEHIGH LEVEL LANGUAGE

HIGH LEVEL LANGUAGEHIGH LEVEL LANGUAGE

FORTRAN

BASIC

COBOL

LISP

PASCAL

C AND C++

PRINTING “HELLO”PRINTING “HELLO”

MACHINE LANGUAGEMACHINE LANGUAGE

PRINTING “HELLO” IN ASSEMBLY LANGUAGEPRINTING “HELLO” IN ASSEMBLY LANGUAGE

A_CR = $0D ;carriage return BSOUT = $FFD2 ;kernel ROM sub, write to current output device

LDX #$00 ;starting index in .X register ;

LOOP LDA MSG,X ;read message text

BEQ LOOPEND ;end of text ;

JSR BSOUT ;output char INX BNE LOOP ;

repeat ; LOOPEND RTS ;return from subroutine ;

MSG .BYT 'Hello’,A_CR,$00

PRINTING “HELLO” IN BASIC LANGUAGEPRINTING “HELLO” IN BASIC LANGUAGE

PRINT "Hello"

ABCD

WHY IT HAPPENS?

LANGUAGE TRANSLATER

ABCD

0100001010001001000110100100

LANGUAGE TRANSLATORLANGUAGE TRANSLATOR

Software which is used to convert code into machine language

Compiler

Interpreter

Assembler

COMPILERCOMPILER

A software which is used to convert source code into object code at a time.

Faster in execution

But

Difficult Error Detection.

COMPILERCOMPILER

COMPILERABCD

0100001010001001000110100100

INTERPRETERINTERPRETER

A software which is used to convert source code into object code line by line.

Slower in execution

But

Easy Error Detection.

INTERPRETERINTERPRETER

INTERPRETER

A

C

B

0100000101000010

01000011

ASSEMBLERASSEMBLER

Assembly is low level language but not a native language for computer Translator which is used to convert assembly language in machine language.

RECAPRECAP

Programming Language.

Types of Programming Language

Language Translator

Types of Language Translators

QUESTIONSQUESTIONS

What is Language?

Which Language Translator is best of debugging?

QUESTIONSQUESTIONS

What is programming Language?

Why we need language Translator?

Which Language is faster in execution?

Which is native Language of computer?

Which Language Translator is faster?

ADVANTAGES & DISADVANTAGES OF LOW LEVEL LANGUAGES ?

ASSIGNMENTASSIGNMENT

ADVANTAGES & DISADVANTAGES OF HIGH LEVEL LANGUAGES ?

COMPUTER SOFWARE

NEXT LESSONNEXT LESSON