Instructor: Alexander Stoytchev CprE 281: Digital Logic.

Slides:



Advertisements
Similar presentations
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Advertisements

CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (2)
Figure5.2 Half-adder.
Floating Point Numbers
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Computer Arithmetic Nizamettin AYDIN
Computer Arithmetic.
S. Rawat I.I.T. Kanpur. Floating-point representation IEEE numbers are stored using a kind of scientific notation. ± mantissa * 2 exponent We can represent.
Figure 5.1. Conversion from decimal to binary.. Table 5.1. Numbers in different systems.
Figure 5.1. Conversion from decimal to binary.. Table 5.1. Numbers in different systems.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
Oct. 18, 2007SYSC 2001* - Fall SYSC2001-Ch9.ppt1 See Stallings Chapter 9 Computer Arithmetic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 185: Intro to Problem Solving (using C)
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
Computer Arithmetic See Stallings Chapter 9 Sep 10, 2009
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
CS/EE 3700 : Fundamentals of Digital System Design Chris J. Myers Lecture 5: Arithmetic Circuits Chapter 5 (minus 5.3.4)
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Number Representation and Arithmetic Circuits
Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct NYU.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Chapter 9 Computer Arithmetic
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Floating Point Number system corresponding to the decimal notation
William Stallings Computer Organization and Architecture 7th Edition
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
BCD = Binary Coded Decimal
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
ECEG-3202 Computer Architecture and Organization
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Chapter 5 – Number Representation and Arithmetic Circuits
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Lecture 9: Shift, Mult, Div Fixed & Floating Point
Presentation transcript:

Instructor: Alexander Stoytchev CprE 281: Digital Logic

Multiplication CprE 281: Digital Logic Iowa State University, Ames, IA Copyright © Alexander Stoytchev

Administrative Stuff HW 6 is out It is due next Monday (Oct 14) Wednesday (Oct 16)

Quick Review

The story with floats is more complicated IEEE Standard [

In the example shown above, the sign is zero so s is +1, the exponent is 124 so e is −3, and the significand m is 1.01 (in binary, which is 1.25 in decimal). The represented number is therefore × 2 −3, which is [

Figure IEEE Standard floating-point formats. Sign 32 bits 23 bits of mantissa excess-127 exponent 8-bit 52 bits of mantissa11-bit excess-1023 exponent 64 bits Sign SM SM (a) Single precision (b) Double precision E + E 0 denotes – 1 denotes

On-line IEEE 754 Converters

Decimal Multiplication What happens when we multiply a number by 10? 4 x 10 = ? 542 x 10 = ? 1245 x 10 = ?

Decimal Division What happens when we divide a number by 10? 14 / 10 = ? 540 / 10 = ? 1240 x 10 = ?

Decimal Division What happens when we divide a number by 10? 14 / 10 = ? 540 / 10 = ? 1240 x 10 = ?

Binary Multiplication by 2 What happens when we multiply a number by 2? 011 times 2 = ? 101 times 2 = ? times 2 = ?

Binary Multiplication by 2 What happens when we multiply a number by 2? 011 times 2 = times 2 = times 2 = You simply add a zero as the rightmost number

Binary Multiplication by 4 What happens when we multiply a number by 4? 011 times 4 = ? 101 times 4 = ? times 4 = ?

Binary Multiplication by 4 What happens when we multiply a number by 4? 011 times 4 = times 4 = times 4 = add two zeros in the last two bits and shift everything else to the left

Binary Multiplication by 2 N What happens when we multiply a number by 2 N ? 011 times 2 N = 01100…0 // add N zeros 101 times 4 = 10100…0 // add N zeros times 4 = …0 // add N zeros

Binary Division by 2 What happens when we divide a number by 2? 0110 divided 2 = ? 101 times 2 = ? times 2 = ?

Decimal Multiplication By Hand [

Binary Multiplication By Hand [Figure 3.34a from the textbook]

Binary Multiplication By Hand [Figure 3.34b from the textbook]

Binary Multiplication By Hand [Figure 3.34c from the textbook]

Figure Multiplication of unsigned numbers.

Figure A 4x4 multiplier circuit.

Positive Multiplicand Example Multiplicand M Multiplier Q Product P (+14) (+11) (+154) Partial product 0 Partial product 1 Partial product 2 Partial product 3 x [Figure 3.36a in the textbook]

Negative Multiplicand Example  Multiplicand M Multiplier Q Product P ( 14) (+11) ( 154) Partial product 0 Partial product 1 Partial product 2 Partial product 3 – – [Figure 3.36b in the textbook]

Binary Coded Decimal

Table 3.3. Binary-coded decimal digits.

Figure Addition of BCD digits.

Figure Block diagram for a one-digit BCD adder.

modulebcdadd(Cin,X,Y,S, Cout); inputCin; input[3:0] X,Y; outputreg [3:0] S; outputreg Cout; reg[4:0] Z; (X,Y,Cin) begin Z=X+Y+Cin; if(Z<10) {Cout,S}=Z; else {Cout,S}=Z+6; end endmodule Figure Verilog code for a one-digit BCD adder.

Figure Circuit for a one-digit BCD adder.

Questions?

THE END