Final Book -Architecture.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
1 BHARATHIDASAN UNIVERSITY (Re-accredited with ‘A’ Grade by NAAC) CENTRE FOR DISTANCE EDUCATION PALKALAIPERUR, TIRUCHIRAPPALLI – 24 MCA / PGDCA I - Semester Computer Organization and Architecture CORE COURSE III (Full Package) Copy right reserved For Private Circulation only 2 Chairman: Dr. V.M Muthukumar Vice-Chancellor Bharathidasan University Tiruchirappalli – 620 024. Co-Ordinator: Dr. R.Babu Rajendren Registrar i/c Centre for Distance Education Bharathidasan University Tiruchirappalli – 620 024. Course Director: Dr.V.Vinod Kumar Director i/c Centre for Distance Education Bharathidasan University Tiruchirappalli – 620 024. The Syllabus Revised from 2017-18 onwards Lesson Writer: Dr. J.Sai Geetha Asst. Professor Department of Computer Science Nehru Memorial College Puthanampatti Tituchirappalli – 621 007. 3 CORE COURSE III COMPUTER ORGANIZATION AND ARCHITECTURE Objective: To understand the principles of digital computer logic circuits and their design. To understand the working of a central processing unit architecture of a computer Unit I Number Systems – Decimal, Binary, Octal and Hexadecimal Systems – Conversion from one system to another – Binary Addition, Subtraction, Multiplication and Division – Binary Codes– 8421, 2421, Excess-3, Gray, BCD – Alphanumeric Codes – Error Detection Codes. Unit II Basic Logic Gates – Universal Logic – Boolean Laws and Theorems – Boolean Expressions – Sum of Products – Product of Sums – Simplification of Boolean Expressions –Karnaugh Map Method (up to 4 Variables) – Implementation of Boolean Expressions using Gate Networks. Unit III Combinational Circuits – Multiplexers – Demultiplexers – Decoders – Encoders – Arithmetic Building Blocks – Half and Full Adders – Half and Full Subtractors – Parallel adder –2’s Complement Adder – Subtractor – BCD Adder. Unit IV Sequential Circuits – Flip Flops – RS, Clocked RS, D, JK, T and Master- Slave Flip Flops –Shift Register – Counters – Asynchronous, MOD-n and Synchronous Counters – BCD Counter –Ring Counter. Unit V Central Processing Unit: General Register Organization – Stack Organization – Instruction Formats – Addressing Modes – Data Transfer and Manipulation – Program Control – Reduced Instruction Set Computer – CISC characteristics – RISC Characteristics 4 Text Books: 1. Donald P. Leach, Albert Paul Malvino and GoutamSaha, Digital Principles and Applications, TataMcGraw Hill, Sixth Edition, Third Reprint, 2007. Unit:I : Chapter-5 Section (5.1-5.8) Unit:II : Chapter-2 Section (2.1-2.2), Chapter-3 Section (3.1, 3.2, 3.5, 3.7) Unit: III: Chapter-4 Section (4.1-4.3, 4.6), Chapter-6 Section (6.7, 6.8) 2. Thomas C. Bartee, Digital Computer Fundamentals, Tata McGraw- Hill, Sixth Edition, Twenty Fifth Reprint, 2006. Unit:III : Chapter - 5 Section (5.1, 5.3, 5.10, 5.11) Unit:IV : Chapter - 4 Section (4.1-4.9) 3. Morris Mano M, Computer System Architecture, Prentice Hall of India, Third Edition, 2008. Unit: I: Chapter - 3 Section (3.5-3.6) Unit: V: Chapter - 8 Section (8.2-8.8) Books for Reference: 1. Morris Mano. M, Digital Logic and Computer Design, Prentice Hall of India, 2008. 2. Linda Null, Julia Lobur, The Essentials of Computer Organization and Architecture, Fourth Edition,2014 5 UNIT-I LESSON -1 Number System Objectives: To present positional notation and explain the idea of the base, or radix of a number system To analyze the decimal, binary, octal and hexadecimal number systems alongwith their conversion techniques. To describe other binary codes, alphanumeric codes and error detection codes with conversion techniques 1.1 Introduction to Number Systems A digital system can understand positional number system only with few symbols called digits and these symbols represent different values depending on the position they occupy in the number. Calculating the roman numerals was so difficult that early mathematicians were forced to perform, arithmetic operations almost entirely on abaci, or counting boards, translating their results back to Roman numerals form. Now the great beauty and simplicity of the number system can be seen. It is necessary to learn only the 10 basic numerals and the positional notational system in order to count to any desired figure. After memorizing the addition and multiplication tables and learning a few simple rules, we can perform all arithmetic operations. A value of each digit in a number can be determined by using The digit The position of the digit in the number The base of the number system (where base is defined as the total number of digits available in the number system). 6 Bistable devices The basic elements in early computers were relays and switches. The operation of a switch, or delay can be seen to be essentially bistable, or binary in nature; that is, the switch is either On(1) or Off(0). The principal circuit elements in more modern computers are transistors. Because of the large number of electronic parts used in computers, it is highly desirable to utilize them in such a manner that slight changes in their characteristics will not affect their performance. The best way of accomplishing, this is to use circuits which are basically bistable. 1.1.1 Decimal Number System The number system that we use in our day-to-day life is the decimal number system. Decimal number system has base 10 as it uses 10 digits from 0 to 9. In decimal number system, the successive positions to the left of the decimal point represent units, tens, hundreds, thousands and so on. Each position represents a specific power of the base (10). For example, the decimal number 1234 consists of the digit 4 in the units position, 3 in the tens position, 2 in the hundreds position, and 1 in the thousands position, and its value can be written as (1x1000)+ (2x100)+ (3x10)+ (4xl) (1x103)+ (2x102)+ (3x101)+ (4xl00) 1000 + 200 + 30 + 1 1234 The general rule for representing numbers in the decimal system by using positional notation is as follows n-1 n-2 an-110 + an-210 +…+a0 is expressed as an-1 an-2 … a0 where n is the number of digits to the left of the decimal point. The decimal number system has a base or radix, of 10. 7 1.1.2 Binary number system. A method of representing numbers that has 2 as its base and uses only the digits 0 and 1. Each successive digit represents a power of 2. For example, 10011 represents (1 × 24) + (0 × 23) + (0 × 22) + (1 × 21) + (1 × 20), or 16 + 0 + 0 + 2 + 1, or 19. The general rule for representing numbers in the binary system by using positional notation is as follows n-1 n-2 an-12 + an-22 +…+a0 is expressed as an-1 an-2 … a0 where ai is either 0 or 1 and n is the number of digits to the left of the binary point. 1.1.3 Octal number system. The Octal number system has a base or radix of 8; eight different symbols used to represent numbers. These are commonly 0,1,2,3,4,5,6 and 7. For example, 1213 represents (1 × 83) + (2 × 82) + (1 × 81) + (3× 80), or 512 +128 +8 +3=651. The general rule for representing numbers in the Octal system by using positional notation is as follows n-1 n-2 an-18 + an-28 +…+a0 is expressed as an-1 an-2 … a0 where n is the number of digits to the left of the octal point. 1.1.4 Hexadecimal Number System Most mini computers and micro computers have their memories organized into sets of bytes, each consisting of eight binary digits. Each byte is either used as a single entity to represent a single alphanumeric character or is broken into 4-bits pieces. 8 When the machine is handling numbers in binary but in groups of four digits, it is convenient to have a code for representing each of these sets of four digits. Since 16 possible different numbers can be represented, the digits 0 through 9 will not suffice, so the letters A,B,C,D,E and F are used. For example, 121A represents (1 × 163) + (2 × 162) + (1 × 161) + (10× 160) or 4096 +512 +16+10=4634. The general rule for representing numbers in the Hexadecimal system by using positional notation is as follows n-1 n-2 an-116 + an-216 +…+a0 is expressed as an-1 an-2 … a0 Where n is the number of digits to the left of the hexadecimal point. The following table lists the decimal numbers from 0 to 15 and its equivalent decimal, octal and hexadecimal. Decimal Binary Octal Hexadecimal 0 0000 0 0 1 0001 1 1 2 0010 2 2 3 0011 3 3 4 0100 4 4 5 0101 5 5 6 0110 6 6 7 0111 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 9 1.2 Conversion from one system to another There are two types of conversion 1. Successive division and Multiplication Example: Decimal to other number system 2. Putting Positional weights Example: Other number system to Decimal Examples: 1. Decimal to other system Decimal to binary, Decimal to octal and Decimal to hexadecimal 2. Other system to decimal Binary to decimal, octal to decimal and hexadecimal to decimal Some other conversion types are 3. Binary to other system Binary to octal and Binary to hexadecimal 4. Other system to Binary Octal to Binary, hexadecimal to binary 5. Octal to Hexadecimal 6. Hexadecimal to octal 1. Decimal to Other system Conversion from decimal to its equivalent representation in the radix’r’ system is carried out by separating the number x its integer and fractions part and converting each part separately. The conversion of a decimal integer into a base ’r’ representation is done by successive division by ‘r’ and accumulations of the reminders.