Computer Studies Today Chapter 21 3
Download
Report
Transcript Computer Studies Today Chapter 21 3
Chapter 21
Computer Studies Today
21
Chapter
1
» Computers operate according to
lists of instructions or programs.
» These programs are normally
written in some forms of computer
programming language.
Computer Studies Today
21
Chapter
2
» Before the programs are executed,
they must be converted into
machine codes.
A computer can only handle machine codes.
Computer Studies Today
21
Chapter
3
» Programming languages are
artificial languages designed to
generate or express programs.
» They can be classified into
– Low level languages
– High level languages
Computer Studies Today
21
Chapter
4
» They are machine dependent.
» They express computer
instructions by some codes closely
related to the particular computers
that are intended to execute the
instructions.
Computer Studies Today
21
Chapter
5
» Examples of low level languages
are:
– Machine language
– Assembly language
Computer Studies Today
21
Chapter
6
» It expresses computer instructions
in binary code.
» Each instruction consists of
operation codes and operands.
Computer Studies Today
21
Chapter
7
» For example,
Operation code
Operand
00000110
It expresses the instruction:
input data into address 0110.
Computer Studies Today
21
Chapter
8
» It can be executed directly by the
computer.
Computer Studies Today
21
Chapter
9
Disadvantages of Machine Language
» It is very difficult to learn,
understand and memorise.
» Programming in machine language
is time-consuming and very easy to
make mistakes.
Computer Studies Today
21
Chapter
10
» It is machine dependent, i.e. a
program written for one type of
computer cannot be executed by
another type of computer.
» Programs written in machine
language are very long, even for
simple tasks.
Computer Studies Today
21
Chapter
11
Machine language is difficult to understand
Computer Studies Today
21
Chapter
12
» It uses mnemonics and operands to
represent instructions.
Computer Studies Today
21
Chapter
13
Some commands in mnemonics
Computer Studies Today
21
Chapter
14
Disadvantages of Assembly Language
» It is machine dependent.
» It is difficult to learn and not easy
to write.
» Programs written in assembly
language are very long for complex
problems.
Computer Studies Today
21
Chapter
15