Lecture 16 Arithmetic Circuits

Slides:



Advertisements
Similar presentations
THE ARITHMETIC-LOGIC UNIT. BINARY HALF-ADDER BINARY HALF-ADDER condt Half adder InputOutput XYSC
Advertisements

Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Binary Addition Rules Adding Binary Numbers = = 1
ECE 331 – Digital System Design Flip-Flops and Registers (Lecture #18) The slides included herein were taken from the materials accompanying Fundamentals.
1 Lecture 8: Binary Multiplication & Division Today’s topics:  Addition/Subtraction  Multiplication  Division Reminder: get started early on assignment.
Lab 10 RT methodology (cont’d) Example 1 – a counter Example 2 – a repetitive-adder multiplier.
COE 308: Computer Architecture (T041) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
ETE Digital Electronics
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.
ECE 4110– Sequential Logic Design
Registers CPE 49 RMUTI KOTAT.
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.
Rabie A. Ramadan Lecture 3
Multiplication of signed-operands
ENG241 Digital Design Week #8 Registers and Counters.
REGISTER A register is a group of flip-flops. Each flip- flop is capable of storing one bit of informa­ tion. An n-bit register consists of a group of.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Abdullah Said Alkalbani University of Buraimi
9/15/09 - L26 Shift RegistersCopyright Joanne DeGroat, ECE, OSU1 Shift Registers.
Digital Logic Design.
CHAPTER 6 Sequential Circuits’ Analysis CHAPTER 6 Sequential Circuits’ Analysis Sichuan University Software College.
EKT 221 : Digital 2 Serial Transfers & Microoperations Date : Lecture : 2 hr.
Department of Communication Engineering, NCTU 1 Unit 4 Arithmetic and Logic Units.
My Book of Divisibility. THE 2’s Example: 30, 42, 24, 76, 98, Must be an even number Number must end in a 0, 2, 4, 6, or 8.
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
COMPUTER ARITHMETIC Arithmetic with Signed-2's Complement Numbers
Integer Operations Computer Organization and Assembly Language: Module 5.
Chapter 8 Computer Arithmetic. 8.1 Unsigned Notation Non-negative notation  It treats every number as either zero or a positive value  Range: 0 to 2.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Quick Guide to Adding, Subtracting, Multiplying, and Dividing Decimals
Arithmetic for Computers Chapter 3 1. Arithmetic for Computers  Operations on integers  Addition and subtraction  Multiplication and division  Dealing.
More Binary Arithmetic - Multiplication
COMPUTER ARITHMETIC Arithmetic with Signed-2's Complement Numbers
EKT 221 : DIGITAL 2.
Multiplication and Division basics
CHAPTER 18 Circuits for Arithmetic Operations
EKT 221 : Digital 2 Serial Transfers & Microoperations
Warm-up 6-4.
Lecture 11 Registers and Counters
Registers and Counters
Integer Division.
Chapter 4 Register Transfer and Microoperations
Chap 7. Register Transfers and Datapaths
EKT 221 : Digital 2 Serial Transfers & Microoperations
Prof. Hsien-Hsin Sean Lee
SLIDES FOR CHAPTER 12 REGISTERS AND COUNTERS
Morgan Kaufmann Publishers
Multiplication & Division
Arithmetic and Logic Units
Multipliers Multipliers play an important role in today’s digital signal processing and various other applications. The common multiplication method is.
Reference: Moris Mano 4th Edition Chapter 4
Digital Systems Section 14 Registers. Digital Systems Section 14 Registers.
Digital System Design Review.
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.
Data Representation and Arithmetic Algorithms
ECE 434 Advanced Digital System L13
ECE 434 Advanced Digital System L12
Decimal Operations.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Computation in Other Bases
By: A. H. Abdul Hafez CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU
Data Representation and Arithmetic Algorithms
ECE 434 Advanced Digital System L11
CHAPTER 18 Circuits for Arithmetic Operations
Outline Registers Counters 5/11/2019.
Shift registers and Floating Point Numbers
Design of Networks for Arithmetic Operation
Instruction execution and ALU
Presentation transcript:

Lecture 16 Arithmetic Circuits Serial adder Parallel multiplier Divider Control circuit outputs a sequence of control signals that cause arithmetic operation to take place at appropriate times. Chap 18

Serial Adder X register Accumulator: X = X+Y Y register Addend register: cyclic shift register after shifting 4 times, it is back in its original state Sh: shift signal SI: serial input Chap 18

Serial Adder At the falling clock edge and Sh= 1 Si (sum bi) is shifted into x Carry bit is stored in the D FF. Register y is rotated one bit to the right. Initial loading circuit not shown. Sh Carry is only updated when shift occurs. Chap 18

Serial Adder At the falling clock edge and Sh= 1 s0, c1 ready Before the first shift Chap 18

Control Unit Realization A start signal: St. If St is asserted, then the control unit puts out 4 shift signals then stops. St= Chap 18

Serial Processing Unit A start signal: St. If St is asserted, then the control unit puts out n shift (Fig. a) St = 1 for only one clock time. If St remains 1 until the shifting is completed, then a stop state is required. (Fig. b) Chap 18

Multiplier Add shift add shift add…. Check the right most bit of the multiplier. 1=> add + shift, 0=> shift. Shift right Add Chap 18

Multiplier Diagram Product register [3:0] = multiplier Load: ACC = 00000::multiplier Sh: shift ACC 1 bit right. St: start signal, start operation. M bit: M= 1, add + shift. M = 0, shift. Chap 18

Multiplier Control M/Ad: If M = 1 then Ad = 1, the rest of outputs is 0. How many clocks are required for a multiplication? Reset (waits for start) One bit Chap 18

Multiplier Control Multiplication for a large number of bits User a counter. When n-1 shifts have occurred, K = 1.Then go to S3 for completion (last shift also). Chap 18

Division Division = subtraction and shift 8-bit dividend by a 4-bit divisor to get a 4-bit quotient Use a 9-bit dividend register for shifting the dividend left. Store quotient bit by bit into the dividend register when shifting left. Chap 18

Binary Division Use a 9-bit dividend register for shifting the dividend left. Store quotient bit by bit into the dividend register when shifting left. Chap 18

Binary Division Use a 9-bit dividend register for shifting the dividend left. Store quotient bit by bit into the dividend register when shifting left. 1 135 Negative (no sub, shift) empty After the first Shift. 1 Q3 First sub 1 Chap 18

Binary Division (cont.) Use a 9-bit dividend register for shifting the dividend left. 1 Then shift left minus Remain 0 bc. minus sub Q1 =1 bc. sub remainder quotient Shift Not enough for sub. Chap 18

Binary Division (cont.) In this example, if Q > 15, then overflow occurs. If initially X8X7X6X5X4 >= Y3Y2Y1Y0, then the quotient will be greater than 15 and overflow occurs. Shift signal: Sh Shift the dividend one place to the left on the next rising clock edge. Subtract signal:Su Use a subtracter to compute X8X7X6X5X4 - Y3Y2Y1Y0 (this is combinational circuit). Su loads the subtracter output into X8X7X6X5X4 and sets the quotient bit to 1 on the next rising edge. Chap 18

Binary Division (cont.) Sh: shift the dividend register 1 bit left. Su: load X8 to X4 for the result of subtraction, (Ld). Set X0 to 1. Chap 18

Binary Division (cont.) C: if divisor > X8 to X4, C=0. No subtraction, generate shift. Sh=1. Otherwise C =1, subtract signal is generated (Su =1), Q bit is set to 1. Chap 18

Binary Division (cont.) St: start signal. St =1, load 8-bit dividend and 4-bit divisor into registers. If C = 1 at this moment, this is overflow. Set V flag. Chap 18

Binary Division (cont.) St: start signal. St =1, load 8-bit dividend and 4-bit divisor into registers. If C = 1 at this moment, this is overflow. Set V flag. Normally, C =0 at first. After C=1 (do sub), then C will always be 0. S0 S1 S2 St Compare and sub, C=0, set Sh =1. St =1. Set Load =1 Final sub Chap 18

Binary Division (cont.) One-hot assignment Chap 18

Binary Division (cont.) Complete circuit Chap 18