computer system architecture module code: cmc1411 duration: 10 weeks assessment scheme: continuous...

35
Computer System Architecture Module Code: CMC1411 Duration: 10 weeks Assessment Scheme: Continuous Assessment: 50% Examination: 50% Lecturer: Amy Ching

Upload: bernard-hancock

Post on 27-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Computer System Architecture Module Code: CMC1411 Duration: 10 weeks Assessment Scheme:

Continuous Assessment: 50% Examination: 50%

Lecturer: Amy Ching

Module Aims: To introduce at an elementary

level, and from a architectural perspective, the essential components in a computer system.

Reference Books: Shelly, G.B, Cashman, T.J. and

Waggoner G.A, Discovering Computers: A Link to the Future, World Wide Web Enhanced, 1st Ed. Of latest edition, International Thomson Publishing Co., 1999.

Mano, M. Morris, Computer System Architecture, 3rd Ed. Or latest edition. Prentice-Hall International, 1993.

Lectures 1 - 101. Binary System2. Boolean Algebra3. Logic Gates Design4. Component I & II5. Central Processing Unit6. Bus7. Devices8. Classification of Software9. System Software10. Utility Program

Key content Area1.Computer Systems Architecture

2. Logic System and Digital CircuitNumbering Systems: Arithmetic and Complement Representations, Boolean Algebra, Introduction to digital circuits

3. Hardware Components of a Computer SystemProcessor Unit, Main Memory, Input/Output Devices, Secondary Storage, Bus, Current processor and device technologies

4.Software Components of a Computer SystemClassification of Software, System Software, Operating Systems

Introduction of Binary System

Decimal to Binary Conversion Process and Vice Versa

When you create a program, numbers typed in your source code will be assumed to be decimal (unless you use specific notations, see Hexadecimal numbers). Your language compiler will then convert them into binary format.

At runtime, you program will compute in binary. When numbers are typed or displayed, they are

character strings until they are converted into binary by Base Translator or other programs like a spreadsheet program. These conversions are usually carried out by functions like printf, scanf, print, read, input, etc..

More… All the numbers (decimal) that we

type into our computer will eventually convert into Binary Numbers

Computer programs use Binary Numbers to run calculation

Thus there must be a method to convert Decimal Numbers into Binary Numbers

Binary Systems Only two numerals, i.e. 0 and 1. All decimals are represent by

0,1,2,3,4,5,6,7,8,9 Binary no. is also referred as ‘base 2’

no. The largest bit of a binary no. is called

the ‘most significant bit (MSB)’, while the smallest the least significant bit (LSB)’

Example: 1523

One can write: 1523 = 1*1000 + 5*100 + 2*10 + 3*1

More generally, by using powers(1) of the base 10: 1523 = 1*103 + 5*102 + 2*101 + 3*100

In this representation, 1 is the most significant digit of 1523 (because it is multiplied by 1000) and 3 is the less significant one.

Base-r no. Each digit can have a value from 0 to

(r-1) In a computer system, the following

no. systems are usually used. base 2 – binary base 8 – octal base 16 – hexadecimal

Hexadecimal no. ranges from 0 to 9 and then A to F.

Radix conversionBinary to decimal

bn bn-1 … b1 b0 . b-1 b-2 … b-n =

bn x 2n + bn-1 x 2n-1 + … + b1 x 21 + b0 x 20 + b-1 x 2-1 + … + b-n x 2-n

Exercise: Convert the binary no. 1010.0112 to decimal.

Base-r to decimalbn bn-1 … b1 b0 . b-1 b-2 … b-n =bn x rn + bn-1 x rn-1 + … + b1 x r1 + b0 x r0 + b-1 x r-1 + … + b-n x r-n

Exercise: Convert the no. 630.48 to decimal.

Number SystemName Base (number of

symbols per digit)Symbols

Binary 2 0,1

Octal 8 0,1,2,3,4,5,6,7

Decimal 10 0,1,2,3,4,5,6,7,8,9

Hexadecimal 16 0,1,2,3,4,5,6,7,8,9,

A,B,C,D,E,F

Representative of numbers in different formats

Decimal Binary Octal Hexadecimal

0 0 0 0

1 1 1 1

2 10 2 2

3 11 3 3

4 100 4 4

5 101 5 5

6 110 6 6

7 111 7 7

8 1000 10 8

9 1001 11 9

10 1010 12 A

11 1011 13 B

12 1100 14 C

13 1101 15 D

14 1110 16 E

15 1111 17 F

In the table above

14 =11102,

168

E16

Decimal to binaryBy repeated division by 2What is the binary value of 4110 ?

Divider Integer Remainder2 |412 |20 12 |10 02 | 5 02 | 2 12 | 1 0 0 1 Answer = (101001)2

Octal to binary Since each octal digit is equivalent

to 3 binary bits, just expand it each digit of the octal no. to 3 binary bits.What is the binary value of 6738 ?

Ans: 1101110112

Binary to octal use the reverse process of octal to

binary conversion, i.e. condensing each 3 binary bits to one octal digit.

What is the octal value of 100 111 0102 ? Ans: 4728

Hexadecimal to binary Since each hexadecimal digit is

equivalent to 4 binary bits, just expand it each digit of the hexadecimal no. to 4 binary bits.

What is the binary value of FF16 ? Ans: 111111112

Binary Arithmetic Addition

similar to addition of decimal nos. 101101

+) 100111 1010100

Subtractionsimilar to subtraction of decimal nos.

1000 -) 11 101

Complement representation Subtraction can be carried out by addition if the

subtractend is coded using 1’s complement and 2’s complement. 1’s Complement

• just invert every bite.g. The 1’s complement of 1011000 is 0100111.

The 1’s complement of 0101101 is 1010010. 2’s Complement

· 2’s complement of a binary no. = (1’s complement) + 1

e.g. The 2’s complement of 1011000 is 0101000. The 2’s complement of 0101101 is 1010011.

Binary Signed Representations For signed binary nos, a ‘1’ at the MSB (most

significant bit) represents a negative no., while a ‘0’ at the MSB a positive no.There are three representations for the bits following the

MSB:

1) Signed-magnitude representation2) Signed-1’s complement representation3) Signed-2’s complement representation

In 1), the remaining bits represent the magnitude of the negative no.

In 2) and 3) the negative no. is represented as either the 1’s or 2’s complement of its positive value.

Binary signed additionConsider an example:A = +10410

B = +8810

What is the result of binary signed addition of A and B (for the 8-bit binary signed representation ?Ans. A + B = 01101000 + 01011000

= 11000000 (sign-bit = ‘1’)

The result gives a negative no. which is wrong. This is due to the fact that 104+88 = +192 > +127, i.e. overflows. This illustrates that if the signs of two arguments are the same but the sign of the sum is different. Overflow or underflow occurs and the sum is wrong.

Introduction of OSI model

OSI (Open Systems Interconnection) is a standard description or "reference model" for how messages should be transmitted between any two points in a telecommunication network.

OSI Developed by representatives from major

Telecommunication companies in 1983. OSI was officially adopted as an

international standard by the International Organization of Standards (ISO).

The main idea in OSI is that the process of communication between two end points in a telecommunication network can be divided into layers, with each layer adding its own set of special, related functions.

The use of OSI model Provide a guideline to product

designer to design device that requires communication on on the network, which is compatible and able to send message to all other machines.

7 layers OSI divides telecommunication into

seven layers. The layers are in two groups. The upper four layers are used whenever a message passes from or to a user. The lower three layers (up to the network layer) are used when any message passes through the host computer.

Layer 7: The application layer...

This is the layer at which communication partners are identified, quality of service is identified, user authentication and privacy are considered, and any constraints on data syntax are identified. (This layer is not the application itself, although some applications may perform application layer functions.)

Layer 6: The presentation layer...

This is a layer, usually part of an operating system, that converts incoming and outgoing data from one presentation format to another (for example, from a text stream into a popup window with the newly arrived text). Sometimes called the syntax layer.

Layer 5: The session layer... This layer sets up, coordinates,

and terminates conversations, exchanges, and dialogs between the applications at each end. It deals with session and connection coordination.

Layer 4: The transport layer...

This layer manages the end-to-end control (for example, determining whether all packets have arrived) and error-checking. It ensures complete data transfer.

Layer 3: The network layer...

This layer handles the routing of the data (sending it in the right direction to the right destination on outgoing transmissions and receiving incoming transmissions at the packet level). The network layer does routing and forwarding.

Layer 2: The data-link layer...

This layer provides synchronization for the physical level and does bit-stuffing for strings of 1's in excess of 5. It furnishes transmission protocol knowledge and management.

Layer 1: The physical layer...

This layer conveys the bit stream through the network at the electrical and mechanical level. It provides the hardware means of sending and receiving data on a carrier.