Computer Organization

Similar documents
Computer Organization Control Unit. Department of Computer Science Missouri University of Science & Technology

CS 5803 Introduction to High Performance Computer Architecture: Arithmetic Logic Unit. A.R. Hurson 323 CS Building, Missouri S&T

REGISTER TRANSFER LANGUAGE

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

Register Transfer and Micro-operations

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

CHAPTER 4: Register Transfer Language and Microoperations

REGISTER TRANSFER AND MICROOPERATIONS

REGISTER TRANSFER AND MICROOPERATIONS

Computer Organization MIPS Architecture. Department of Computer Science Missouri University of Science & Technology

Combinational and sequential circuits (learned in Chapters 1 and 2) can be used to create simple digital systems.

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

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0.

Computer Organization (Autonomous)

CS 5803 Introduction to High Performance Computer Architecture: RISC vs. CISC. A.R. Hurson 323 Computer Science Building, Missouri S&T

Computer Architecture and Organization: L04: Micro-operations

Arithmetic Logic Unit

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

COMPUTER ORGANIZATION

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

Register Transfer Language and Microoperations (Part 2)

Chapter 4. Operations on Data

CO Computer Architecture and Programming Languages CAPL. Lecture 9

Computer Architecture

Microcomputers. Outline. Number Systems and Digital Logic Review

ECE 341 Midterm Exam

Chapter 4 Arithmetic Functions

Digital System Design Using Verilog. - Processing Unit Design

Programming Level A.R. Hurson Department of Computer Science Missouri University of Science & Technology Rolla, Missouri

Experiment 7 Arithmetic Circuits Design and Implementation

Computer Organization II CMSC 3833 Lecture 33

ECE 341 Midterm Exam

An instruction set processor consist of two important units: Data Processing Unit (DataPath) Program Control Unit

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

ECEN 468 Advanced Logic Design

Chapter 4. Combinational Logic

Advanced Computer Architecture-CS501

Digital Logic Design Exercises. Assignment 1

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

Chapter 3: part 3 Binary Subtraction

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26)

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

*Instruction Matters: Purdue Academic Course Transformation. Introduction to Digital System Design. Module 4 Arithmetic and Computer Logic Circuits

Combinational Logic II

Mobile and Heterogeneous databases

Von Neumann Architecture

csitnepal Unit 3 Basic Computer Organization and Design

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Introduction to Computer Science. Homework 1

Binary Adders: Half Adders and Full Adders

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

Arithmetic Logic Unit. Digital Computer Design

Binary Adders. Ripple-Carry Adder

Let s put together a Manual Processor

Introduction to Digital Logic Missouri S&T University CPE 2210 Multipliers/Dividers

Lecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit

UNIT I STRUCTURE OF COMPUTERS

Mobile and Heterogeneous databases Distributed Database System Transaction Management. A.R. Hurson Computer Science Missouri Science & Technology

Computer Organization and Levels of Abstraction

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4]

Chapter 2 Logic Gates and Introduction to Computer Architecture

(+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)

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

Keywords: Soft Core Processor, Arithmetic and Logical Unit, Back End Implementation and Front End Implementation.

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

Computer Organization and Design

Department of Computer and Mathematical Sciences. Lab 4: Introduction to MARIE

Semester Transition Point. EE 109 Unit 11 Binary Arithmetic. Binary Arithmetic ARITHMETIC

DC57 COMPUTER ORGANIZATION JUNE 2013

QUESTION BANK FOR TEST

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Logic, Words, and Integers

Dec Hex Bin ORG ; ZERO. Introduction To Computing

LECTURE 4. Logic Design

Digital Systems and Binary Numbers

Chapter 2 Basic Logic Circuits and VHDL Description

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

Computer Organization and Levels of Abstraction

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

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

Parallel logic circuits

Combinational Circuits

Chapter 10 - Computer Arithmetic

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

EE 109 Unit 6 Binary Arithmetic

CSE303 Logic Design II Laboratory 01

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

Code No: R Set No. 1

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

register:a group of binary cells suitable for holding binary information flip-flops + gates

Basic Arithmetic (adding and subtracting)


Chapter 4 Arithmetic

Submitted by 1

Ripple Counters. Lecture 30 1

STRUCTURE OF DESKTOP COMPUTERS

KULLEĠĠ SAN BENEDITTU Secondary School, Kirkop

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

Software and Hardware

Module 5 - CPU Design

Transcription:

Register Transfer Logic Department of Computer Science Missouri University of Science & Technology hurson@mst.edu 1

Note, this unit will be covered in three lectures. In case you finish it earlier, then you have the following options: 1) Take the early test and start CS3889.module3 2) Study the supplement module (supplement CS3889.module2) 3) Act as a helper to help other students in studying CS3889.module2 Note, options 2 and 3 have extra credits as noted in course outline. 2

Enforcement of background { Glossary of prerequisite topics No Familiar with the topics? Yes Review CS3889.module2.background Current Module Take Test No Pass? Remedial action Yes { Glossary of topics No Familiar with the topics? Take the Module Yes Take Test No Pass? Yes Options At the end give a test, record the score, and impose remedial action if not successful Study next module? Lead a group of students in this module (extra credits)? Study more advanced related topics (extra credits)? Extra Curricular activities

Register Transfer Language (RTL) Like any other language, the RTL is: A set of symbols and rules to describe: Elementary objects, Syntax, and Semantics of the system. Composed of two parts: Declaration Part Execution Part 4

Register Transfer Language (RTL) Declaration Part is used to describe the basic components (elementary objects): A Set of registers and their functions. The binary coded information in the registers. The operations performed on the information stored in the registers. The control functions that initiate the sequence of the operations. 5

Register Transfer Language (RTL) Execution part is a collection of statements. statement is composed of two parts: Each Control Part (label): is a Boolean function, which determines under what condition the corresponding operation (s) is (are) going to be executed. Operational Part: determines the data manipulation actions (µ-operation). T 1 : A (B) T 2 : A (A)+(B) Control Part Operational part 6

Register Transfer Language: There is a one-to-one relationship between the components in RTL and our earlier view at the computer: Set of registers memory system µ-operations ALU Control functions CU 7

Register Transfer Language: Register: It is a group of binary cells suitable for holding binary information. In RTL notation it is represented by Capital letters: MAR, A, B, IR,... Bits in a register are numbered - either from left-to-right or right-to-left, starting either from 0 or 1. Declare Register A(8), MBR(12), PC(16),... Declare Sub-Register PC(L)=PC(1-8), PC(H)=PC(9-16) 8

Register Transfer Language: Memory can be viewed as a 2-dimensional storage medium: Declare Memory M[0:5, 0:15] 9

Register Transfer Language: Register Storage media (registers) can be classified based on various parameters: Access Time Fast access storage ("register") General purpose register (R1-R16 in IBM) Special purpose register (PC,IR,...) Slower access storage (main memory) Functionality Storage type (R 1 -R 16 in IBM) Operational type (AC, PC) 10

Register Transfer Language: Register Graphically a register is represented by a rectangle: 0 1 n-1 T 0 1 B n-1 11

Register Transfer Language: Operations A µ-operation is an elementary operation which is executed in one clock pulse period. Four classes of µ -operations will be discussed: Inter-register Transfer, Arithmetic, Logic, and Shift 12

Register Transfer Language: Inter-register Transfer It is this class of operations which allows data to be transferred from one storage unit to another. T : A (B) 1 Destination Source 13

Register Transfer Language: Inter-register Transfer It can be divided into two groups: Register Transfer and Memory Transfer Inter-register transfer operations can be performed in two fashions: Serial: During each clock pulse one bit of source is transferred to the destination. Parallel: During a clock pulse the whole contents of source is transferred to the destination. 14

Register Transfer Language: Inter-register Transfer Register Transfer: is the class of operations that determines the data transfer between "registers". Memory Transfer: is the class of operations that determines how data stored in memory can be accessed. Note: i) Conventional main memory is random access memory. ii) Any access to main memory is through Memory Address Register (MAR) and Memory Buffer Register(MBR). Two major operations can be recognized: READ, WRITE. 15

Register Transfer Language: Memory Transfer Read R 1 : R 2 : Write W 1 : W 2 : W 3 : MAR "address" MBR (M[MAR]) MAR "address" MBR "data" M[MAR] (MBR) 16

Question What is the minimum number of operations which allows all possible arithmetic operations? What are they? What is the minimum number of operations which allows all possible logic operations? What are they? 17

Register Transfer Language: Arithmetic Operations Two basic operations will be studied: Complement. T 1 : T 1 : F (A) + (B) A ( ) A ~ ( ) ( ) ( ) T 1 : A A Note: = A + 1 A ~ ADD and 18

Register Transfer Language: Arithmetic Operations Subtraction, Multiplication, and Division can be performed directly; or, ( ) T 1 : F (A) - (B) T 11 : F +1 T 12 : F (A) + (F) T 1 : F (A) * (B) repeated additions T 1 : F (A) / (B) repeated subtractions B 19

Register Transfer Language: Addition Basic building blocks: Half adder (H. A.) Sum = A B Carry = A Λ B A H. A. B Sum Carry 20

Register Transfer Language: Half Adder Truth Table Realization A B Sum Carry A 0 0 0 0 B Sum 0 1 1 0 1 0 1 0 1 1 0 1 Carry Timing: If t is the delay time of a basic logic gate (OR, AND), then the delay of Half Adder = 2 t. 21

Register Transfer Language: Addition Basic building blocks: Full Adder (F.A.) Sum = A B Carry-in Carry-out = A Λ B + (A B) Λ Carry-in A B Carry-in F. A. Sum Carry-out 22

Register Transfer Language: Full Adder Truth Table Realization A B Carry-in Sum Carry-out 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 Carry-in Timing: If t is the delay time of a basic logic gate (OR, AND), then the delay of Full Adder = 4 t. A B Sum Carry-out 23

Register Transfer Language: Serial Adder R 1 and R 2 are circular shift registers. R 3 is a shift register. R 3 (R 1 ) + (R 2 ) R 1 F.A. R 3 R 2 Carry Flip Flop 24

Register Transfer Language: Parallel Adder A cascade of n full adders. R 3 (R 1 ) + (R 2 ) R 1,n R 1,n-1 R 1,2 R 1,1 Carry-out F. A. F. A. F. A. F. A. C 1 R 2,n R 3,n R 2,n-1 R 3,n-1 R 2,2 R 3,2 R 2,1 R 3,1 25

Question Parallel operations are faster and more expensive than serial operations. What are the Delay times of serial and parallel adders? How to improve the performance of parallel adder? 26

Register Transfer Language: 2 s Complement A simple combinational circuit can be developed to perform 2 s complement operation. Assuming T type Flip Flops, when activation signal (P) is high the following circuit performs 2 s complement operation. 27

Register Transfer Language: 2 s Complement R n R2 R 1 Carry Input = 0 P 28

Question How is the value of P determined? Modify the 2 s complement circuit for 1 s complement operation. 29

Register Transfer Language: Logic Operations With two binary bits one can have up to sixteen different logic operations. One needs to have either (AND, NOT) or (OR, NOT) combination in order to implement all possible logic operations. 30

Register Transfer Language: Logic Operations Logic operations can be used in order to implement other functions. Logic operations are useful in string and pattern matching operations. T 1 : T 2 : A (A) Λ (B) A (A) (B) 31

Register Transfer Language: Logic Operations selective set Set the bits in register A where there are corresponding 1s in register B. A = 1001 B = 1011 A A B = 1011 selective complement Complement bits in A where there are corresponding 1s in B. A = 1001 B = 1010 A A B = 0011 32

Register Transfer Language: Logic Operations Transfer operation can be performed by logic operations. A = 1001 B 0000 B = 1100 B A B = 1001 Contents of two registers can be compared against each other by logic operation. A = 1010 A XOR B = 0000 B = 1010 A XNOR B = 1111 33

Register Transfer Language: Shift Operations Shift operations can be used to perform transfer as well as arithmetic operations. To accomplish such an operation, one has to specify two parameters: Direction - i.e., Left or Right Number of positions 34

Register Transfer Language: Shift Operations Four types of shift operations can be distinguished: Serial Shift Circular Shift Logical Shift Arithmetic Shift 35

Questions Parallel is faster than Serial? Parallel is more expensive than Serial? How to transfer data among "registers"? Direct Transfer? Busing Technique? Compare and contrast direct transfer against busing technique. What is the difference between RAM, DAM, and SAM? What determines the length of MAR and MBR? How are the lengths of MAR and MBR determined? 36

Register Transfer Language: Shift Operations In serial shift the extreme bit, left-most or right-most, will receive its contents from outside: 1 0 1 1 0 0 1 0 1 1 0 In circular shift one extreme bit assumes the contents of the other: 0 1 1 0 1 1 0 1 1 0 37

Register Transfer Language: Shift Operations In logical shift the extreme bit, depending on the direction, always assumes the value 0: 0 1 0 1 1 1 0 1 1 0 38

Register Transfer Language: Shift Operations In arithmetic shift the contents of the register is assumed to be a signed number. In arithmetic shift: Sign should be preserved Shift right should divide the contents by 2 Shift left should multiply the contents by 2 To satisfy the above conditions one has to develop different routines based on the representation of the number - i.e., signed magnitude, signed 1 s complement, and signed 2 s complement. 39

Register Transfer Language: Arithmetic Shift Data representation Sign bit Procedure Positive Unchanged Added bit is zero Negative Signed Mag. Unchanged Added bit is zero Negative 1 s Complement Unchanged Added bit is one Negative 2 s Complement Unchanged Added bit is zero (Shift left) Negative 2 s Complement Unchanged Added bit is one (Shift right) 40

Register Transfer Language: Arithmetic Shift Signed magnitude number Performlogical shift on the magnitude part. Do not change the sign bit. 1 s complement and 2 s complement number: The whole number shouldbe operated on. For 1 s complement duplicate the sign bit for extreme bit. For 2 s complement shift right duplicate the sign bit. For 2 s complement shift left perform the logic shift. 41

Register Transfer Language: Arithmetic Shift (Example) Assume A = 0 0 1 0 1 B = 1 1 0 1 0 Signed magnitude AShift A Left AShift B Right 0 1 0 1 0 1 0 1 0 1 42

Register Transfer Language: Arithmetic Shift (Example) 1 s Complement AShift A Right AShift B Right AShift B Left 0 0 0 1 0 1 1 1 0 1 1 0 1 0 1 43

Register Transfer Language: Arithmetic Shift (Example) 2 s complement AShift B Right AShift B Left 1 1 1 0 1 1 0 1 0 0 Assume C = AShift C Left => 1 0 1 1 0 0 1 1 0 0 is in 2 s complement. Signed has not been preserved! Why? 44

Register Transfer Language Full adder: A basic building block for the design of an adder. It can be designed as a cascade of two half adders. Half adder: A basic building block a combinational logic for the design of an adder. It accepts two binary bits and generates the sum and carry. micro operation: A basic operation that can be executed during a single clock pulse. 45

Register Transfer Language Parallel adder: A way to add two binary numbers addition will be initiated simultaneously on all of the operand bit pairs. Serial adder: A way to perform addition. During each clock pulse one pair of the operand bits will participate in the operation. Overflow: Inability to store a number in its entirety in a register. Interregister transfer operation: A class of micro operations that allows data transfer between a source and destination registers. 46

Questions True or false: in general, read from memory is faster than writing into the memory! Assume that t is the delay of a simple logic gate i.e., an AND or OR gate, what is the execution time of an n-bit parallel adder? True or false: parallel operation is faster than serial operation (justify)! 47

Questions True or false: one needs more hardware support for parallel operations than serial operations! Write a simple software program to perform multiplication as a sequence of additions. Write a simple software program to perform division as a sequence of subtractions. How can we use the same combinational logic for the 2 s complement operation to perform the 1 s complement operation? 48

Questions Equality between two binary bit patterns can be determined by using exclusive OR operation. Do you know any other logic operation to carry out the same operation? If t is the delay of a simple logic gate i.e., an AND or OR gate, then what is the execution time of a parallel AND operation, and what is the execution time of a serial AND operation? 49