University of Illinois at Chicago. Lecture Notes # 10

Size: px
Start display at page:

Download "University of Illinois at Chicago. Lecture Notes # 10"

Transcription

1 ECE 366 Computer Architecture Instructor: Shantanu Dutt Department of Electrical and Computer Engineering University of Illinois at Chicago Lecture otes # 0 COMPUTER ARITHMETIC: Integer Addition and Multiplication c Shantanu Dutt, UIC

2 c Shantanu Dutt, UIC 2 Inputs Outputs are, where S i FAi C i+ C i X i Y i Full Adder FA: ADDERS 2

3 c Shantanu Dutt, UIC 3 Problem: Delay is gate delays or is each gate has a delay of 2ns, delay for a 32-bit RCA is 64ns. each FA has a 2-gate delay. Thus S7 S6 S5 S4 S3 S2 S S0 cout FA6 c7 FA6 c6 FA5 c5 FA4 c4 FA3 c3 FA2 c2 FA c FA0 c0 x7 y7 x6 y6 x5 y5 x4 y4 x3 y3 x2 y2 x y x0 y0 Ripple-Carry Adder (RCA) 3

4 c Shantanu Dutt, UIC 4 always represents the sign bit of the sign-extended of the sum bit representation For 2 s complement representation of signed numbers overflow occurs when the carry into the MSB (most significant bit), which is also the sign bit, is different from the carry out of that bit. The carry out of the MSB Overflow is detected for unsigned addition when the carry out final Full Adder is For example, if 4-bit unsigned numbers 6 = added the sum (8) overflows since its binary fit in 4 bits equivalent does not of the and 2 = are Overflow occurs when the result of the operation does not fit in the representation being used Overflow in Addition 4

5 of the th stage can be expressed as: (but not both) is c Shantanu Dutt, UIC 5 is the propagate bit, which is only if the output carry is to be the same as the input carry, i.e.,. This will be the case only when either or Thus the carry out is the generate bit, which is only if a carry out is to be generated irrespective of the input carry. This obviously is the case only when To carry gen. logic S i P i G i From carry gen. logic FAi C i X i Y i A faster adder: The traditional carry-lookahead adder (CLA): Define two extra functions: Speeding up addition ADDERS (Contd.) 5

6 c Shantanu Dutt, UIC 6 In this CLA the ( for each, and 2 for the for a 4-bit RCA. s use 2-level s), logic as and thus opposed have to a delay of 3 gate delays!gate delays CARRY GEERATIO LOGIC S 3 P 3 G 3 S 2 P 2 G 2 S P G S 0 P 0 G 0 C 4 C 3 FA 3 FA 2 FA FA 0 C 2 C C 0 X 3 Y 3 X 2 Y 2 X Y X 0 Y 0 The s are generated by a carry-generation unit as shown below. Consider a 4-bit adder: ote that delay) by each modified full adder (MFA). and can be generated in constant time (specifically, gate Traditional CLA Adder (Contd.) 6

7 $ # c Shantanu Dutt, UIC 7 In general for an-bit group-cla adder with 4-bit CLA cells, the delay is gate delays as opposed to gate delays for the ripple-carry adder # Such a 6-bit adder has a delay of 2 gate delays (= 24ns for a gate delayof 2ns) as opposed to a delay of "= 32 gate delays (= = 64ns) in a 6-bit RCA S 5 2 S 8 S 7 4 S 3 0 = S C 6 C 2 C 8 C 4 4 bit CLA 4 bit CLA 4 bit CLA 4 bit CLA C X 5 2 Y 5 2 X 8 Y 8 X 7 4 Y 7 4 X 3 0 Y 3 0 A 6-bit adder can be partitioned into groups of 4 4-bit CLA adders, with the inter-group carries rippling through the four groups: messy Disadvantage: For a 6-bit adder, for example, we cannot go on generating the s in this manner, since the hardware becomess execssive and Traditional CLA Adder (Contd.) 7

8 & % 8 Traditional CLA Adder (Contd.) A note of caution: %-input gates have greater delays than 2-input gates for. We had assumed that for a 4-bit CLA the 5-input OR and AD gates have the same delay as a 2-input gate. The delay of a 5-input gate will be greater because: Vdd A V dd B A B AB AB A B Gnd (a) 2 i/p OR gate: delay = 2t s + 3RC A V dd A B B C D E A+B+C+D+E C (c) 5 i/p OR using 2 i/p gates: delay = 4t s + 7RC D V dd A B C D E E ABCDE ABCDE A B C D E Gnd (b) 5 i/p OR gate: delay = 2t s + 6RC c Shantanu Dutt, UIC 8

9 $ *)be the resistance of a channel, and ' Thus, while a 5-i/p AD/OR gate will be slower than a 2-i/p AD/OR gate, it will be faster than a cascaded implementation of a 5-i/p AD/OR ckt. The latter is primarily because more transistors switch on in parallel in a 5-i/p AD/OR gate than in a 5-i/p AD/OR ckt. ' ( + ) * while a 5-i/p AD/OR ckt. formed of cascaded 2-i/p gates will have a delay of ' ( " ) * a 5-i/p gate has a delay of ' ( # ) * Let MOS transistor, i.e., the max. of the time for charge to collect at the channel or the time for the charge to be removed from the channel Let the input gate capacitance of a transistor Then, a 2-i/p AD/OR gate has a delay of ( be the max. of the switching on and the switching off time of a Traditional CLA Adder (Contd.) 9

10 c Shantanu Dutt, UIC 0 $ 2-i/p gate delays. ote that the delay of an-bit group-cla adder with 4-bit cells will be somewhat more than # In a 4-bit CLA adder, we are essentally replacing a series of 2-i/p cascaded (multi-level) logic by a multiple-input 2-level logic 0

11 , / 0, c Shantanu Dutt, UIC For delays 3,, the time minimizes to (2-i/p) gate If group size is, time taken is $ 2 (2-i/p) gate delays s n Mux Mux Mux s Add c c in Add c c out in Add c 0 out in 0 Add c in c c out Add 0 c c in out Add 0 c c in out Add in x, y x, y n n 0 0 Carry-Select adder: Yes, by using a carry-select adder ( prefix circuit to generate all carries in time.- time), OR by using a parallel Can we do better than a delay that is linear in the number of bits? Faster adders

12 < ; c Shantanu Dutt, UIC 2 Also, 8is not a commutative operator, i.e., 9 8 ; ; 98 ote that 8is an associative operator, i.e., :9 ; ! 7 Define operator 8as: As a matter of fact,, where propagate bits of a FA discussed earlier 7 and are the generate and For the th full adder, define the symbols 4: kill incoming carry (when ) : propagate incoming carry (when ) : generate a carry (when ) We can encode these symbols as pair of bits. Each FA can produce in constant time 7 7 and call these 65 5 The parallel-prefix CLA adder 2

13 = of = 7 8 = 7 7 c Shantanu Dutt, UIC 3 The s can be computed in constant time after the If we can compute each the th FA as follows: If 4then else if then else if then = = quickly, then we can obtain the carry-in s are available = 8 7 is the th prefix of the associative computation: = 8 7 Define = for the th stage as The parallel-prefix CLA adder (contd.) 3

14 = B = = B = B 8 = = c Shantanu Dutt, UIC 4 i k k j r i,k r k,j! r i,j Since 8is associative, we have C BED = 8 D B C. Thus, = C 7 C 8? B C Define as Computing the s quickly: The parallel-prefix CLA adder (contd.) 4

15 = H = CB = CB c Shantanu Dutt, UIC 5 q 7 q 6 q 5 q 4 q 3 q 2 q q 0!!!! r 7,6 r r 5,4 3,2 r,0!! r 7,4! r 3,0 r 7,0 We can use the above property to form -level s by combining 2 adjacent s by combining two adjacent -level s, etc. This yields a tree-structured circuit with a 8logic at every node; this ckt. gives us only those for some s for which GF 7 s, then 2-level = B C The parallel-prefix CLA adder (contd.) 5

16 - / 0 / 0 L K - / 0 / 0 / 0-8-logic steps, = c Shantanu Dutt, UIC 6 VLSI area reqd.: height of tree is -, width of tree is Extra hardware used: JI 8logic units The delay is steps to come down - steps to go up the tree and This circuit is called a parallel prefix circuit, and can be used to obtain the prefixes of any associative operation (like AD, OR, addition, multiplication, etc.) r r r q 6,0 q q 4,0 q q 2,0 q q q 0 r 7,6 r r 5,4 5,0!!!!!!! a y b a b c y r,0 r 3,2 r,0!! c!!!! r 3,0!! r 7,4 r 3,0 x x!! p Legend: r 7,0 To obtain all s, the tree has to be augmented as shown below. The parallel-prefix CLA adder (contd.) 6

17 7 The parallel-prefix CLA adder (contd.) Another VLSI implementation of a parallel prefix tree: q n q 0 2 q i+ q i r i+,i r r n 0 c Shantanu Dutt, UIC 7

18 8 The parallel-prefix CLA adder (contd.) The final hardware: C out q 5 C 5 q 4 Parallel Prefix Module C 4 q C C 2 2 q q 0 C in S S S S S FA FA FA FA FA X Y 5 5 X Y 4 4 X Y 2 2 X Y X Y 0 0 c Shantanu Dutt, UIC 8

19 O c Shantanu Dutt, UIC 9 From Control Unit n bit Adder Cout C in Subtract/Add = /0 n n n n X Y The augmentation to an adder to perform subtraction is shown below: This means that, which we assume is in 2 s complement notation, has to be negated. A 2 s complement number is negated by complementing it and adding a, i.e., Subtraction M can be done using an adder, since M M SUBTRACTIO COMPUTER ARITHMETIC 9

20 Q Q Q P If the additions are done one at a time, we obtain a sequence of partial products AR R R Add-and-shift (A&S) multiplication: Manual Example: Serial Multiplication MULTIPLIERS COMPUTER ARITHMETIC 20

21 Mis the multiplier and M Q Q QEach partial product c Shantanu Dutt, UIC 2 where T the multiplicand T Thus is obtained as 2

22 Q U Q Q P Q c Shantanu Dutt, UIC 22 T However, is the same: Q R Q R In this case, the partial products obtained are: The same effect as shifting the multiplicand left ( ) can be achieved by keeping the multiplicand fixed at the left-most position and shifting the partial product Example: right. R A&S multiplication (contd.): 22

23 * YXW Z * V c Shantanu Dutt, UIC 23 Final product is in AC-Q register OTE: Overflows are tolerated in the additions AC when right shifting is fed to the MSB of If LSB of Q is then AC = AC+M else AC = AC; Shift YXW -AC-Q register combination right by bit Algorithm: Initialize AC = 0; Q = Multiplier; M = Multiplicand. Do the following steps times Add and shift multiplication for unsigned numbers 6 Accumulator Q M 6 6 And 6 C out 6 bit Adder C out Reg. Multiplier X Multiplicand Y Hardware: A&S multiplication (contd.): 23

24 Q Q Mand Q M M Mand c Shantanu Dutt, UIC 24 Disadvantage: Preprocessing and postprocessing can take up to 4 clock cycles (cc s) If exactly one of it becomes negative, i.e. was negative, get Q s 2 s complement so that Multiply M If multiplicand is -ve get its 2 s complement so that it becomes positive, i.e. If multiplier Mis -ve get its 2 s complement so that it becomes positive, i.e. Assumption: Both Method : are in their 2 s complement representation A&S 2 s complement multiplication 24

25 * YXW * YXW * YXW Q QMis +ve perform M c Shantanu Dutt, UIC 25 When the multiplier taking care to do the following when each is shifted right:. When there is no overflow in the addition (recall the condition for overflow for 2 s complement addition), an arithmetic right shift of register AC.Q is performed without shifting in into the MSB of AC 2. Arithmetic right shift: MSB is sign-extended, i.e., if the MSB (sign bit) is a is shifted into the MSB of AC, otherwise a 0 is shifted in 3. If there is an overflow, then as in the unsigned case, shift into MSB of AC when shifting AC.Q right. This works because in this case the bit output of the adder, where is the MSB, is the exact 2 s complement representation of the sum. Check this by sign extending the inputs to bits and compute the sum the output will be the same as for the -bit inputs, but without overflow out of the th bit Method 2: A&S 2 s complement multiplication (contd.) : 25

26 P 26 A&S 2 s complement multiplication (contd.) : Method 2 (contd.): Example: c Shantanu Dutt, UIC 26

27 Mbits of S QThus S ]\[ M c Shantanu Dutt, UIC 27 where the first term represents normal ^ _ `multiplication for the first T is and thus M T M. When U is negative, T M This works because the value of a 2 s complement number is given by R R R additions as ex- If the multiplier Mis negative, perform the first plained above, and then subtract as the final step Method 2 (contd.): A&S 2 s complement multiplication (contd.) : 27

28 Q M S Q P c Shantanu Dutt, UIC 28 Thus which is what we are doing T M U U T, T f \ c M The magnitude of a negative Mis given by ba ced M :f \ c M ote that multiplication is performed on the basis: Method 2 Example: A&S 2 s complement multiplication (contd.) : 28

29 29 A&S 2 s complement multiplication (contd.) : Method 2 (contd.): Hardware: If ovfl then AC[0] Logic : output = C else out output = AC[0] AC[0] Logic Accumulator Q M 6 6 And Ovfl. C det. 5 6 C out 6 6 bit Adder Multiplier X Multiplicand Y Add and shift multiplication for 2 s complement numbers c Shantanu Dutt, UIC 29

30 lm c Shantanu Dutt, UIC 30 Thus when the multiplier contains long (greater than length 2) strings of s, Booth s multiplication is faster Thus instead of adding and shifting 4 times (corresponding to the string of 4 s in 00), we can subtract ( ) when we see the st coming after a 0 inm, i.e., we detect the 2-bit substring 0 in the last 2 bits of the current just shift 4 times and then add M, ( ) when we see that the current string of s inmhave ended, i.e., we detect the 2-bit substring 0 in the last 2 bits of the current M. This saves us two adds n gh hhh o g mi n h o ggggg m j n g gggh g o gh hhh gi h gggggkj ggggh g Idea: Consider the following substring of M: Booth s Algorithm Speeding Up Serial Multiplication 30

31 ! steps ( qp h Mcally. Consider the following c Shantanu Dutt, UIC 3 Since the multiplication algorithm contains "in the above example), the is ignored and we end up subtracting times the multiplicand exactly the right answer! hhh gggi j r i ggggggj gggh gg Booth s multiplication also takes care of a negative multiplier automati- : Booth s Algorithm (contd.) 3

32 at the U C O ote: () For unsigned multiplication, we need to pad the multiplier Mwith mythical 0s on both sides (right of LSB padding required to start off the process) (2) For 2 s complement multiplication, we need to pad the multiplier Mwith a mythical 0 only to the right of its LSB. This works because (for 2 s complement, the last run of s is..., where the leftmost is the sign bit (bit ) and suppose the rightmost is the th bit from left, then the value of this sequence is, which is exactly the value we alloted to this sequence when we subtracted th bit position at the C T Middle of a run of s Only shift 0 0 End of a run of s 0 0 Middle of a run of 0s Only shift 0 0 Beginning of a run of s Bit Bit Explanation Action (current) (prev.) 6s Booth s algorithm is decribed by the following table for iteration : Booth s Algorithm (contd.) 32

33 subtract means add O C tbeginning of this last run of s. Further, if c Shantanu Dutt, UIC 33 Hardware: Excercise is the value we alloted to the rest of the multiplier before the last run of s, then the final value we give to the multiplier is t, which is its correct value in 2 s complement: is the th bit of the Booth Recoding of means no arithmetic means operation, t. (3) M: (4) xs, ws uu C T t v 33

34 P 34 Booth s Algorithm (contd.) Examples: c Shantanu Dutt, UIC 34

35 $ $ % % $ % c Shantanu Dutt, UIC 35 This will enable us to treat isolated s and 0s differently from runs of s and 0s. Solution: Look at 3 consecutive bits of the multiplier instead of 2 to decide what to do. This is called the Modified Booth s Algorithm (MBA) Problem: When the multiplier contains long strings (say, of length %) of alternating s and 0s ( ), then we perform additions and subtractions using Booth s algorithm compared to only additions using regular add-and-shift Booth s Algorithm (contd.) 35

36 have added on detecting 0 and then subtracted and this isolated 0 is not following an isolated, then we subtract on detecting 0 and added c Shantanu Dutt, UIC 36 corresponding to the isolated 0. This is correct, since in BA we would on detecting 0. This is equivalent to adding again, we are doing the RHS in MBA h gh we add corresponding to the isolated. This is correct, since in BA we would have subtracted a on subsequently detecting 0. Thus assuming the is the th bit, we would have added we are doing the RHS in MBA When we see a gh g Thus when we see a Modified Booth s Algorithm 36

37 and not the previous bit of M Thus actually the least significant of the 3 bits that we observe should be M. Except when distinguishing between an These cases are distinguished by setting a latch is spotted, and to if a run of s is spotted to be 0 when an isolated which are identical. In the first case, we need to have noted that the corresponds to an isolated, so that we do not do anything. In the second case, this means end of a run of s, and so we need to add (as in BA). y z { The st has an isolated and the 2nd a run of s. For the st case we have added corresponding to the, and in the second case, we do not do anything as we are in the middle of a run of s (as in BA) After a right shift, we have the patterns y z { After detecting an isolated (00), it should be noted as such so that after shifting right, we don t misinterpret the bit pattern as ending a run of s. For example, consider two bit patterns showing the 4 consecutive bits of Modified Booth s Algorithm (contd.) 37

38 will be the same as the c Shantanu Dutt, UIC 38 y z { isolated (0) and the end of a run of s (0 s) previously observed bit of M. Thus after a right shift, the above 3-bit patterns will be 38

39 second we subtract In the first case, we correctly do nothing (we already subtracted z { z { M c Shantanu Dutt, UIC 39 corresponding to the isolated 0) corresponding to the middle bit and in the, since the middle bit begins a run of s which has not yet been accounted for. y Thus after a right shift, the above 3-bit patterns will not be identical, but will be The st has an isolated 0 in its 2nd bit for which we subtracted and the 2nd pattern has a 0 in its 2nd bit that ends a run of 0 s. y Again, consider two bit patterns showing 4 consecutive bits of Similarly, we need to distinguish between an isolated 0 and the end of a run of 0 s. In the former case, is set to and to 0 in the latter case Modified Booth s Algorithm (contd.) 39

40 O } } which c Shantanu Dutt, UIC 40? ote that except in the isolated /0 case,? (as in BA), otherwise The second bit is bit is (in the th iteration, ), and the leftmost The rightmost bit in the 3 bits that we are looking at is actually is initialized to 0 Modified Booth s Algorithm (contd.) 40

41 $ $ $ M ƒ ƒ ~ Explanationew } } c Shantanu Dutt, UIC 4 OTE: () The multiplier needs to be padded by mythical 0s on both sides for unsigned and 2 s complement multiplication. (2) is the th bit of the Modified Booth Recoding of (3) This signed-digit encoding has #0s on the average, as opposed to in the regular binary code. Thus "fewer arithmetic operations are required on the average using MBA for multiplication. xs 0 Begins a run of s 0 0 Begins a run of 0s 0 0 Middle of a run of s 0 0 Isolated 0 following a run of s Middle of a run of s Isolated 0 following an isolated OR Middle of a run of 0s Middle of a run of 0s Isolated 0 Bit Bit (next) (current) ~ We thus have the following Modified Booth s Algorithm described for iteration, : Modified Booth s Algorithm (contd.) 4

42 P 42 Modified Booth s Algorithm (contd.) Examples: c Shantanu Dutt, UIC 42

ECE 341. Lecture # 6

ECE 341. Lecture # 6 ECE 34 Lecture # 6 Instructor: Zeshan Chishti zeshan@pdx.edu October 5, 24 Portland State University Lecture Topics Design of Fast Adders Carry Looakahead Adders (CLA) Blocked Carry-Lookahead Adders Multiplication

More information

Iterative Division Techniques COMPUTER ARITHMETIC: Lecture Notes # 6. University of Illinois at Chicago

Iterative Division Techniques COMPUTER ARITHMETIC: Lecture Notes # 6. University of Illinois at Chicago 1 ECE 368 CAD Based Logic Design Instructor: Shantanu Dutt Department of Electrical and Computer Engineering University of Illinois at Chicago Lecture Notes # 6 COMPUTER ARITHMETIC: Iterative Division

More information

University of Illinois at Chicago. Lecture Notes # 13

University of Illinois at Chicago. Lecture Notes # 13 1 ECE 366 Computer Architecture Instructor: Shantanu Dutt Department of Electrical and Computer Engineering University of Illinois at Chicago Lecture Notes # 13 COMPUTER ARITHMETIC: Iterative Division

More information

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Arithmetic (a) The four possible cases Carry (b) Truth table x y

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Arithmetic (a) The four possible cases Carry (b) Truth table x y Arithmetic A basic operation in all digital computers is the addition and subtraction of two numbers They are implemented, along with the basic logic functions such as AND,OR, NOT,EX- OR in the ALU subsystem

More information

At the ith stage: Input: ci is the carry-in Output: si is the sum ci+1 carry-out to (i+1)st state

At the ith stage: Input: ci is the carry-in Output: si is the sum ci+1 carry-out to (i+1)st state Chapter 4 xi yi Carry in ci Sum s i Carry out c i+ At the ith stage: Input: ci is the carry-in Output: si is the sum ci+ carry-out to (i+)st state si = xi yi ci + xi yi ci + xi yi ci + xi yi ci = x i yi

More information

Week 7: Assignment Solutions

Week 7: Assignment Solutions Week 7: Assignment Solutions 1. In 6-bit 2 s complement representation, when we subtract the decimal number +6 from +3, the result (in binary) will be: a. 111101 b. 000011 c. 100011 d. 111110 Correct answer

More information

COMP 303 Computer Architecture Lecture 6

COMP 303 Computer Architecture Lecture 6 COMP 303 Computer Architecture Lecture 6 MULTIPLY (unsigned) Paper and pencil example (unsigned): Multiplicand 1000 = 8 Multiplier x 1001 = 9 1000 0000 0000 1000 Product 01001000 = 72 n bits x n bits =

More information

Binary Arithmetic. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T.

Binary Arithmetic. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. Binary Arithmetic Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. MIT 6.004 Fall 2018 Reminder: Encoding Positive Integers Bit i in a binary representation (in right-to-left order)

More information

Arithmetic Logic Unit. Digital Computer Design

Arithmetic Logic Unit. Digital Computer Design Arithmetic Logic Unit Digital Computer Design Arithmetic Circuits Arithmetic circuits are the central building blocks of computers. Computers and digital logic perform many arithmetic functions: addition,

More information

EE878 Special Topics in VLSI. Computer Arithmetic for Digital Signal Processing

EE878 Special Topics in VLSI. Computer Arithmetic for Digital Signal Processing EE878 Special Topics in VLSI Computer Arithmetic for Digital Signal Processing Part 6c High-Speed Multiplication - III Spring 2017 Koren Part.6c.1 Array Multipliers The two basic operations - generation

More information

Computer Architecture and Organization

Computer Architecture and Organization 3-1 Chapter 3 - Arithmetic Computer Architecture and Organization Miles Murdocca and Vincent Heuring Chapter 3 Arithmetic 3-2 Chapter 3 - Arithmetic Chapter Contents 3.1 Fixed Point Addition and Subtraction

More information

ECE 30 Introduction to Computer Engineering

ECE 30 Introduction to Computer Engineering ECE 30 Introduction to Computer Engineering Study Problems, Set #6 Spring 2015 1. With x = 1111 1111 1111 1111 1011 0011 0101 0011 2 and y = 0000 0000 0000 0000 0000 0010 1101 0111 2 representing two s

More information

CPE300: Digital System Architecture and Design

CPE300: Digital System Architecture and Design CPE300: Digital System Architecture and Design Fall 2011 MW 17:30-18:45 CBC C316 Arithmetic Unit 10122011 http://www.egr.unlv.edu/~b1morris/cpe300/ 2 Outline Recap Fixed Point Arithmetic Addition/Subtraction

More information

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer Arithmetic ECE 666 Part 6c High-Speed Multiplication - III Israel Koren Fall 2010 ECE666/Koren Part.6c.1 Array Multipliers

More information

Interacting Modules. COMMUNICATION and INPUT/OUTPUT: Lecture Notes # 11. CAD Based Logic Design ECE 368

Interacting Modules. COMMUNICATION and INPUT/OUTPUT: Lecture Notes # 11. CAD Based Logic Design ECE 368 ECE 368 CAD Based Logic Design Lecture Notes # 11 COMMUNICATION and INPUT/OUTPUT: Interacting Modules SHANTANU DUTT Department of Electrical & Computer Engineering University of Illinois, Chicago Phone:

More information

Data Representation Type of Data Representation Integers Bits Unsigned 2 s Comp Excess 7 Excess 8

Data Representation Type of Data Representation Integers Bits Unsigned 2 s Comp Excess 7 Excess 8 Data Representation At its most basic level, all digital information must reduce to 0s and 1s, which can be discussed as binary, octal, or hex data. There s no practical limit on how it can be interpreted

More information

Principles of Computer Architecture. Chapter 3: Arithmetic

Principles of Computer Architecture. Chapter 3: Arithmetic 3-1 Chapter 3 - Arithmetic Principles of Computer Architecture Miles Murdocca and Vincent Heuring Chapter 3: Arithmetic 3-2 Chapter 3 - Arithmetic 3.1 Overview Chapter Contents 3.2 Fixed Point Addition

More information

Chapter 3: part 3 Binary Subtraction

Chapter 3: part 3 Binary Subtraction Chapter 3: part 3 Binary Subtraction Iterative combinational circuits Binary adders Half and full adders Ripple carry and carry lookahead adders Binary subtraction Binary adder-subtractors Signed binary

More information

EECS150 - Digital Design Lecture 13 - Combinational Logic & Arithmetic Circuits Part 3

EECS150 - Digital Design Lecture 13 - Combinational Logic & Arithmetic Circuits Part 3 EECS15 - Digital Design Lecture 13 - Combinational Logic & Arithmetic Circuits Part 3 October 8, 22 John Wawrzynek Fall 22 EECS15 - Lec13-cla3 Page 1 Multiplication a 3 a 2 a 1 a Multiplicand b 3 b 2 b

More information

ECE 341 Midterm Exam

ECE 341 Midterm Exam ECE 341 Midterm Exam Time allowed: 90 minutes Total Points: 75 Points Scored: Name: Problem No. 1 (10 points) For each of the following statements, indicate whether the statement is TRUE or FALSE: (a)

More information

ECE 341. Lecture # 7

ECE 341. Lecture # 7 ECE 34 Lecture # 7 Instructor: Zeshan Chishti zeshan@pdx.edu October 2, 24 Portland State University Lecture Topics Multiplication of Unsigned Numbers Sequential Circuit Multiplier Multiplication of Signed

More information

EE 109 Unit 6 Binary Arithmetic

EE 109 Unit 6 Binary Arithmetic EE 109 Unit 6 Binary Arithmetic 1 2 Semester Transition Point At this point we are going to start to transition in our class to look more at the hardware organization and the low-level software that is

More information

ECE 341 Midterm Exam

ECE 341 Midterm Exam ECE 341 Midterm Exam Time allowed: 75 minutes Total Points: 75 Points Scored: Name: Problem No. 1 (8 points) For each of the following statements, indicate whether the statement is TRUE or FALSE: (a) A

More information

Overview. EECS Components and Design Techniques for Digital Systems. Lec 16 Arithmetic II (Multiplication) Computer Number Systems.

Overview. EECS Components and Design Techniques for Digital Systems. Lec 16 Arithmetic II (Multiplication) Computer Number Systems. Overview EE 15 - omponents and Design Techniques for Digital ystems Lec 16 Arithmetic II (Multiplication) Review of Addition Overflow Multiplication Further adder optimizations for multiplication LA in

More information

Jan Rabaey Homework # 7 Solutions EECS141

Jan Rabaey Homework # 7 Solutions EECS141 UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences Last modified on March 30, 2004 by Gang Zhou (zgang@eecs.berkeley.edu) Jan Rabaey Homework # 7

More information

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1> Chapter 5 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 5 Chapter 5 :: Topics Introduction Arithmetic Circuits umber Systems Sequential Building

More information

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

CS 5803 Introduction to High Performance Computer Architecture: Arithmetic Logic Unit. A.R. Hurson 323 CS Building, Missouri S&T CS 5803 Introduction to High Performance Computer Architecture: Arithmetic Logic Unit A.R. Hurson 323 CS Building, Missouri S&T hurson@mst.edu 1 Outline Motivation Design of a simple ALU How to design

More information

EC2303-COMPUTER ARCHITECTURE AND ORGANIZATION

EC2303-COMPUTER ARCHITECTURE AND ORGANIZATION EC2303-COMPUTER ARCHITECTURE AND ORGANIZATION QUESTION BANK UNIT-II 1. What are the disadvantages in using a ripple carry adder? (NOV/DEC 2006) The main disadvantage using ripple carry adder is time delay.

More information

Arithmetic Logic Unit

Arithmetic Logic Unit Arithmetic Logic Unit A.R. Hurson Department of Computer Science Missouri University of Science & Technology A.R. Hurson 1 Arithmetic Logic Unit It is a functional bo designed to perform "basic" arithmetic,

More information

CS/COE 0447 Example Problems for Exam 2 Spring 2011

CS/COE 0447 Example Problems for Exam 2 Spring 2011 CS/COE 0447 Example Problems for Exam 2 Spring 2011 1) Show the steps to multiply the 4-bit numbers 3 and 5 with the fast shift-add multipler. Use the table below. List the multiplicand (M) and product

More information

Microcomputers. Outline. Number Systems and Digital Logic Review

Microcomputers. Outline. Number Systems and Digital Logic Review Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded

More information

Chapter 4. Combinational Logic

Chapter 4. Combinational Logic Chapter 4. Combinational Logic Tong In Oh 1 4.1 Introduction Combinational logic: Logic gates Output determined from only the present combination of inputs Specified by a set of Boolean functions Sequential

More information

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization CS/COE0447: Computer Organization and Assembly Language Chapter 3 Sangyeun Cho Dept. of Computer Science Five classic components I am like a control tower I am like a pack of file folders I am like a conveyor

More information

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization Five classic components CS/COE0447: Computer Organization and Assembly Language I am like a control tower I am like a pack of file folders Chapter 3 I am like a conveyor belt + service stations I exchange

More information

Digital Computer Arithmetic

Digital Computer Arithmetic Digital Computer Arithmetic Part 6 High-Speed Multiplication Soo-Ik Chae Spring 2010 Koren Chap.6.1 Speeding Up Multiplication Multiplication involves 2 basic operations generation of partial products

More information

CS 64 Week 1 Lecture 1. Kyle Dewey

CS 64 Week 1 Lecture 1. Kyle Dewey CS 64 Week 1 Lecture 1 Kyle Dewey Overview Bitwise operation wrap-up Two s complement Addition Subtraction Multiplication (if time) Bitwise Operation Wrap-up Shift Left Move all the bits N positions to

More information

Computer Architecture Set Four. Arithmetic

Computer Architecture Set Four. Arithmetic Computer Architecture Set Four Arithmetic Arithmetic Where we ve been: Performance (seconds, cycles, instructions) Abstractions: Instruction Set Architecture Assembly Language and Machine Language What

More information

Homework 3. Assigned on 02/15 Due time: midnight on 02/21 (1 WEEK only!) B.2 B.11 B.14 (hint: use multiplexors) CSCI 402: Computer Architectures

Homework 3. Assigned on 02/15 Due time: midnight on 02/21 (1 WEEK only!) B.2 B.11 B.14 (hint: use multiplexors) CSCI 402: Computer Architectures Homework 3 Assigned on 02/15 Due time: midnight on 02/21 (1 WEEK only!) B.2 B.11 B.14 (hint: use multiplexors) 1 CSCI 402: Computer Architectures Arithmetic for Computers (2) Fengguang Song Department

More information

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS C H A P T E R 6 DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS OUTLINE 6- Binary Addition 6-2 Representing Signed Numbers 6-3 Addition in the 2 s- Complement System 6-4 Subtraction in the 2 s- Complement

More information

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

*Instruction Matters: Purdue Academic Course Transformation. Introduction to Digital System Design. Module 4 Arithmetic and Computer Logic Circuits Purdue IM:PACT* Fall 2018 Edition *Instruction Matters: Purdue Academic Course Transformation Introduction to Digital System Design Module 4 Arithmetic and Computer Logic Circuits Glossary of Common Terms

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus INTERNAL ASSESSMENT TEST III Date : 21/11/2017 Max Marks : 40 Subject & Code : Computer Organization (15CS34) Semester : III (A & B) Name of the faculty: Mrs. Sharmila Banu Time : 11.30 am 1.00 pm Answer

More information

Chapter 3 Arithmetic for Computers

Chapter 3 Arithmetic for Computers Chapter 3 Arithmetic for Computers 1 Arithmetic Where we've been: Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's up ahead: Implementing the Architecture operation

More information

Chapter 3: Arithmetic for Computers

Chapter 3: Arithmetic for Computers Chapter 3: Arithmetic for Computers Objectives Signed and Unsigned Numbers Addition and Subtraction Multiplication and Division Floating Point Computer Architecture CS 35101-002 2 The Binary Numbering

More information

Outline. Introduction to Structured VLSI Design. Signed and Unsigned Integers. 8 bit Signed/Unsigned Integers

Outline. Introduction to Structured VLSI Design. Signed and Unsigned Integers. 8 bit Signed/Unsigned Integers Outline Introduction to Structured VLSI Design Integer Arithmetic and Pipelining Multiplication in the digital domain HW mapping Pipelining optimization Joachim Rodrigues Signed and Unsigned Integers n-1

More information

Chapter 10 Binary Arithmetics

Chapter 10 Binary Arithmetics 27..27 Chapter Binary Arithmetics Dr.-Ing. Stefan Werner Table of content Chapter : Switching Algebra Chapter 2: Logical Levels, Timing & Delays Chapter 3: Karnaugh-Veitch-Maps Chapter 4: Combinational

More information

COMPUTER ARITHMETIC (Part 1)

COMPUTER ARITHMETIC (Part 1) Eastern Mediterranean University School of Computing and Technology ITEC255 Computer Organization & Architecture COMPUTER ARITHMETIC (Part 1) Introduction The two principal concerns for computer arithmetic

More information

Arithmetic and Logical Operations

Arithmetic and Logical Operations Arithmetic and Logical Operations 2 CMPE2c x +y + sum Or in tabular form Binary Addition Carry Out Sum B A Carry In Binary Addition And as a full adder a b co ci sum 4-bit Ripple-Carry adder: Carry values

More information

By, Ajinkya Karande Adarsh Yoga

By, Ajinkya Karande Adarsh Yoga By, Ajinkya Karande Adarsh Yoga Introduction Early computer designers believed saving computer time and memory were more important than programmer time. Bug in the divide algorithm used in Intel chips.

More information

CO Computer Architecture and Programming Languages CAPL. Lecture 9

CO Computer Architecture and Programming Languages CAPL. Lecture 9 CO20-320241 Computer Architecture and Programming Languages CAPL Lecture 9 Dr. Kinga Lipskoch Fall 2017 A Four-bit Number Circle CAPL Fall 2017 2 / 38 Functional Parts of an ALU CAPL Fall 2017 3 / 38 Addition

More information

Number Systems and Computer Arithmetic

Number Systems and Computer Arithmetic Number Systems and Computer Arithmetic Counting to four billion two fingers at a time What do all those bits mean now? bits (011011011100010...01) instruction R-format I-format... integer data number text

More information

Chapter 5 : Computer Arithmetic

Chapter 5 : Computer Arithmetic Chapter 5 Computer Arithmetic Integer Representation: (Fixedpoint representation): An eight bit word can be represented the numbers from zero to 255 including = 1 = 1 11111111 = 255 In general if an nbit

More information

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

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26) Lecture Topics Today: Integer Arithmetic (P&H 3.1-3.4) Next: continued 1 Announcements Consulting hours Introduction to Sim Milestone #1 (due 1/26) 2 1 Overview: Integer Operations Internal representation

More information

We are quite familiar with adding two numbers in decimal

We are quite familiar with adding two numbers in decimal Addition We are quite familiar with adding two numbers in decimal What about adding two binary numbers? If we use the two s complement method to represent binary numbers, addition can be done in a straightforward

More information

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010 Digital Logic & Computer Design CS 434 Professor Dan Moldovan Spring 2 Copyright 27 Elsevier 5- Chapter 5 :: Digital Building Blocks Digital Design and Computer Architecture David Money Harris and Sarah

More information

Binary Adders. Ripple-Carry Adder

Binary Adders. Ripple-Carry Adder Ripple-Carry Adder Binary Adders x n y n x y x y c n FA c n - c 2 FA c FA c s n MSB position Longest delay (Critical-path delay): d c(n) = n d carry = 2n gate delays d s(n-) = (n-) d carry +d sum = 2n

More information

Outline. EEL-4713 Computer Architecture Multipliers and shifters. Deriving requirements of ALU. MIPS arithmetic instructions

Outline. EEL-4713 Computer Architecture Multipliers and shifters. Deriving requirements of ALU. MIPS arithmetic instructions Outline EEL-4713 Computer Architecture Multipliers and shifters Multiplication and shift registers Chapter 3, section 3.4 Next lecture Division, floating-point 3.5 3.6 EEL-4713 Ann Gordon-Ross.1 EEL-4713

More information

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

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University Digital Circuit Design and Language Datapath Design Chang, Ik Joon Kyunghee University Typical Synchronous Design + Control Section : Finite State Machine + Data Section: Adder, Multiplier, Shift Register

More information

EE260: Logic Design, Spring n Integer multiplication. n Booth s algorithm. n Integer division. n Restoring, non-restoring

EE260: Logic Design, Spring n Integer multiplication. n Booth s algorithm. n Integer division. n Restoring, non-restoring EE 260: Introduction to Digital Design Arithmetic II Yao Zheng Department of Electrical Engineering University of Hawaiʻi at Mānoa Overview n Integer multiplication n Booth s algorithm n Integer division

More information

ECE 341 Midterm Exam

ECE 341 Midterm Exam ECE 341 Midterm Exam Time allowed: 90 minutes Total Points: 75 Points Scored: Name: Problem No. 1 (11 points) For parts (a) through (d), indicate whether the statement is TRUE or FALSE. For parts (e) and

More information

CPS 104 Computer Organization and Programming

CPS 104 Computer Organization and Programming CPS 104 Computer Organization and Programming Lecture 9: Integer Arithmetic. Robert Wagner CPS104 IMD.1 RW Fall 2000 Overview of Today s Lecture: Integer Multiplication and Division. Read Appendix B CPS104

More information

Binary Adders: Half Adders and Full Adders

Binary Adders: Half Adders and Full Adders Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order

More information

Combinational Circuits

Combinational Circuits Combinational Circuits Combinational circuit consists of an interconnection of logic gates They react to their inputs and produce their outputs by transforming binary information n input binary variables

More information

Tailoring the 32-Bit ALU to MIPS

Tailoring the 32-Bit ALU to MIPS Tailoring the 32-Bit ALU to MIPS MIPS ALU extensions Overflow detection: Carry into MSB XOR Carry out of MSB Branch instructions Shift instructions Slt instruction Immediate instructions ALU performance

More information

Arithmetic Circuits. Design of Digital Circuits 2014 Srdjan Capkun Frank K. Gürkaynak.

Arithmetic Circuits. Design of Digital Circuits 2014 Srdjan Capkun Frank K. Gürkaynak. Arithmetic Circuits Design of Digital Circuits 2014 Srdjan Capkun Frank K. Gürkaynak http://www.syssec.ethz.ch/education/digitaltechnik_14 Adapted from Digital Design and Computer Architecture, David Money

More information

Partial product generation. Multiplication. TSTE18 Digital Arithmetic. Seminar 4. Multiplication. yj2 j = xi2 i M

Partial product generation. Multiplication. TSTE18 Digital Arithmetic. Seminar 4. Multiplication. yj2 j = xi2 i M TSTE8 igital Arithmetic Seminar 4 Oscar Gustafsson Multiplication Multiplication can typically be separated into three sub-problems Generating partial products Adding the partial products using a redundant

More information

Learning Outcomes. Spiral 2-2. Digital System Design DATAPATH COMPONENTS

Learning Outcomes. Spiral 2-2. Digital System Design DATAPATH COMPONENTS 2-2. 2-2.2 Learning Outcomes piral 2-2 Arithmetic Components and Their Efficient Implementations I understand the control inputs to counters I can design logic to control the inputs of counters to create

More information

EE878 Special Topics in VLSI. Computer Arithmetic for Digital Signal Processing

EE878 Special Topics in VLSI. Computer Arithmetic for Digital Signal Processing EE878 Special Topics in VLSI Computer Arithmetic for Digital Signal Processing Part 6b High-Speed Multiplication - II Spring 2017 Koren Part.6b.1 Accumulating the Partial Products After generating partial

More information

ECE331: Hardware Organization and Design

ECE331: Hardware Organization and Design ECE331: Hardware Organization and Design Lecture 9: Binary Addition & Multiplication Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Pop Quiz! Using 4 bits signed integer notation:

More information

MIPS Integer ALU Requirements

MIPS Integer ALU Requirements MIPS Integer ALU Requirements Add, AddU, Sub, SubU, AddI, AddIU: 2 s complement adder/sub with overflow detection. And, Or, Andi, Ori, Xor, Xori, Nor: Logical AND, logical OR, XOR, nor. SLTI, SLTIU (set

More information

Binary Arithmetic Intro to Assembly Language CS 64: Computer Organization and Design Logic Lecture #3

Binary Arithmetic Intro to Assembly Language CS 64: Computer Organization and Design Logic Lecture #3 Binary Arithmetic Intro to Assembly Language CS 64: Computer Organization and Design Logic Lecture #3 Ziad Matni Dept. of Computer Science, UCSB Adding this Class The class is full I will not be adding

More information

Module 2: Computer Arithmetic

Module 2: Computer Arithmetic Module 2: Computer Arithmetic 1 B O O K : C O M P U T E R O R G A N I Z A T I O N A N D D E S I G N, 3 E D, D A V I D L. P A T T E R S O N A N D J O H N L. H A N N E S S Y, M O R G A N K A U F M A N N

More information

Chapter 3 Arithmetic for Computers. ELEC 5200/ From P-H slides

Chapter 3 Arithmetic for Computers. ELEC 5200/ From P-H slides Chapter 3 Arithmetic for Computers 1 Arithmetic for Computers Operations on integers Addition and subtraction Multiplication and division Dealing with overflow Floating-point real numbers Representation

More information

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

Semester Transition Point. EE 109 Unit 11 Binary Arithmetic. Binary Arithmetic ARITHMETIC 1 2 Semester Transition Point EE 109 Unit 11 Binary Arithmetic At this point we are going to start to transition in our class to look more at the hardware organization and the low-level software that is

More information

Integers. N = sum (b i * 2 i ) where b i = 0 or 1. This is called unsigned binary representation. i = 31. i = 0

Integers. N = sum (b i * 2 i ) where b i = 0 or 1. This is called unsigned binary representation. i = 31. i = 0 Integers So far, we've seen how to convert numbers between bases. How do we represent particular kinds of data in a certain (32-bit) architecture? We will consider integers floating point characters What

More information

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds. ECE-78: Digital Logic Design Fall 6 UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers

More information

Addition and multiplication

Addition and multiplication Addition and multiplication Arithmetic is the most basic thing you can do with a computer, but it s not as easy as you might expect! These next few lectures focus on addition, subtraction, multiplication

More information

Basic Arithmetic and the ALU. Basic Arithmetic and the ALU. Background. Background. Integer multiplication, division

Basic Arithmetic and the ALU. Basic Arithmetic and the ALU. Background. Background. Integer multiplication, division Basic Arithmetic and the ALU Forecast Representing numbs, 2 s Complement, unsigned ition and subtraction /Sub ALU full add, ripple carry, subtraction, togeth Carry-Lookahead addition, etc. Logical opations

More information

Binary Addition. Add the binary numbers and and show the equivalent decimal addition.

Binary Addition. Add the binary numbers and and show the equivalent decimal addition. Binary Addition The rules for binary addition are 0 + 0 = 0 Sum = 0, carry = 0 0 + 1 = 0 Sum = 1, carry = 0 1 + 0 = 0 Sum = 1, carry = 0 1 + 1 = 10 Sum = 0, carry = 1 When an input carry = 1 due to a previous

More information

World Inside a Computer is Binary

World Inside a Computer is Binary C Programming 1 Representation of int data World Inside a Computer is Binary C Programming 2 Decimal Number System Basic symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Radix-10 positional number system. The radix

More information

Area Efficient, Low Power Array Multiplier for Signed and Unsigned Number. Chapter 3

Area Efficient, Low Power Array Multiplier for Signed and Unsigned Number. Chapter 3 Area Efficient, Low Power Array Multiplier for Signed and Unsigned Number Chapter 3 Area Efficient, Low Power Array Multiplier for Signed and Unsigned Number Chapter 3 3.1 Introduction The various sections

More information

Topics. 6.1 Number Systems and Radix Conversion 6.2 Fixed-Point Arithmetic 6.3 Seminumeric Aspects of ALU Design 6.4 Floating-Point Arithmetic

Topics. 6.1 Number Systems and Radix Conversion 6.2 Fixed-Point Arithmetic 6.3 Seminumeric Aspects of ALU Design 6.4 Floating-Point Arithmetic 6-1 Chapter 6 Computer Arithmetic and the Arithmetic Unit Chapter 6: Computer Arithmetic and the Arithmetic Unit Topics 6.1 Number Systems and Radix Conversion 6.2 Fixed-Point Arithmetic 6.3 Seminumeric

More information

Combinational Circuit Design

Combinational Circuit Design Modeling Combinational Circuits with Verilog Prof. Chien-Nan Liu TEL: 3-42275 ext:34534 Email: jimmy@ee.ncu.edu.tw 3- Combinational Circuit Design Outputs are functions of inputs inputs Combinational Circuit

More information

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute DIGITAL TECHNIC Dr. Bálint Pődör Óbuda University, Microelectronics and Technology Institute 4. LECTURE: COMBINATIONAL LOGIC DEIGN: ARITHMETIC (THROUGH EXAMPLE) 2nd (Autumn) term 28/29 COMBINATIONAL LOGIC

More information

ECE468 Computer Organization & Architecture. The Design Process & ALU Design

ECE468 Computer Organization & Architecture. The Design Process & ALU Design ECE6 Computer Organization & Architecture The Design Process & Design The Design Process "To Design Is To Represent" Design activity yields description/representation of an object -- Traditional craftsman

More information

Integer Multiplication and Division

Integer Multiplication and Division Integer Multiplication and Division for ENCM 369: Computer Organization Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 208 Integer

More information

NUMBER OPERATIONS. Mahdi Nazm Bojnordi. CS/ECE 3810: Computer Organization. Assistant Professor School of Computing University of Utah

NUMBER OPERATIONS. Mahdi Nazm Bojnordi. CS/ECE 3810: Computer Organization. Assistant Professor School of Computing University of Utah NUMBER OPERATIONS Mahdi Nazm Bojnordi Assistant Professor School of Computing University of Utah CS/ECE 3810: Computer Organization Overview Homework 4 is due tonight Verify your uploaded file before the

More information

CAD4 The ALU Fall 2009 Assignment. Description

CAD4 The ALU Fall 2009 Assignment. Description CAD4 The ALU Fall 2009 Assignment To design a 16-bit ALU which will be used in the datapath of the microprocessor. This ALU must support two s complement arithmetic and the instructions in the baseline

More information

Basic Arithmetic (adding and subtracting)

Basic Arithmetic (adding and subtracting) Basic Arithmetic (adding and subtracting) Digital logic to show add/subtract Boolean algebra abstraction of physical, analog circuit behavior 1 0 CPU components ALU logic circuits logic gates transistors

More information

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS 2-2. 2-2.2 Learning Outcomes piral 2 2 Arithmetic Components and Their Efficient Implementations I know how to combine overflow and subtraction results to determine comparison results of both signed and

More information

Computer Arithmetic Multiplication & Shift Chapter 3.4 EEC170 FQ 2005

Computer Arithmetic Multiplication & Shift Chapter 3.4 EEC170 FQ 2005 Computer Arithmetic Multiplication & Shift Chapter 3.4 EEC170 FQ 200 Multiply We will start with unsigned multiply and contrast how humans and computers multiply Layout 8-bit 8 Pipelined Multiplier 1 2

More information

Lecture 8: Addition, Multiplication & Division

Lecture 8: Addition, Multiplication & Division Lecture 8: Addition, Multiplication & Division Today s topics: Signed/Unsigned Addition Multiplication Division 1 Signed / Unsigned The hardware recognizes two formats: unsigned (corresponding to the C

More information

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate

More information

Chapter 4 Arithmetic Functions

Chapter 4 Arithmetic Functions Logic and Computer Design Fundamentals Chapter 4 Arithmetic Functions Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Overview Iterative combinational

More information

EECS 366: Computer Architecure. Memory Technology. Lecture Notes # 15. University of Illinois at Chicago. Instructor: Shantanu Dutt Department of EECS

EECS 366: Computer Architecure. Memory Technology. Lecture Notes # 15. University of Illinois at Chicago. Instructor: Shantanu Dutt Department of EECS EECS 366: Computer Architecure Instructor: Shantanu Dutt Department of EECS University of Illinois at Chicago Lecture Notes # 15 Memory Technology c Shantanu Dutt MEMORY ORGANIZATION Physical Characteristics

More information

A complement number system is used to represent positive and negative integers. A complement number system is based on a fixed length representation

A complement number system is used to represent positive and negative integers. A complement number system is based on a fixed length representation Complement Number Systems A complement number system is used to represent positive and negative integers A complement number system is based on a fixed length representation of numbers Pretend that integers

More information

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds. UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers of ): DIGIT 3 4 5 6 7 8 9 Number:

More information

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer Arithmetic ECE 666 Part 6b High-Speed Multiplication - II Israel Koren ECE666/Koren Part.6b.1 Accumulating the Partial

More information

Lecture 3: Binary Subtraction, Switching Algebra, Gates, and Algebraic Expressions

Lecture 3: Binary Subtraction, Switching Algebra, Gates, and Algebraic Expressions EE210: Switching Systems Lecture 3: Binary Subtraction, Switching Algebra, Gates, and Algebraic Expressions Prof. YingLi Tian Feb. 5/7, 2019 Department of Electrical Engineering The City College of New

More information

Array Multipliers. Figure 6.9 The partial products generated in a 5 x 5 multiplication. Sec. 6.5

Array Multipliers. Figure 6.9 The partial products generated in a 5 x 5 multiplication. Sec. 6.5 Sec. 6.5 Array Multipliers I'r) 1'8 P7 p6 PS f'4 1'3 1'2 1' 1 "0 Figure 6.9 The partial products generated in a 5 x 5 multiplication. called itemrive arrc.ly multipliers or simply cirruy m~illil>liers.

More information

Number System. Introduction. Decimal Numbers

Number System. Introduction. Decimal Numbers Number System Introduction Number systems provide the basis for all operations in information processing systems. In a number system the information is divided into a group of symbols; for example, 26

More information