Top Banner
INTRODUCTION TO COMPUTER SYSTEM ORGANIZATION AND NUMBER SYSTEMS
26
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Computer System Organization

INTRODUCTION TO COMPUTER SYSTEM ORGANIZATION AND NUMBER SYSTEMS

Page 2: Introduction to Computer System Organization

OBJECTIVES

At the end of the session, the student is expected to: Have an overview of the structured computer

organization Identify the number system and its different bases Develop good computation skills in different number

base conversions Appreciate the importance of number systems in

relation to computers and its applications Distinguish the different processes of performing

diverse arithmetic operations on various number systems

Add, subtract, multiply and divide numbers following the standard steps

Develop an attitude of handling numbers and its mathematical operations in detail

04

/08

/20

23

2

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 3: Introduction to Computer System Organization

STRUCTURED COMPUTER ORGANIZATION

Program – sequence of instructions describing how to perform a certain task

Machine language – a language into which it is possible for people to communicate with the computer

04

/08

/20

23

3

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 4: Introduction to Computer System Organization

THINK ABOUT THIS..

There is a large gap between what is convenient to people and what is convenient for computers...

People want to do X but computer can only do Y.

How must the communication be done between the two?

04

/08

/20

23

4

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 5: Introduction to Computer System Organization

REMEDY

To design a new set of instructions that is more convenient for people to use than the set of built-in machine instructions (L0 and L1) Translation – the technique of replacing L1 by an

equivalent L0 instruction first then allowing the computer to execute the new program with entirely L0 instructions

Interpretation – write a program in L0 that takes programs in L1 as input data and carries them out by examining each instruction in turn and executing the equivalent sequence of L0 instructions directly Interpreter – the program that carries it out

04

/08

/20

23

5

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 6: Introduction to Computer System Organization

VIRTUAL MACHINES

Virtual Machine – a hypothetical computer

04

/08

/20

23

6

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 7: Introduction to Computer System Organization

CONTEMPORARY MULTILEVEL MACHINES

Device level – level below level 0 wherein the designer sees individual transistors, which are the lowest-level primitives for computer designers.

04

/08

/20

23

7

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 8: Introduction to Computer System Organization

CONTEMPORARY MULTILEVEL MACHINES

Digital Logic Level – it is composed of gates which can form a 1-bit memory. These memories can be combined to form groups of 16,32,64 to form REGISTERS. Each register can hold a single binary number

Microarchitectural Level – a collection of 8-32 registers that form a local memory and an ALU that is capable of performing simple arithmetic operations. The registers are connected to the ALU to form DATA PATH. Microprogram – program that controls the

operation of the data path

04

/08

/20

23

8

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 9: Introduction to Computer System Organization

CONTEMPORARY MULTILEVEL MACHINES

Instruction Set Architecture (ISA) Operating System Machine Level – set of

instruction are in ISA level but there is a set of new instructions, different memory organization, ability to run 2 or more programs concurrently

04

/08

/20

23

9

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 10: Introduction to Computer System Organization

DIFFERENCE B/W LEVELS 0-3 AND 4-5

Levels 0-3 Levels 4-5

Not designed for garden-variety programmer but for systems programmer

Intended for applications programmer

Interpreted Translated

Numeric machine language Symbolic form for the underlying programs

Assembler – programs that perform the translation from assembly language to level 1, 2, or 3.

Compiler – it translates programs written in BASIC, C, C++, Java, LISP and Prolog to level 3 or 4

04

/08

/20

23

10

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 11: Introduction to Computer System Organization

04

/08

/20

23

11

by: K

arla

Louissa

Marie

A. D

ar, C

pE

THE EVOLUTION OF PROGRAMMING LANGUAGES

· Early computers were programmed in machine language.

Suppose we want to represent the equation wages = rate · hoursto calculate the weekly wages in machine language.

If 100100 stands for load, 100110 stands for multiplication and 100010 stands for store, then the following sequence of instructions might be needed to calculate the weekly wages.

100100 0000 010001100110 0000 010010100010 0000 010011

Page 12: Introduction to Computer System Organization

04

/08

/20

23

12

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Assembly languages - an instruction in assembly language is an easy-to-remember form called a mnemonic.

Using the assembly language instructions, the equation to calculate the weekly wages can be written as follows:

LOAD rateMULT hourSTOR wages

Assembler: An assembler is a program that translates a program written in assembly language into an equivalent program in machine language.

Page 13: Introduction to Computer System Organization

04

/08

/20

23

13

by: K

arla

Louissa

Marie

A. D

ar, C

pE

High level languages- Basic, FORTRAN, COBOL, Pascal, C++, C In order to calculate the weekly wages, the equation

wages = rate · hours

in C++, can be written as follows:

wages = rate * hours;

Compiler: A compiler is a program that translates a program written in a high level language to an equivalent machine language.

Page 14: Introduction to Computer System Organization

NUMBER SYSTEM

It is a way of counting things and identifying the quantity of something.

Base – it is also called as the radix It refers to the number of digits in a number

system

04

/08

/20

23

14

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 15: Introduction to Computer System Organization

COMMONLY USED BASES OF NUMBER SYSTEMS IN ASSEMBLY LANGUAGE

Decimal Number System – the term decimal comes from the latin word “decem” which means TEN.

Binary Number System – the term binary comes form the latin word meaning two at a time

Hexadecimal Number System – the term hexadecimal comes from the greek word “hexa” meaning six and “decem” meaning 10. So, it has a base 16.

04

/08

/20

23

15

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 16: Introduction to Computer System Organization

Decimal Binary Hexadecimal

0 0000 0

1 0001 1

2 0010 2

3 0011 3

4 0100 4

5 0101 5

6 0110 6

7 0111 7

8 1000 8

9 1001 9

10 1010 A

11 1011 B

12 1100 C

13 1101 D

14 1110 E

15 1111 F

04

/08

/20

23

16

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 17: Introduction to Computer System Organization

CONVERSION OF NUMBER SYSTEMS

Decimal-to-binary Conversion – it requires successive division by two Divide the number by 2 Multiply the quotient by 2 Get the remainder

Decimal to Hexadecimal Divide the number by 16 Multiply the quotient by 16 Get the remainder

04

/08

/20

23

17

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 18: Introduction to Computer System Organization

CONVERSION OF NUMBER SYSTEMS

Binary-to-decimal conversion Positional notation by powers of 2

Binary-to-hexadecimal conversion Hexadecimal-to-decimal conversion

Positional notation by powers of 16 Hexadecimal-to-binary conversion

Memory method

04

/08

/20

23

18

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 19: Introduction to Computer System Organization

CONVERT

Base-10 Base-2 Base-16

5763

895

48

11010

2503

04

/08

/20

23

19

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 20: Introduction to Computer System Organization

CONVERT

Binary Decimal Hexadecimal

101

10111

1100011

11101111

11000111100000

04

/08

/20

23

20

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 21: Introduction to Computer System Organization

CONVERT

Hexadecimal Decimal Binary

F4

BEA

DEED

FADED

1CEDC0FFEE

04

/08

/20

23

21

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 22: Introduction to Computer System Organization

ARITHMETIC OPERATIONS ON NUMBER SYSTEMS

Addition - combines two numbers, the augend and the addend, into a single number called the sum Decimal Binary Hexadecimal

Add starting from the rightmost digit If the result is greater than 15, subtract 16 from the

result ( you’ll subtract 16 because hexadecimal is a base-16 number system.

Count the number of times you subtract 16 and that will be the value of the carry over

04

/08

/20

23

22

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 23: Introduction to Computer System Organization

ARITHMETIC OPERATIONS ON NUMBER SYSTEMS

Subtraction: a = b – c; where a is the difference, b is the minuend and c is the subtrahend Decimal Binary

Subtract starting from the rightmost digit If the minuend is less than the subtrahend, borrow one

unit from the left digit which is equivalent to 2. Hexadecimal

Subtract starting from the rightmost digit Subtract the digits in the next place value. If the

minuend is less than the subtrahend, borrow one unit from the left digit and that 1 unit is equal to 16

04

/08

/20

23

23

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 24: Introduction to Computer System Organization

ARITHMETIC OPERATIONS ON NUMBER SYSTEMS

Multiplication Decimal Binary Hexadecimal

Use the hexadecimal multiplication table

04

/08

/20

23

24

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 25: Introduction to Computer System Organization

X 0 1 2 3 4 5 6 7 8 9 A B C D E F

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 0 1 2 3 4 5 6 7 8 9 A B C D E F

2 0 2 4 6 8 A C E 10 12 14 16 18 1A 1C 1E

3 0 3 6 9 C F 12 15 18 1B 1E 21 24 27 2A 2D

4 0 4 8 C 10 14 18 1C 20 24 28 2C 30 34 38 3C

5 0 5 A F 14 19 1E 23 28 2D 32 37 3C 41 46 4B

6 0 6 C 12 18 1E 24 2A 30 36 3C 42 48 4E 54 5A

7 0 7 E 15 1C 23 2A 31 38 3F 46 4D 54 5B 62 69

8 0 8 10 18 20 28 30 38 40 48 50 58 60 68 70 78

9 0 9 12 1B 24 2D 36 3F 48 51 5A 63 6C 75 7E 87

A 0 A 14 1E 28 32 3C 46 50 5A 64 6B 78 82 8C 96

B 0 B 16 21 2C 37 42 4D 58 63 6B 79 84 8F 9A A5

C 0 C 18 24 30 3C 48 54 60 6C 78 84 90 9C A8 B4

D 0 D 1A 27 34 41 4E 5B 68 75 82 8F 9C A9 B6 C3

E 0 E 1C 2A 38 46 54 62 70 7E 8C 9A A8 B6 C4 D2

F 0 F 1E 2D 3C 4B 5A 69 78 87 96 A5 B4 C3 D2 E1

04

/08

/20

23

25

by: K

arla

Louissa

Marie

A. D

ar, C

pE

Page 26: Introduction to Computer System Organization

ARITHMETIC OPERATIONS ON NUMBER SYSTEMS

Division Decimal Binary Hexadecimal

Hexadecimal division is complicated to do manually Recommendation:

Convert the dividend and the divisor into its decimal equivalent

After converting, divide the numbers in decimal way Convert the quotient and the remainder into its

hexadecimal equivalent.

04

/08

/20

23

26

by: K

arla

Louissa

Marie

A. D

ar, C

pE