ECE 4110– Sequential Logic Design

Slides:



Advertisements
Similar presentations
ECE2030 Introduction to Computer Engineering Lecture 13: Building Blocks for Combinational Logic (4) Shifters, Multipliers Prof. Hsien-Hsin Sean Lee School.
Advertisements

Datorteknik IntegerMulDiv bild 1 MIPS mul/div instructions Multiply: mult $2,$3Hi, Lo = $2 x $3;64-bit signed product Multiply unsigned: multu$2,$3Hi,
Cosc 2150: Computer Organization Chapter 9, Part 2 Integer multiplication and division.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 8 - Multiplication.
Number Systems & Operations
THE ARITHMETIC-LOGIC UNIT. BINARY HALF-ADDER BINARY HALF-ADDER condt Half adder InputOutput XYSC
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
Binary Addition Rules Adding Binary Numbers = = 1
EECS Components and Design Techniques for Digital Systems Lec 18 – Arithmetic II (Multiplication) David Culler Electrical Engineering and Computer.
Chapter 6 Arithmetic. Addition Carry in Carry out
L10 – Multiplication Division 1 Comp 411 – Fall /19/2009 Binary Multipliers ×
1 Lecture 8: Binary Multiplication & Division Today’s topics:  Addition/Subtraction  Multiplication  Division Reminder: get started early on assignment.
EECC341 - Shaaban #1 Lec # 3 Winter Binary Multiplication Multiplication is achieved by adding a list of shifted multiplicands according.
ECE 331 – Digital System Design
ECE 301 – Digital Electronics
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
1 Lecture 4: Arithmetic for Computers (Part 4) CS 447 Jason Bakos.
1 Arithmetic and Logical Operations - Part II. Unsigned Numbers Addition in unsigned numbers is the same regardless of the base. Given a pair of bit sequences.
Chapter 7 Arithmetic Operations and Circuits Binary Arithmetic Addition –When the sum exceeds 1, carry a 1 over to the next-more-significant column.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Copyright 1995 by Coherence LTD., all rights reserved (Revised: Oct 97 by Rafi Lohev, Oct 99 by Yair Wiseman, Sep 04 Oren Kapah) IBM י ב מ 10-1 The ALU.
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
Number Systems. Why binary numbers? Digital systems process information in binary form. That is using 0s and 1s (LOW and HIGH, 0v and 5v). Digital designer.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
Spring 2002EECS150 - Lec12-cl3 Page 1 EECS150 - Digital Design Lecture 12 - Combinational Logic Circuits Part 3 March 4, 2002 John Wawrzynek.
Multiplication of signed-operands
Digital Kommunikationselektronik TNE027 Lecture 2 1 FA x n –1 c n c n1- y n1– s n1– FA x 1 c 2 y 1 s 1 c 1 x 0 y 0 s 0 c 0 MSB positionLSB position Ripple-Carry.
Lecture 6: Multiply, Shift, and Divide
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
1 Arithmetic and Logic Operations Patt and Patel Ch. 2 & 3.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 8 Arithmetic.
Combinational Circuits
Topics covered: Arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
CEC 220 Digital Circuit Design Binary Arithmetic & Negative Numbers Monday, January 13 CEC 220 Digital Circuit Design Slide 1 of 14.
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
COE 308: Computer Architecture (T032) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
CEC 220 Digital Circuit Design Binary Arithmetic & Negative Numbers Fri, Aug 28 CEC 220 Digital Circuit Design Slide 1 of 14.
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
©2010 Cengage Learning SLIDES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION Click the mouse to move to the next page. Use the ESC key to exit.
Integer Operations Computer Organization and Assembly Language: Module 5.
Ch. 4 Computer Arithmetic
UNIT 2. ADDITION & SUBTRACTION OF SIGNED NUMBERS.
More on Digital Logic Devices and Circuits Trac D. Tran ECE Department The Johns Hopkins University Baltimore, MD
1 Lecture 5Multiplication and Division ECE 0142 Computer Organization.
Week 1(Number System) Muhammad Ammad uddin Logic Design Lab I (CEN211)
More Binary Arithmetic - Multiplication
Multiplication and Division basics
Digital Logic & Design Adil Waheed Lecture 02.
Integer Multiplication and Division
MIPS mul/div instructions
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Lecture 8: Binary Multiplication & Division
Multiplication & Division
Principles & Applications
Lecture 8: Addition, Multiplication & Division
CSCI206 - Computer Organization & Programming
Topic 3c Integer Multiply and Divide
Unsigned Multiplication
ECE/CS 552: Integer Multipliers
Computer Organization and Design
Digital Logic & Design Lecture 02.
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
Reading: Study Chapter (including Booth coding)
October 15 Chapter 4 – Multiplication/Division Go to the State Fair!
Montek Singh Mon, Mar 28, 2011 Lecture 11
Binary to Decimal Conversion
Number Representation
1 Lecture 5Multiplication and Division ECE 0142 Computer Organization.
Presentation transcript:

ECE 4110– Sequential Logic Design Lecture #22 Agenda MSI: Multipliers Announcements HW #10 due. Next Quiz 2. Lecture #22 Page 1

Multipliers Multipliers - binary multiplication of an individual bit can be performed using combinational logic: A * B P 0 0 0 0 1 0 we can say that: P = A·B 1 0 0 1 1 1 - for multi-bit multiplication, we can mimic the algorithm that we use when doing multiplication by hand ex) 1 2 this number is the "Multiplicand" x 3 4 this number is the "Multiplier" 4 8 1) multiplicand for digit (0) + 3 6 2) multiplicand for digit (1) 4 0 8 3) Sum of all multiplicands - this is called the "Shift and Add" algorithm Lecture #22 Page 2

Multipliers "Shift and Add" Multipliers - example of Binary Multiplication using our "by hand" method 11 1 0 1 1 - multiplicand x 13 x 1 1 0 1 - multiplier 33 1 0 1 1 11 0 0 0 0 - these are the individual multiplicands 1 0 1 1 + + 1 0 1 1 1 4 3 1 0 0 0 1 1 1 1 - the final product is the sum of all multiplicands - this is simple and straight forward. BUT, the addition of the individual multiplicand products requires as many as n-inputs. - we would really like to re-use our Full Adder circuits, which only have 3 inputs. Lecture #22 Page 3

Multipliers "Shift and Add" Multipliers - we can perform the additions of each multiplicand after it is created - this is called a "Partial Product" - to keep the algorithm consistent, we use "0000" as the first Partial Product 1 0 1 1 - Original multiplicand x 1 1 0 1 - Original multiplier 0 0 0 0 - Partial Product for 1st multiply 1 0 1 1 - Shifted Multiplicand for 1st multiply 1 0 1 1 - Partial Product for 2nd multiply 0 0 0 0  - Shifted Multiplicand for 2nd multiply 0 1 0 1 1 - Partial Product for 3rd multiply 1 0 1 1   - Shifted Multiplicand for 3rd multiply 1 1 0 1 1 1 - Partial Product for 4th multiply 1 0 1 1    - Shifted Multiplicand for 4th multiply 1 0 0 0 1 1 1 1 - the final product is the sum of all multiplicands Lecture #22 Page 4

Multipliers "Shift and Add" Multipliers - Graphical view of product terms and summation Lecture #22 Page 5

Multipliers "Shift and Add" Multipliers - Graphical View of interconnect for an 8x8 multiplier. Note the Full Adders Lecture #22 Page 6

Multipliers "Sequential" Multipliers - the main speed limitation of the Combinational "Shift and Add" multiplier is the delay through the adder chain. - in the worst case, the number of delay paths through the adders would be [n + 2(n-2)] ex) 4-bit = 8 Full Adders 8-bit = 20 Full Adders - we can decrease this delay by using a register to accumulate the incremental additions as they take place. - this would reduce the number of operation states to [n-1] "Carry Save" Multipliers - another trick to speed up the multiplication is to break the carry chain - we can run the 0th carry from the first row of adders into adder for the 2nd row - a final stage of adders is needed to recombine the carrys. But this reduces the delay to [n+(n-2)] Lecture #22 Page 7

Multipliers "Carry Save" Multipliers Lecture #22 Page 8

Signed Multipliers Multipliers - we leaned the "Shift and Add" algorithm for constructing a combinational multiplier - but this only worked for unsigned numbers - we can create a signed multiplier using a similar algorithm Convert to Positive - one of the simplest ways is to first convert any negative numbers to positive, then use the unsigned multiplier - the sign bit is added after the multiplication following: pos x pos = pos Remember 0=pos and 1=neg is 2's comp so this is an XOR pos x neg = neg neg x pos = neg neg x neg = pos Lecture #22 Page 9

Signed Multipliers 2's Comp Multiplier - remember that in a "Shift and Add', we created a shifted multiplicand - the shifted multiplicand corresponded to the weight of the multiplier bit - we can use this same technique for 2's comp remembering that - the MSB of a 2's comp # is -2(n-1) - we also must remember that 2's comp addition must - be on same-sized vectors - the carry is ignored - we can make partial products the same size as shifted multiplicands by doing a "2's comp sign extend" ex) 1011 = 11011 = 1110111 - since the MSB has a negative weight, we NEGATE the shifted multiplicand for that bit prior to the last addition. Lecture #22 Page 10

Signed Multipliers 2's Comp Shift and Add Multipliers - we can perform the additions of each multiplicand after it is created - this is called a "Partial Product" - to keep the algorithm consistent, we use "0000" as the first Partial Product 1 0 1 1 - Original multiplicand x 1 1 0 1 - Original multiplier 0 0 0 0 0 - Partial Product for 1st multiply w/ Sign Extension 1 1 0 1 1 - Shifted Multiplicand for 1st multiply w/ Sign Extension 1 1 1 0 1 1 - Partial Product for 2nd multiply w/ Sign Extension 0 0 0 0 0  - Shifted Multiplicand for 2nd multiply w/ Sign Extension 1 1 1 1 0 1 1 - Partial Product for 3rd multiply w/ Sign Extension 1 1 0 1 1   - Shifted Multiplicand for 3rd multiply w/ Sign Extension 1 1 1 0 0 1 1 1 - Partial Product for 4th multiply w/ Sign Extension 0 0 1 0 1    - NEGATED Shifted Multiplicand for 4th multiply w/ Sign Extension 1 0 0 0 0 1 1 1 1 - the final product is the sum of all multiplicands ignore Carry_Out Lecture #22 Page 11

Division Division - "Repeated Subtraction" - a simple algorithm to divide is to count the number of times you can subtract the divisor from the dividend - this is slow, but simple - the number of times it can be subtracted without going negative is the "Quotient" - if the subtracted value results in a zero/negative number, whatever was left prior to the subtraction is the "Remainder" Lecture #22 Page 12

Division Division - "Shift and Subtract" - Division is similar to multiplication, but instead of "Shift and Add", we "Shift and Subtract" Lecture #22 Page 13