Computer Organization and Design

Slides:



Advertisements
Similar presentations
Register Transfer and Microoperations Part2
Advertisements

Chapter 4 Register Transfer and Microoperations
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Chapter 7 Henry Hexmoor Registers and RTL
Princess Sumaya University
7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on.
1 Register Transfer &  -operations Computer Organization Computer Architectures Lab REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register.
8085 processor. Bus system in microprocessor.
©Brooks/Cole, 2003 Chapter 4 Operations on Bits. ©Brooks/Cole, 2003 Apply arithmetic operations on bits when the integer is represented in two’s complement.
1 ALUs. 2 Topics: ALU Overview - core of the integer datapath - 2 operands, 32-bits wide, plus control signals Exercise: A simple multiplier.
Chapter 7. Register Transfer and Computer Operations
Cpe 252: Computer Organization1 Lo’ai Tawalbeh Lecture #4 Register Transfer and Microoperations 23/2/2006 Chapter 4:
Logic and Computer Design Dr. Sanjay P. Ahuja, Ph.D. FIS Distinguished Professor of CIS ( ) School of Computing, UNF.
Shift Micro operations
Operations on data CHAPTER 4.
4 Operations On Data Foundations of Computer Science ã Cengage Learning.
Computer System Configuration and Function Computer Architecture and Design Lecture 6.
Review We have introduced registers previously.
MICRO OPERATIONS Department of Computer Engineering, M.S.P.V.L. Polytechnic College, Pavoorchatram.
Chapter 4 Register Transfer and Micro -operations
REGISTER TRANSFER AND MICROOPERATIONS
Computer System Architecture © Korea Univ. of Tech. & Edu. Dept. of Info. & Comm. Chap. 4 Register Transfer and Microoperations 4-1 Chap. 4 Register Transfer.
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
©Brooks/Cole, 2003 Chapter 4 Operations on Bits. ©Brooks/Cole, 2003 Apply arithmetic operations on bits when the integer is represented in two’s complement.
REGISTER TRANSFER LANGUAGE MICROOPERATIONS. TODAY OUTLINES Logic Microoperations Shift Microoperations.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
Micro Operation. MICROOPERATIONS Computer system microoperations are of four types: - Register transfer microoperations - Arithmetic microoperations -
Exam1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
1 Chapter 7 Henry Hexmoor Registers and RTL. REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register Transfer Bus and Memory Transfers.
Lecture 5: Register Transfer & Micro-OpsOverview1.
CSC321 Homework Due Due Tuesday after spring break Turn in –Design information State diagram State table K-map simplifications and expressions for flip-flop.
Chapter 4 Register Transfer and Microoperations Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
Chapter 4 Operations on Bits. Apply arithmetic operations on bits when the integer is represented in two’s complement. Apply logical operations on bits.
Exam1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas.
1 Sec (2.4) Arithmetic / logic instruction:. 2 Logical operations: Ex: XOR OR AND
C OMPUTER A RITHMETIC. I NTRODUCTION A processor has an separate unit that is known as ALU that executes arithmetic operations. Negative numbers may be.
Chapter 4 Operations on Bits. Apply arithmetic operations on bits when the integer is represented in two’s complement. Apply logical operations on bits.
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Register Transfer & Microoperations.
Microprocessor & Assembly Language
Computer and Information Sciences College / Computer Science Department CS 206 D Computer Organization and Assembly Language.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
1 Register Transfer and Microoperations Acknowledgment: Most of the slides are adapted from Prof. Hyunsoo Yoon’s slides.
1 REGISTER TRANSFER & MICROOPERATIONS. 2 OUTLINES Register Transfer Language Register Transfer Bus and Memory Transfers Arithmetic Microoperations Logic.
REGISTER TRANSFER AND MICROOPERATIONS
UNIT 2 REGISTER TRANSFER AND MICROOPERATIONS
Chapter 4 Operations on Bits.
REGISTER TRANSFER AND MICROOPERATIONS
Chapter 4 Register Transfer and Microoperations
Chap 7. Register Transfers and Datapaths
Overview Register Transfer Language Register Transfer
Computer Organization and Design
Register Transfer and Microoperations
REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT
Computer Organization and Design
Computer Organization and Design
Computer Organization and Design
به نام یگانه مهندس هستی معماری کامپیوتر مهدی قدیری
Computer Organization and Design
Computer Organization and Design
REGISTER TRANSFER LANGUAGE
Computer Architecture and Design Lecture 6
Shift & Rotate Instructions)
CSC 220: Computer Organization
By: A. H. Abdul Hafez CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU
Shift & Rotate Instructions)
Combinational Circuits
CHAPTER-3 REGISTER TRANSFER LANGUAGE AND MICROOPERATIONS
Instruction execution and ALU
GCSE COMPUTER SCIENCE Topic 3 - Data 3.3 Logical and Arithmetic Shifts.
靜夜思 床前明月光, 疑是地上霜。 舉頭望明月, 低頭思故鄉。 ~ 李白 李商隱.
Presentation transcript:

Computer Organization and Design CSE211 Computer Organization and Design Lecture : 3 Tutorial: 1 Practical: 0 Credit: 4 Deepak Kumar (Asst. Professor, LPU)

Overview Register Transfer Language Register Transfer Register Transfer and Micro-operations 2 Overview Register Transfer Language Register Transfer Bus and Memory Transfers Arithmetic Micro-operations Logic Micro-operations Shift Micro-operations Arithmetic Logic Shift Unit CSE 211

Logic Micro operations Register Transfer and Micro-operations 3 Logic Micro operations CSE 211

Logic Microoperations Register Transfer and Micro-operations 4 Logic Microoperations CSE 211

Hardware Implementation Register Transfer and Micro-operations 5 Hardware Implementation 0 0 F = A  B AND 0 1 F = AB OR 1 0 F = A  B XOR 1 1 F = A’ Complement S1 S0 Output -operation Function table B A S F 1 i 2 3 4 X 1 MUX Select CSE 211

Applications of Logic Microoperations Register Transfer and Micro-operations 6 Applications of Logic Microoperations Logic microoperations can be used to manipulate individual bits or a portions of a word in a register Consider the data in a register A. In another register, B, is bit data that will be used to modify the contents of A Selective-set A  A + B Selective-complement A  A  B Selective-clear A  A • B’ Mask (Delete) A  A • B Clear/Compare A  A  B Insert A  (A • B) + C CSE 211

Applications of Logic Microoperations Register Transfer and Micro-operations 7 Applications of Logic Microoperations 1. In a selective set operation, the bit pattern in B is used to set certain bits in A 1 1 0 0 At 1 0 1 0 B 1 1 1 0 At+1 (A  A + B) If a bit in B is set to 1, that same position in A gets set to 1, otherwise that bit in A keeps its previous value 2. In a selective complement operation, the bit pattern in B is used to complement certain bits in A 1 1 0 0 At 1 0 1 0 B 0 1 1 0 At+1 (A  A  B) If a bit in B is set to 1, that same position in A gets complemented from its original value, otherwise it is unchanged CSE 211

Applications of Logic Microoperations Register Transfer and Micro-operations 8 Applications of Logic Microoperations 3. In a selective clear operation, the bit pattern in B is used to clear certain bits in A 1 1 0 0 At 1 0 1 0 B 0 1 0 0 At+1 (A  A  B’) If a bit in B is set to 1, that same position in A gets set to 0, otherwise it is unchanged 4. In a mask operation, the bit pattern in B is used to clear certain bits in A 1 1 0 0 At 1 0 1 0 B 1 0 0 0 At+1 (A  A  B) If a bit in B is set to 0, that same position in A gets set to 0, otherwise it is unchanged CSE 211

Applications of Logic Microoperations Register Transfer and Micro-operations 9 Applications of Logic Microoperations 5. In a clear operation, if the bits in the same position in A and B are the same, they are cleared in A, otherwise they are set in A 1 1 0 0 At 1 0 1 0 B 0 1 1 0 At+1 (A  A  B) CSE 211

Applications of Logic Microoperations Register Transfer and Micro-operations 10 Applications of Logic Microoperations 6. An insert operation is used to introduce a specific bit pattern into A register, leaving the other bit positions unchanged This is done as A mask operation to clear the desired bit positions, followed by An OR operation to introduce the new bits into the desired positions Example Suppose you wanted to introduce 1010 into the low order four bits of A: 1101 1000 1011 0001 A (Original) 1101 1000 1011 1010 A (Desired) 1101 1000 1011 0001 A (Original) 1111 1111 1111 0000 Mask 1101 1000 1011 0000 A (Intermediate) 0000 0000 0000 1010 Added bits 1101 1000 1011 1010 A (Desired) CSE 211

Shift Microoperations Register Transfer and Micro-operations 11 Shift Microoperations There are three types of shifts Logical shift Circular shift Arithmetic shift What differentiates them is the information that goes into the serial input Serial input A right shift operation A left shift operation CSE 211

Logical Shift In a logical shift the serial input to the shift is a 0. Register Transfer and Micro-operations 12 Logical Shift In a logical shift the serial input to the shift is a 0. A right logical shift operation: A left logical shift operation: In a Register Transfer Language, the following notation is used shl for a logical shift left shr for a logical shift right Examples: R2  shr R2 R3  shl R3 CSE 211

Register Transfer and Micro-operations 13 Circular Shift In a circular shift the serial input is the bit that is shifted out of the other end of the register. A right circular shift operation: A left circular shift operation: In a RTL, the following notation is used cil for a circular shift left cir for a circular shift right Examples: R2  cir R2 R3  cil R3 CSE 211

Register Transfer and Micro-operations 14 Arithmetic Shift An arithmetic shift is meant for signed binary numbers (integer) An arithmetic left shift multiplies a signed number by two An arithmetic right shift divides a signed number by two Sign bit : 0 for positive and 1 for negative The main distinction of an arithmetic shift is that it must keep the sign of the number the same as it performs the multiplication or division A right arithmetic shift operation: A left arithmetic shift operation: sign bit sign bit CSE 211

Register Transfer and Micro-operations 15 Arithmetic Shift An left arithmetic shift operation must be checked for the overflow V Before the shift, if the leftmost two bits differ, the shift will result in an overflow In a RTL, the following notation is used ashl for an arithmetic shift left ashr for an arithmetic shift right Examples: R2  ashr R2 R3  ashl R3 sign bit CSE 211

Hardware Implementation of Shift Microoperation Register Transfer and Micro-operations 16 Hardware Implementation of Shift Microoperation CSE 211

Arithmetic Logic and Shift Unit Register Transfer and Micro-operations 17 Arithmetic Logic and Shift Unit Arithmetic Circuit Logic C 4 x 1 MUX Select 1 2 3 F S3 S2 S1 S0 B A i D E shr shl i+1 i-1 S3 S2 S1 S0 Cin Operation 0 0 0 0 0 F = A 0 0 0 0 1 F = A + 1 0 0 0 1 0 F = A + B 0 0 0 1 1 F = A + B + 1 0 0 1 0 0 F = A + B’ 0 0 1 0 1 F = A + B’+ 1 0 0 1 1 0 F = A - 1 0 0 1 1 1 F = A 0 1 0 0 X F = A  B 0 1 0 1 X F = A B 0 1 1 0 X F = A  B 0 1 1 1 X F = A’ 1 0 X X X F = shr A 1 1 X X X F = shl A CSE 211

Any Questions ?