Computer Architecture: Part V. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Similar documents
Computer Architecture: Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

UNIT-IV COMPUTER ARITHMETIC

UNIT - I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS

PART A (22 Marks) 2. a) Briefly write about r's complement and (r-1)'s complement. [8] b) Explain any two ways of adding decimal numbers.

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Concept of Memory. The memory of computer is broadly categories into two categories:

Computer Organization and Assembly Language (CS-506)

UNIT:4 MEMORY ORGANIZATION

Computer Organization. Chapter 12: Memory organization

Computer Architecture

CC411: Introduction To Microprocessors

THE MICROCOMPUTER SYSTEM CHAPTER - 2

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

User. Application program. Interfaces. Operating system. Hardware

COMPUTER ARCHITECTURE AND ORGANIZATION. Operation Add Magnitudes Subtract Magnitudes (+A) + ( B) + (A B) (B A) + (A B)

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMPUTER ARCHITECURE- III YEAR EEE-6 TH SEMESTER 16 MARKS QUESTION BANK UNIT-1

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Memory memories memory

Intel 8086 MICROPROCESSOR ARCHITECTURE

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

EET2411 DIGITAL ELECTRONICS. A device or electrical circuit used to store a single bit (0 or 1) Ex. FF.

Microcomputer Architecture and Programming

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422)

Chapter 4. Combinational Logic

INPUT-OUTPUT ORGANIZATION

Combinational Circuits

Course Description: This course includes concepts of instruction set architecture,

Internal architecture of 8086

Microprocessor Architecture. mywbut.com 1

ECE 341 Midterm Exam

COURSE DESCRIPTION. CS 232 Course Title Computer Organization. Course Coordinators

DC57 COMPUTER ORGANIZATION JUNE 2013

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE) UNIT-I

5 Computer Organization

REGISTER TRANSFER LANGUAGE

Blog -

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0

Digital Logic Design Exercises. Assignment 1

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

Intel 8086 MICROPROCESSOR. By Y V S Murthy

SAE5C Computer Organization and Architecture. Unit : I - V

(+A) + ( B) + (A B) (B A) + (A B) ( A) + (+ B) (A B) + (B A) + (A B) (+ A) (+ B) + (A - B) (B A) + (A B) ( A) ( B) (A B) + (B A) + (A B)

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

COMPUTER ARCHITECTURE AND ORGANIZATION

COMPUTER ORGANIZATION AND ARCHITECTURE

Architecture of 8085 microprocessor

Hardware Design I Chap. 10 Design of microprocessor

1. Draw general diagram of computer showing different logical components (3)

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

CHAPTER 4: Register Transfer Language and Microoperations

ECE 341 Midterm Exam

1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals.

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I


SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

Memory Organization MEMORY ORGANIZATION. Memory Hierarchy. Main Memory. Auxiliary Memory. Associative Memory. Cache Memory.

The functional block diagram of 8085A is shown in fig.4.1.

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT I THE 8085 & 8086 MICROPROCESSORS. PART A (2 Marks)

Number Systems. Readings: , Problem: Implement simple pocket calculator Need: Display, adders & subtractors, inputs

COMP Overview of Tutorial #2

3. Controtlto specify the mode of transfer such as read or write 4. A control to start the DMA transfer

Number representations

Eastern Mediterranean University School of Computing and Technology CACHE MEMORY. Computer memory is organized into a hierarchy.

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 153) Pass Marks: 24

Register Transfer and Micro-operations

Introduction to Computer Science. Homework 1

DESIGN RAM MEMORIES BY USING FLIP-FLOP CIRCUITS

EECS 3201: Digital Logic Design Lecture 7. Ihab Amer, PhD, SMIEEE, P.Eng.

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

UPY14602-DIGITAL ELECTRONICS AND MICROPROCESSORS Lesson Plan

Number System. Introduction. Decimal Numbers

CSEE 3827: Fundamentals of Computer Systems. Storage

INTRODUCTION TO MICROPROCESSORS

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

1. Internal Architecture of 8085 Microprocessor

Digital IP Cell 8-bit Microcontroller PE80

Darshan Institute of Engineering & Technology for Diploma Studies Unit - 1

2. (a) Compare the characteristics of a floppy disk and a hard disk. (b) Discuss in detail memory interleaving. [8+7]

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

INTELLIGENCE PLUS CHARACTER - THAT IS THE GOAL OF TRUE EDUCATION UNIT-I

STRUCTURE OF DESKTOP COMPUTERS

Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

Memory System Design. Outline

UNIT I STRUCTURE OF COMPUTERS

CS/EE 260. Digital Computers Organization and Logical Design

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

Introduction to Microprocessor

INPUT-OUTPUT ORGANIZATION

Transcription:

Computer Architecture: Part V First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Outline Addition and Subtraction Multiplication Algorithm Array Multiplier Peripheral Devices Input Output Interface Main Memory 204231: Computer Organization and Architecture 2

Addition and Subtraction of Signed Magnitude Numbers We designate the magnitude of the two numbers by A and B. When the signed numbers are added or subtracted, we find that there are eight different conditions to consider, depending on the sign of the numbers and the operation performed. These conditions are listed in the first column of table in slide number 4. The other columns in the table show the actual operation to be performed with the magnitude of the numbers. The last column is needed to prevent a negative zero, when two equal numbers are subtracted, the result should be +0 not 0. 0 204231: Computer Organization and Architecture 3

Addition and Subtraction of Signed Magnitude Numbers 204231: Computer Organization and Architecture 4

Hardware for signed magnitude addition and subtraction It consists of register A and B and sign flip flop flop A s and B s. Subtraction is done by adding A to the 2 s complement of B. Theoutputcarry is transferred to flip flope E, where it can be checked to determine the relative magnitudes of the two numbers. The add overflow flip flop AVF holds the overflow bit when A and B are added. The addition of A plus B is done through the parallel adder. 204231: Computer Organization and Architecture 5

Hardware for signed magnitude addition and subtraction The S (sum) output tof the adder is applied to the input of the A register. The complementer provides and output of B or the complement of B depending on the state of the mode control lm. When M = 0, the output of B is transferred to the adder, the input carry is 0, and the output of the adder is equal to the sum A + B. When M = 1, the 1 s complement of B is applied to the adder, the input carry is 1, and output S = A + B + 1 = A B. 204231: Computer Organization and Architecture 6

Hardware for signed magnitude addition and subtraction 204231: Computer Organization and Architecture 7

Hardware Implementation A and B are registers. A S and B S are sign flip flops. E is an output carry flip flop. flop EA is a register that combines E and A. AVF is an add overflow flip flop. S is sum. M is mode control. M = 0, A + B + 0 = A + B M = 1, A + B + 1 = A B 204231: Computer Organization and Architecture 8

Multiplication Algorithm 204231: Computer Organization and Architecture 9

Hardware for multiply operation The multiplier is stored in the Q register and its sign in Qs. The sequence counter SC is initially set to a number equal to the number of bits in the multiplier. The counter is decremented dby 1 after forming each partial product. When the content of the counter reaches zero, the product is formed and the process stops. 204231: Computer Organization and Architecture 10

Hardware for multiply operation Initially, i the multiplicand li li dis in register B and the multiplier in Q. The sum of A and B forms partial product which h is transferred to the EA register. Both partialproductandmultiplierareshiftedto product and are to the right. The 0 is shifted into E. After the shift, one bit of the partial product is shifted into Q, pushing the multiplier bits one position to the right. In this manner, the rightmost flip flopinflop in register Q, designated by Q n, will hold the bit of the multiplier, which must be inspected next. 204231: Computer Organization and Architecture 11

Hardware for multiply operation 204231: Computer Organization and Architecture 12

Numerical Example for Binary Multiplier 204231: Computer Organization and Architecture 13

Array Multiplier The multiplicand bits are b 1 and b 0, the multiplier bits are a 1 and a 0, and the product is c 3 c 2 c 1 c 0. The first partial product is formed by multiplying a 0 by b 1 b 0. The multiplication of two bits such as a 0 and b 0 produces a 1 if both thbits are 1; otherwise, it produces a 0. This is identical to a AND operation and can be implemented with an AND gate. 204231: Computer Organization and Architecture 14

Array Multiplier The two partial ilproducts are added d with ihtwo half adder (HA) circuits. Usually, there are more bits in the partial products and it will be necessary to use full adders to produce the sum. Note that the least significant bit of the product does not have to go through an adder since it is formed by the output of the first AND gate. 204231: Computer Organization and Architecture 15

2 bit by 2 bit array multiplier 204231: Computer Organization and Architecture 16

Peripheral Devices and Input Output Interface provides a method for transferring information between internal storage and external I/O devices. Peripherals connected to a computer need special communication links for interfacing them with the central processing unit. resolve the differences that exist between the central computer and each peripheral. 204231: Computer Organization and Architecture 17

I/O Bus and Interface Modules The I/O bus consists of data lines, address lines, and control lines. Each peripheral device has associated with it an interface unit. Each interface decodes the address and control received from the I/O bus, interprets them for the peripheral, and provides signals for the peripheral controller. 204231: Computer Organization and Architecture 18

Connection of I/O bus to input output devices 204231: Computer Organization and Architecture 19

I/O versus Memory Bus The memory bus contains data, address, and read/write control lines. There are three ways that computer buses can be used to communicate with memory and I/O 1. Use two separate buses, one for memory and the other for I/O. 2. Use one common bus for both memory and I/O but have separate control lines for each. 3. Use one common bus for memory and I/O with common control lines. 204231: Computer Organization and Architecture 20

Example of I/O interface unit It consists of two data registers called ports, a control register, a status register, bus buffers, and timing and control circuits. The interface communicates with the CPU through the data bus. The chip select and register select inputs determine the address assigned to the interface. The I/O read and write are two control lines that specify an input or output, respectively. The four registers communicate directly with the I/O device attached to the interface. 204231: Computer Organization and Architecture 21

Example of I/O interface unit This circuit enables the chip select (CS) input when the interface is selected by the address bus. The two register select inputs RS1 and RS0 select one of the four registers in the interface as specified in the table accompanying the diagram. The content of the selected register is transfer into the CPU via the data bus when the I/O read signal is enabled. The CPU transfers binary information into the selected register via the data bus when the I/O write input is enabled. 204231: Computer Organization and Architecture 22

Example of I/O interface unit 204231: Computer Organization and Architecture 23

Memory Hierarchies The memory hierarchy system consists of all storage devices employed in a computer system from the slow but high capacity auxiliary memory to a relatively faster main memory, to an even smaller and faster cache memory accessible to the high speed h processing logic. At the bottom of the hierarchy are the relatively slow magnetic tapes used to store removable files. Next are the magnetic disks used as backup storage. 204231: Computer Organization and Architecture 24

Memory Hierarchies The main memory occupies a central position by bi being able to communicate directly with ihthe CPU and with auxiliary memory devices through an I/O processor. When programs not residing in main memory are needed by the CPU, they are brought in from auxiliary memory. Programs not currently needed in main memory are transferred into auxiliary memory to provide space for currently used programs and data. 204231: Computer Organization and Architecture 25

Memory Hierarchies A special very high speed memory called a cache is sometimes used to increase the speed of processing by making current programs and data available lbl to the CPU at a rapid rate. The cache memory is employed in computer systems to compensate for the speed differential between main memory access time and processor logic. CPU logic is usually faster than main memory access time, with the result that processing speed is limited primarily by the speed of main memory. 204231: Computer Organization and Architecture 26

Memory hierarchy in a computer system 204231: Computer Organization and Architecture 27

Main Memory RAM is used for storing the bulk of the programs and data that are subject to change. ROM is used for storing programs that are permanently resident in thecomputer and for tables of constants that do not change in value once the production of the computer is completed. 204231: Computer Organization and Architecture 28

Typical RAM chip The capacity of the memory is 128 words of eight bits (one byte) )per word. This requires a 7 bit address and an 8 bit bidirectional data bus. The read and write inputs specify the memory operation and the two chips select (CS) control inputs are for enabling the chip only when it is selected by the microprocessor. 204231: Computer Organization and Architecture 29

Typical RAM chip The function table listed in slide number 31 specifies the operation of the RAM chip. The unit is in operation only when CS1 = 1 and CS2 = 0. If the chip select inputs are not enabled, or if they are enables but the read or write inputs are not enabled, the memory is inhibited and its data bus is in a high impedance state. 204231: Computer Organization and Architecture 30

Typical RAM chip 204231: Computer Organization and Architecture 31

Typical ROM chip 204231: Computer Organization and Architecture 32

Memory Address Map for Microprocessor The component column specifies whether a RAM or a ROM chip is used. The hexadecimal address column assigns a range of hexadecimal equivalent addresses for each chip. The small xs x s under the address bus lines designate those lines that must be connected to the address inputs in each chip. The RAM chips have 128 bytes and need seven address line. The ROM chip has 512 bytes and needs 9 address line. We choose bus lines 8 and 9 to represent four distinct binary combinations. Note that any other pair of unused bus lines can be chosen for this purpose. 204231: Computer Organization and Architecture 33

Memory Address Map for Microprocessor The distinction between a RAM and ROM address is done with another bus line. Here we choose line 10 for this purpose. The equivalent hexadecimal address for each chip is obtained from the information under the address bus assignment. The address bus lines are aesubdivided ded into groups of four bits each so that each group can be represented with a hexadecimal digit. The x s represent a binary number that can range from an all 0 s to an all 1 s value. 204231: Computer Organization and Architecture 34

Memory Address Map for Microprocessor 204231: Computer Organization and Architecture 35

Reference M. Moris Mano, Computer System Architecture, 3 rd ed. NJ: Prentice Hall, 1992. 204231: Computer Organization and Architecture 36