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, 1 st Ed. Of latest edition, International Thomson Publishing Co., Mano, M. Morris, Computer System Architecture, 3 rd Ed. Or latest edition. Prentice-Hall International, 1993.
Lectures Binary System 2. Boolean Algebra 3. Logic Gates Design 4. Component I & II 5. Central Processing Unit 6. Bus 7. Devices 8. Classification of Software 9. System Software 10. Utility Program
Key content Area 1.Computer Systems Architecture 2. Logic System and Digital Circuit Numbering Systems: Arithmetic and Complement Representations, Boolean Algebra, Introduction to digital circuits 3. Hardware Components of a Computer System Processor Unit, Main Memory, Input/Output Devices, Secondary Storage, Bus, Current processor and device technologies 4.Software Components of a Computer System Classification 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* * *10 + 3*1 More generally, by using powers(1) of the base 10: 1523 = 1* * * *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 conversion Binary to decimal b n b n-1 … b 1 b 0. b -1 b -2 … b -n = b n x 2 n + b n-1 x 2 n-1 + … + b 1 x b 0 x b -1 x … + b -n x 2 -n Exercise: Convert the binary no to decimal. Base-r to decimal b n b n-1 … b 1 b 0. b -1 b -2 … b -n = b n x r n + b n-1 x r n-1 + … + b 1 x r 1 + b 0 x r 0 + b -1 x r -1 + … + b -n x r -n Exercise: Convert the no to decimal.
Number System Name Base (number of symbols per digit) Symbols Binary20,1 Octal80,1,2,3,4,5,6,7 Decimal100,1,2,3,4, 5,6,7,8,9 Hexadecimal160,1,2,3,4, 5,6,7,8,9, A,B,C,D,E,F
Representative of numbers in different formats DecimalBinaryOctalHexadecimal A B C D E F
In the table above 14 = , 16 8 E 16
Decimal to binary By repeated division by 2 What is the binary value of ? Divider Integer Remainder 2 |41 2 |201 2 |100 2 | | | 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 ? Ans:
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 ? Ans: 472 8
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 FF 16 ? Ans:
Binary Arithmetic Addition similar to addition of decimal nos ) Subtraction similar to subtraction of decimal nos )
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 bit e.g. The 1’s complement of is The 1’s complement of is 2’s Complement · 2’s complement of a binary no. = (1’s complement) + 1 e.g. The 2’s complement of is The 2’s complement of is
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 representation 2) Signed-1’s complement representation 3) 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 addition Consider an example: A = B = What is the result of binary signed addition of A and B (for the 8-bit binary signed representation ? Ans. A + B= = (sign-bit = ‘1’) The result gives a negative no. which is wrong. This is due to the fact that = +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.network
OSI Developed by representatives from major Telecommunication companies in OSI was officially adopted as an international standard by the International Organization of Standards (ISO).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.