Computer Architecture

Slides:



Advertisements
Similar presentations
CPEN Digital System Design
Advertisements

Chapter 4 Register Transfer and Microoperations
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Chapter 7 Henry Hexmoor Registers and RTL
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
8085 processor. Bus system in microprocessor.
التصميم المنطقي Second Course
EE1A2 Microprocessor Systems & Digital Logic Part I Digital Electronic System Design Dr. T. Collins.
MEMORY ORGANIZATION Memory Hierarchy Main Memory Auxiliary Memory
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
King Fahd University of Petroleum and Minerals
The Control Unit: Sequencing the Processor Control Unit: –provides control signals that activate the various microoperations in the datapath the select.
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
IT Systems Number Operations EN230-1 Justin Champion C208 –
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Addition and Subtraction with Signed- Magnitude Data (Mano, Section 10-2) Basics Seminar, CSc 8215 High Performance Computing (2005 Fall) Mary R. Hudachek-Buswell.
Chapter 4 Register Transfer and Microoperations
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
MANINDER KAUR RAM and ROM Chips 24-Nov
EKT 221 Digital Electronics II
Chapter 6 Digital Arithmetic: Operations and Circuits ECE 221 Intro
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
EKT 221 : Digital 2 Memory Basics
Chapter 8 Problems Prof. Sin-Min Lee Department of Mathematics and Computer Science.
Chapter 4 Register Transfer and Micro -operations
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
Department of Communication Engineering, NCTU 1 Unit 4 Arithmetic and Logic Units.
Chapter 4 Register Transfer and Microoperations Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
COMPUTER ARITHMETIC Arithmetic with Signed-2's Complement Numbers
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.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
ACOE161 (Spring2007)MSI Devices1 Revision on MSI Devices M. Mano & C. Kime: Logic and Computer Design Fundamentals (Chapter 5)
Chapter 6. Digital Arithmetic: Operations and Circuits
REGISTER TRANSFER AND MICROOPERATIONS
Unit 1 Introduction Number Systems and Conversion.
8085 Microprocessor Architecture
COMPUTER ARITHMETIC Arithmetic with Signed-2's Complement Numbers
EKT 221 : DIGITAL 2.
Prof. Sin-Min Lee Department of Computer Science
CHAPTER 18 Circuits for Arithmetic Operations
Basic Computer Organization and Design
REGISTER TRANSFER AND MICROOPERATIONS
Chapter 4 Register Transfer and Microoperations
Chap 7. Register Transfers and Datapaths
Unit -2 ARITHMETIC.
Register Transfer and Microoperations
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Principles & Applications
Digital Systems Section 14 Registers. Digital Systems Section 14 Registers.
Registers and Counters
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
Magnitude Comparator A magnitude comparator is a combinational circuit that compares two numbers, A and B, and then determines their relative magnitudes.
Interfacing Memory Interfacing.
Number Representations and Basic Processor Architecture
Computer Organization and Design
Multiprocessor & Multicomputer
A.R. Hurson 323 CS Building, Missouri S&T
Registers.
CSC 220: Computer Organization
CHAPTER 18 Circuits for Arithmetic Operations
CHAPTER-3 REGISTER TRANSFER LANGUAGE AND MICROOPERATIONS
Computer Architecture CST 250
Information Representation: Machine Instructions
Instruction execution and ALU
Computer Architecture
Part I Data Representation and 8086 Microprocessors
Presentation transcript:

Computer Architecture Part V Arithmetic Algorithms and Memory Address Map Department of Computer Science, Faculty of Science, Chiang Mai University

204231: Computer Organization and Architecture Outline Signed-Magnitude Addition and Subtraction Multiply Operation Memory Address Map for Microprocessor 204231: Computer Organization and Architecture

Hardware for Signed-Magnitude Addition and Subtraction It consists of register A and B and sign flip-flop As and Bs. Subtraction is done by adding A to the 2’s complement of B. The output carry is transferred to flip-flop 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. 204231: Computer Organization and Architecture

Hardware for Signed-Magnitude Addition and Subtraction The addition of A plus B is done through the parallel adder. The S (sum) output of 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 M. 204231: Computer Organization and Architecture

Hardware for Signed-Magnitude Addition and Subtraction 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

Hardware for Signed-Magnitude Addition and Subtraction 204231: Computer Organization and Architecture

Hardware Implementation A and B are registers. AS and BS are sign flip-flops. E is an output carry flip-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

Multiplication Algorithm 204231: Computer Organization and Architecture

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 by 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

Hardware for Multiply Operation Initially, the multiplicand is in register B and the multiplier in Q. The sum of A and B forms partial product which is transferred to the EA register. Both partial product and multiplier are shifted to the right. The 0 is shifted into E. 204231: Computer Organization and Architecture

Hardware for Multiply Operation 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-flop in register Q, designated by Qn, will hold the bit of the multiplier, which must be inspected next. 204231: Computer Organization and Architecture

Hardware for Multiply Operation 204231: Computer Organization and Architecture

Numerical Example for Binary Multiplier 204231: Computer Organization and Architecture

204231: Computer Organization and Architecture 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 the computer and for tables of constants that do not change in value once the production of the computer is completed. 204231: Computer Organization and Architecture

204231: Computer Organization and Architecture 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

204231: Computer Organization and Architecture 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

204231: Computer Organization and Architecture Typical RAM chip 204231: Computer Organization and Architecture

204231: Computer Organization and Architecture Typical ROM chip 204231: Computer Organization and Architecture

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 x’s under the address bus lines designate those lines that must be connected to the address inputs in each chip. 204231: Computer Organization and Architecture

Memory Address Map for Microprocessor 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

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. 204231: Computer Organization and Architecture

Memory Address Map for Microprocessor The address bus lines are subdivided 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

Memory Address Map for Microprocessor 204231: Computer Organization and Architecture

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