Computer Organization (Autonomous)

Similar documents
REGISTER TRANSFER AND MICROOPERATIONS

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

REGISTER TRANSFER AND MICROOPERATIONS

CHAPTER 4: Register Transfer Language and Microoperations

Register Transfer Language and Microoperations (Part 2)

COMPUTER ORGANIZATION

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

Register Transfer and Micro-operations

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.

REGISTER TRANSFER LANGUAGE

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

Computer Architecture and Organization: L04: Micro-operations

Computer Organization and Design

The operations executed on data stored in registers(shift, clear, load, count)

UNIT I STRUCTURE OF COMPUTERS

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

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

Computer Organization (Autonomous)

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

Computer Architecture

Computer Organization

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

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

Computer Architecture

csitnepal Unit 3 Basic Computer Organization and Design

Parallel logic circuits

5-1 Instruction Codes

Unit II Basic Computer Organization

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

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

Fig: Computer memory with Program, data, and Stack. Blog - NEC (Autonomous) 1

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

Chapter 4. Operations on Data

Computer Architecture Programming the Basic Computer

Dec Hex Bin ORG ; ZERO. Introduction To Computing

COMPUTER ORGANIZATION AND ARCHITECTURE

CHAPTER 5 Basic Organization and Design Outline Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle

Microcomputers. Outline. Number Systems and Digital Logic Review

EE 3170 Microcontroller Applications

Binary Adders: Half Adders and Full Adders

Reference Sheet for C112 Hardware

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

C.P.U Organization. Memory Unit. Central Processing Unit (C.P.U) Input-Output Processor (IOP) Figure (1) Digital Computer Block Diagram

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

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

Arithmetic Operations

Real Digital Problem Set #6

Basic Computer Organization - Designing your first computer. Acknowledgment: Most of the slides are adapted from Prof. Hyunsoo Yoon s slides.

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

To design a 4-bit ALU To experimentally check the operation of the ALU

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

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Chapter 3 : Control Unit

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

Computer Organization: Basic Processor Structure

ELCT 501: Digital System Design

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

Register Transfer Level in Verilog: Part I

BASIC COMPUTER ORGANIZATION AND DESIGN

Midterm Examination # 2 Wednesday, March 18, Duration of examination: 75 minutes

Combinational Logic II

BASIC COMPUTER ORGANIZATION AND DESIGN

Chapter 4 Arithmetic Functions

CS222: Processor Design

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

Arithmetic Logic Unit (ALU)

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

Basic Computer Organization and Design Part 2/3

Blog -

- UNIT 2 REGISTERS, MICRO-OPERATIONS AND INSTRUCTION EXECUTION

Experiment 7 Arithmetic Circuits Design and Implementation

Computer Architecture and Organization: L06: Instruction Cycle

Class Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2

Digital System Design Using Verilog. - Processing Unit Design

COMPUTER ARCHITECTURE AND DIGITAL DESIGN

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

Digital Design with FPGAs. By Neeraj Kulkarni

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

Introduction to Verilog. Garrison W. Greenwood, Ph.D, P.E.

Faculty of Engineering Systems & Biomedical Dept. First Year Cairo University Sheet 6 Computer I

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

session 7. Datapath Design

UNIT:2 BASIC COMPUTER ORGANIZATION AND DESIGN

CSC 220: Computer Organization Unit 12 CPU programming

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

Chapter 2 Basic Logic Circuits and VHDL Description

BASIC COMPUTER ORGANIZATION AND DESIGN

CS 24: INTRODUCTION TO. Spring 2015 Lecture 2 COMPUTING SYSTEMS

CHAPTER 8: Central Processing Unit (CPU)

STRUCTURE OF DESKTOP COMPUTERS

CPU Design John D. Carpinelli, All Rights Reserved 1

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

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

ECE 341 Midterm Exam

CS311 Lecture: CPU Implementation: The Register Transfer Level, the Register Set, Data Paths, and the ALU

The Need of Datapath or Register Transfer Logic. Number 1 Number 2 Number 3 Number 4. Numbers from 1 to million. Register

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

Code No: R Set No. 1

Transcription:

Computer Organization (Autonomous) UNIT I Sections - A & D Prepared by Anil Kumar Prathipati, Asst. Prof., Dept. of CSE. SYLLABUS Introduction: Types of Computers, Functional units of Basic Computer (Block diagram of Micro Computer). Register Transfer and Micro-operations: Register Transfer language, Register Transfer, Bus and memory transfers - Three- State Bus Buffers, Memory Transfer; Arithmetic micro operations- Binary Adder, Binary Adder-Subtractor, Binary Incrementer, Arithmetic Circuit; Logical micro operations- List of Logic Microoperations, Hardware Implementation, Some Applications; Shift micro operations-hardware Implementation, Arithmetic logic shift unit. INDEX Computer Types Functional Unit Register Transfer Language Register Transfer Arithmetic Microoperations Logic Microoperations Shift Microoperations COMPUTER TYPES Digital Computer is a fast electronic calculating machine that accepts digitized input information, processes it according to a list of internally stored instructions, and produces the resulting output information. Many types of computers exist that differ widely in Size, Cost, Computational Power and intended Use. Personal Computer/ Desktop computers. Portable Notebook Computers. Work Stations 4. Enterprise System Servers 5. Super Computers

BLOCK DIAGRAM OF COMPUTER FUNCTIONAL UNITS A digital computer consists of five functionally independent parts. Input Output Memory Unit Arithmetic and Logic Unit Control Unit Fig: Block diagram of a digital computer. REGISTER TRANSFER LANGUAGE The symbolic notation used to describe the microoperation transfers among registers is called a Register transfer language. Register transfer language A symbolic language A convenient tool for describing the internal organization of digital computers Can also be used to facilitate the design process of digital systems. REGISTER TRANSFER Registers are designated by capital letters, sometimes followed by numbers (e.g., A, R, IR). Often the names indicate function: MAR - memory address register PC - program counter IR - instruction register Information transfer from one register to another is designated in symbolic form by means of a replacement operator. R R In this case the contents of register R are copied (loaded) into register R and contents of R remains same.

BLOCK DIAGRAM OF A REGISTER R 7 6 5 4 Register R Showing individual bits Often we want the transfer to occur only under a predetermined control condition. if (p=) then (R R) where p is a control signal generated in the control section. 5 R Numbering of bits 5 8 7 PC(H) PC(L) Subfields (Divided into two parts) In digital systems, this is often done via a control signal, called a control function If the signal is, the action takes place This is represented as: P: R R HARDWARE IMPLEMENTATION OF CONTROLLED TRANSFERS Implementation of controlled transfer P: R R SIMULTANEOUS OPERATIONS If two or more operations are to occur simultaneously, they are separated with commas Block diagram Control Circuit P Load R n R Clock P: R R5, MAR IR Timing diagram Clock Load t t+ Transfer occurs here The same clock controls the circuits that generate the control function and the destination register Registers are assumed to use positive-edge-triggered flip-flops Here, if the control function P =, load the contents of R5 into R, and at the same time (clock), load the contents of register IR into register MAR

BASIC SYMBOLS FOR REGISTER TRANSFERS Symbols Description Examples Capital letters Denotes a register MAR, R & numerals BUS AND MEMORY TRANSFERS Bus is a path(of a group of wires) over which information is transferred, from any of several sources to any of several destinations. From a register to bus: BUS R Register A Register B Register C Register D Bus lines Parentheses () Denotes a part of a register R(-7), R(L) Arrow Denotes transfer of information R R Colon : Denotes termination of control function P: Comma, Separates two micro-operations A B, B A x select y Register A Register B Register C Register D 4 4 4 4 B C D B C D B C D B4 C4 D4 4 x 4 x 4 x 4 x 4-line bus TRANSFER FROM BUS TO A REGISTER BUS TRANSFER IN RTL Bus lines Three-State Bus Buffers Normal input A Control input C Reg. R Reg. R Reg. R Reg. R z Select w Bus line with three-state buffers Select Enable S D D D D x 4 Decoder A B C D E (enable) Load Output Y=A if C= High-impedence if C= Bus line for bit Depending on whether the bus is to be mentioned explicitly or not, register transfer can be indicated as either R R or BUS R, R BUS In the former case the bus is implicit, but in the latter, it is explicitly indicated

MEMORY (RAM) Memory (RAM) can be thought as a sequential circuits containing some number of registers These registers hold the words of memory Each of the r registers is indicated by an address These addresses range from to r- Each register (word) can hold n bits of data Assume the RAM contains r = k words. It needs the following n data input lines n data output lines k address lines A Read control line A Write control line address lines k Read Write data input lines n RAM unit MEMORY TRANSFER Collectively, the memory is viewed at the register level as a device, M. Since it contains multiple locations, we must specify which address in memory we will be using This is done by indexing memory references Memory is usually accessed in computer systems by putting the desired address in a special register, the Memory Address Register (MAR, or AR) When memory is accessed, the contents of the MAR get sent to the memory unit s address lines AR M Memory unit Read Write n data output lines Data out Data in MEMORY READ To read a value from a location in memory and load it into a register, the register transfer language notation looks like this: R M[MAR] This causes the following to occur The contents of the MAR get sent to the memory address lines A Read (= ) gets sent to the memory unit The contents of the specified address are put on the memory s output data lines These get sent over the bus to be loaded into register R MEMORY WRITE To write a value from a register to a location in memory looks like this in register transfer language: M[MAR] R This causes the following to occur The contents of the MAR get sent to the memory address lines A Write (= ) gets sent to the memory unit The values in register R get sent over the bus to the data input lines of the memory The values get loaded into the specified address in the memory

SUMMARY OF R. TRANSFER MICROOPERATIONS ARITHMETIC MICROOPERATIONS A B AR DR(AD) A constant ABUS R, R ABUS AR DR M[R] M DR M M DR Transfer content of reg. B into reg. A Transfer content of AD portion of reg. DR into reg. AR Transfer a binary constant into reg. A Transfer content of R into bus A and, at the same time, Transfer content of bus A into R Address register Data register Memory word specified by reg. R Equivalent to M[AR] Memory read operation: transfers content of memory word specified by AR into DR Memory write operation: transfers content of DR into memory word specified by AR Computer system microoperations are of four types:. Register transfer microoperations transfer binary information from one register to another. Arithmetic microoperations perform arithmetic operations on numeric data stored in registers.. Logic microoperations perform bit manipulation operations on non numeric data stored in registers. 4. Shift microoperations perform shift operations on data stored in registers. ARITHMETIC MICROOPERATIONS The basic arithmetic microoperations are Addition Subtraction Increment Decrement The additional arithmetic microoperations are Add with carry Subtract with borrow Transfer/Load etc. Table: Arithmetic Micro-Operations BINARY ADDER / SUBTRACTOR / INCREMENTER B A B A B A B A Binary Adder C C C C C4 S S S Binary Adder-Subtractor B A B A B A B A M C C C C R R + R R R - R R R R R + R R + R + R R + R R - Contents of R plus R transferred to R Contents of R minus R transferred to R Complement the contents of R 's complement the contents of R (negate) subtraction Increment Decrement C4 Binary Incrementer S A x y HA C S S A x y HA C S A x y HA C S S A x y HA C S C4 S S S

Cin S A B A B A B A B ARITHMETIC CIRCUIT S S S S 4x 4x 4x 4x S Cin Y Output Microoperation B D = A + B Add B D = A + B + Add with carry B D = A + B Subtract with borrow B D = A + B + Subtract D = A Transfer A D = A + Increment A D = A - Decrement A D = A Transfer A X Y X Y X Y X Y C C C C C C C C4 D D D D Cout LOGIC MICROOPERATIONS It specifies binary operations on the strings of bits stored in registers Logic microoperations are bit-wise operations, i.e., they work on the individual bits of data useful for bit manipulations on binary data useful for making logical decisions based on the bit value A B F F F F F 4 F 5 There are, in principle, 6 different logic functions that can be defined over two binary input variables LIST OF LOGIC MICROOPERATIONS List of Logic Microoperations - 6 different logic operations with binary vars. - n binary vars functions n Truth tables for 6 functions of variables and the corresponding 6 logic micro-operations x y Boolean Function Micro- Operations Name F = F Clear F = xy F A B AND F = xy' F A B F = x F A Transfer A F4 = x'y F A B F5 = y F B Transfer B F6 = x y F A B Exclusive-OR F7 = x + y F A B OR F8 = (x + y)' F A B) NOR F9 = (x y)' F (A B) Exclusive-NOR F = y' F B Complement B F = x + y' F A B F = x' F A Complement A F = x' + y F A B F4 = (xy)' F (A B) NAND F5 = F all 's Set to all 's HARDWARE IMPLEMENTATION OF LOGIC MICROOPERATIONS Ai Bi S 4 X Select Fi Function table S S Output -operation F = A B AND F = A B OR F = A B XOR F = A Complement

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 A A B Insert A (A B) + C Compare A A B... SELECTIVE SET In a selective set operation, the bit pattern in B is used to set certain bits in A A t B A t+ (A A + B) If a bit in B is set to, that same position in A gets set to, otherwise that bit in A keeps its previous value SELECTIVE COMPLEMENT In a selective complement operation, the bit pattern in B is used to complement certain bits in A A t B A t+ (A A B) If a bit in B is set to, that same position in A gets complemented from its original value, otherwise it is unchanged SELECTIVE CLEAR In a selective clear operation, the bit pattern in B is used to clear certain bits in A A t B A t+ (A A B ) If a bit in B is set to, that same position in A gets set to, otherwise it is unchanged

MASK OPERATION CLEAR OPERATION In a mask operation, the bit pattern in B is used to clear certain bits in A A t B A t+ (A A B) If a bit in B is set to, that same position in A gets set to, otherwise it is unchanged 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 A t B A t+ (A A B) INSERT OPERATION 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 into the low order four bits of A: A (Original) A (Desired) A (Original) Mask A (Intermediate) Added bits A (Desired)

SHIFT MICROOPERATIONS Shift microoperations are used for serial transfer of data. The information transferred through the serial input determines the type of shift. There are three types of shifts Logical shift Circular shift Arithmetic shift A right shift operation Serial input A left shift operation Serial input LOGICAL SHIFT In a logical shift the serial input to the shift is a. 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: R shr R R shl R 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: 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 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: sign bit In a RTL, the following notation is used cil for a circular shift left cir for a circular shift right Examples: R cir R R cil R A left arithmetic shift operation: sign bit

ARITHMETIC SHIFT An left arithmetic shift operation must be checked for the overflow sign bit In a RTL, the following notation is used ashl for an arithmetic shift left ashr for an arithmetic shift right Examples: R ashr R R ashl R V Before the shift, if the leftmost two bits differ, the shift will result in an overflow HARDWARE IMPLEMENTATION OF SHIFT MICROOPERATIONS A A A A Serial input (I R) Serial input (I L) Select for shift right (down) for shift left (up) S S S S H H H H ARITHMETIC LOGIC SHIFT UNIT S S S Bi A i Ai- A i+ C Arithmetic Circuit i 4 x Ci+ F i Logic Circuit D E i i shr shl Select S S S Cin Operation Function F = A Transfer A F = A + Increment A F = A + B Addition F = A + B + Add with carry F = A + B Subtract with borrow F = A + B + Subtraction F = A - Decrement A F = A TransferA X F = A B AND X F = A B OR X F = A B XOR X F = A Complement A X X X F = shr A Shift right A into F X X X F = shl A Shift left A into F