1 Dividers Lecture 10. Required Reading Chapter 13, Basic Division Schemes 13.1, Shift/Subtract Division Algorithms 13.3, Restoring Hardware Dividers.

Slides:



Advertisements
Similar presentations
Public Key Infrastructure and Applications
Advertisements

CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
ECE 645 – Computer Arithmetic Lecture 11: Advanced Topics and Final Review ECE 645—Computer Arithmetic 4/22/08.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (4) Information Security.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 8 - Multiplication.
Multiplication Schemes Continued
Integer division Pencil and paper binary division (dividend)(divisor) 1000.
Lecture Objectives: 1)Perform binary division of two numbers. 2)Define dividend, divisor, quotient, and remainder. 3)Explain how division is accomplished.
Kris Gaj Office hours: Monday, 3:00-4:00 PM, Wednesday, 3:00-4:00 PM, 7:30-8:30 PM and by appointment Research and teaching interests: cryptography computer.
UNIVERSITY OF MASSACHUSETTS Dept
Design of a Reconfigurable Hardware For Efficient Implementation of Secret Key and Public Key Cryptography.
Chapter 6 Arithmetic. Addition Carry in Carry out
Computer Organization Multiplication and Division Feb 2005 Reading: Portions of these slides are derived from: Textbook figures © 1998 Morgan Kaufmann.
May 2007Computer Arithmetic, DivisionSlide 1 Part IV Division.
UNIVERSITY OF MASSACHUSETTS Dept
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
COE 308: Computer Architecture (T041) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 7.
Computer Arithmetic Integers: signed / unsigned (can overflow) Fixed point (can overflow) Floating point (can overflow, underflow) (Boolean / Character)
Ch. 21. Square-rootingSlide 1 VI Function Evaluation Topics in This Part Chapter 21 Square-Rooting Methods Chapter 22 The CORDIC Algorithms Chapter 23.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
ASYMMETRIC CIPHERS.
ECE 645 – Computer Arithmetic Lecture 10: Fast Dividers ECE 645—Computer Arithmetic 4/15/08.
Lecture 10 Fast Dividers.
ECE 645 – Computer Arithmetic Lecture 9: Basic Dividers ECE 645—Computer Arithmetic 4/1/08.
Kris Gaj Office hours: Monday, 6:00-7:00 PM, Tuesday 7:30-8:30 PM, Thursday, 4:30-5:30 PM, and by appointment Research and teaching interests: cryptography.
Computer Arithmetic. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than.
Introduction to Stream Cipher Sayed Mahdi Mohammad Hasanzadeh Spring 2004.
Kris Gaj Office hours: Monday, 3:00-4:00 PM, Monday, 6:30-7:30 PM, Wednesday, 3:00-4:00 PM, and by appointment Research and teaching interests: cryptography.
Oct. 18, 2007SYSC 2001* - Fall SYSC2001-Ch9.ppt1 See Stallings Chapter 9 Computer Arithmetic.
Follow-up Courses. ECE Department MS in Electrical Engineering MS EE MS in Computer Engineering MS CpE COMMUNICATIONS & NETWORKING SIGNAL PROCESSING CONTROL.
LOGO Hardware side of Cryptography Anestis Bechtsoudis Patra 2010.
Sequential Multipliers Lecture 9. Required Reading Chapter 9, Basic Multiplication Scheme Chapter 10, High-Radix Multipliers Chapter 12.3, Bit-Serial.
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.
July 2005Computer Architecture, The Arithmetic/Logic UnitSlide 1 Part III The Arithmetic/Logic Unit.
Kris Gaj Office hours: Monday, 7:30-8:30 PM Thursday, 7:30-8:30 PM Research and teaching interests: cryptography computer arithmetic VLSI design and testing.
Division Harder Than Multiplication Because Quotient Digit Selection/Estimation Can Have Overflow Condition – Divide by Small Number OR even Worse – Divide.
Kris Gaj Office hours: Monday, 7:30-8:30 PM, Tuesday & Thursday 4:30-5:30 PM, and by appointment Research and teaching interests: cryptography computer.
1 Basic Dividers Lecture 10. Required Reading Chapter 13, Basic Division Schemes 13.1, Shift/Subtract Division Algorithms 13.3, Restoring Hardware Dividers.
ECE 545 Digital System Design with VHDL
Computer Architecture Lecture 32 Fasih ur Rehman.
Computer Arithmetic See Stallings Chapter 9 Sep 10, 2009
Advanced Dividers Lecture 10. Required Reading Chapter 13, Basic Division Schemes 13.4, Non-Restoring and Signed Division Chapter 15 Variation in Dividers.
Basic Dividers Lecture 10. Required Reading Chapter 13, Basic Division Schemes 13.1, Shift/Subtract Division Algorithms 13.3, Restoring Hardware Dividers.
INFORMATION SECURITY MANAGEMENT P ROTECTION M ECHANISMS - C RYPTOGRAPHY.
COE 308: Computer Architecture (T032) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
George Mason University Follow-up Courses. ECE Department MS in Electrical Engineering MS EE MS in Computer Engineering MS CpE COMMUNICATIONS & NETWORKING.
Course web page: ECE 646 Cryptography and Computer Network Security ECE web page  Courses  Course web pages  ECE 646.
Lecture 11 Advanced Dividers.
Copyright 2008 Koren ECE666/Koren Part.7b.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer.
1 Basic Dividers Lecture 9. Required Reading Chapter 13, Basic Division Schemes 13.1, Shift/Subtract Division Algorithms 13.3, Restoring Hardware Dividers.
Electronic Mail Security Prepared by Dr. Lamiaa Elshenawy
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 7 Division.
Ch. 4 Computer Arithmetic
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.
Course web page: ECE 545 Introduction to VHDL ECE web page  Courses  Course web pages  ECE 545.
1. Copyright  2005 by Oxford University Press, Inc. Computer Architecture Parhami2 Figure 11.1 Multiplication of 4-bit numbers in dot notation.
More Binary Arithmetic - Multiplication
Sequential Multipliers
UNIVERSITY OF MASSACHUSETTS Dept
Morgan Kaufmann Publishers
Lecture 9 Basic Dividers.
Radix 2 Sequential Multipliers
Efficient CRT-Based RSA Cryptosystems
ECEG-3202 Computer Architecture and Organization
12/7/
UNIVERSITY OF MASSACHUSETTS Dept
Lecture 9 Basic Dividers.
Presentation transcript:

1 Dividers Lecture 10

Required Reading Chapter 13, Basic Division Schemes 13.1, Shift/Subtract Division Algorithms 13.3, Restoring Hardware Dividers 13.4, Non-Restoring and Signed Division Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design

Notation and Basic Equations

4 Notation z Dividend z 2k-1 z 2k-2... z 2 z 1 z 0 d Divisor d k-1 d k-2... d 1 d 0 q Quotient q k-1 q k-2... q 1 q 0 s Remainder s k-1 s k-2... s 1 s 0 (s = z - dq)

5 Basic Equations of Division z = d q + s sign(s) = sign(z) | s | < | d | z > 0 0  s < | d | z < 0 - | d | < s  0

6 Unsigned Integer Division Overflow z = z H 2 k + z L < d 2 k Condition for no overflow (i.e. q fits in k bits): z = q d + s < (2 k -1) d + d = d 2 k z H < d Must check overflow because obviously the quotient q can also be 2k bits. For example, if the divisor d is 1, then the quotient q is the dividend z, which is 2k bits

7 Sequential Integer Division Basic Equations s (0) = z s (j) = 2 s (j-1) - q k-j (2 k d) for j=1..k s (k) = 2 k s

8 Sequential Integer Division Justification s (1) = 2 z - q k-1 (2 k d) s (2) = 2(2 z - q k-1 (2 k d)) - q k-2 (2 k d) s (3) = 2(2(2 z - q k-1 (2 k d)) - q k-2 (2 k d)) - q k-3 (2 k d)... s (k) = 2(... 2(2(2 z - q k-1 (2 k d)) - q k-2 (2 k d)) - q k-3 (2 k d)... - q 0 (2 k d) = = 2 k z - (2 k d) (q k-1 2 k-1 + q k-2 2 k-2 + q k-3 2 k-3 + … + q ) = = 2 k z - (2 k d) q = 2 k (z - d q) = 2 k s

9 Fig Examples of sequential division with integer and fractional operands.

Fractional Division

11 Unsigned Fractional Division z frac Dividend.z -1 z z -(2k-1) z -2k d frac Divisor.d -1 d d -(k-1) d -k q frac Quotient.q -1 q q -(k-1) q -k s frac Remainder.000…0s -(k+1)... s -(2k-1) s -2k k bits

12 Integer vs. Fractional Division For Integers: z = q d + s  2 -2k z 2 -2k = (q 2 -k ) (d 2 -k ) + s (2 -2k ) z frac = q frac d frac + s frac For Fractions: where z frac = z 2 -2k d frac = d 2 -k q frac = q 2 -k s frac = s 2 -2k

13 Unsigned Fractional Division Overflow Condition for no overflow: z frac < d frac

14 Sequential Fractional Division Basic Equations s (0) = z frac s (j) = 2 s (j-1) - q -j d frac for j=1..k 2 k · s frac = s (k) s frac = 2 -k · s (k)

15 Sequential Fractional Division Justification s (1) = 2 z frac - q -1 d frac s (2) = 2(2 z frac - q -1 d frac ) - q -2 d frac s (3) = 2(2(2 z frac - q -1 d frac ) - q -2 d frac ) - q -3 d frac... s (k) = 2(... 2(2(2 z frac - q -1 d frac ) - q -2 d frac ) - q -3 d frac... - q -k d frac = = 2 k z frac - d frac (q -1 2 k-1 + q -2 2 k-2 + q -3 2 k-3 + … + q -k 2 0 ) = = 2 k z frac - d frac 2 k (q q q … + q -k 2 -k ) = = 2 k z frac - (2 k d frac ) q frac = 2 k (z frac - d frac q frac ) = 2 k s frac

Restoring Unsigned Integer Division

17 Restoring Unsigned Integer Division s (0) = z for j = 1 to k if 2 s (j-1) - 2 k d > 0 q k-j = 1 s (j) = 2 s (j-1) - 2 k d else q k-j = 0 s (j) = 2 s (j-1)

18 Fig Example of restoring unsigned division.

19 Fig Shift/subtract sequential restoring divider.

Signed Integer Division

21 Signed Integer Division z d | z || d |sign(z)sign(d) | q || s | sign(s) = sign(z) sign(q) = + - Unsigned division sign(z) = sign(d) sign(z)  sign(d) qs

22 Examples of division with signed operands z = 5d = 3  q = 1s = 2 z = 5d = –3  q = –1s = 2 z = –5d = 3  q = –1s = –2 z = –5d = –3  q = 1s = –2 Magnitudes of q and s are unaffected by input signs Signs of q and s are derivable from signs of z and d Examples of Signed Integer Division

Fast Review of Fast Dividers

24 Classification of Dividers Sequential Radix-2High-radix Restoring Non-restoring regular SRT regular using carry save adders SRT using carry save adders Array Dividers by Convergence

25 Array Dividers

26 Fig Restoring array divider composed of controlled subtractor cells.

27 Sequential Dividers with Carry-Save Adders

28 Fig Block diagram of a radix-2 divider with partial remainder in stored-carry form.

29 Pentium bug (1) October 1994 Thomas Nicely, Lynchburg Collage, Virginia finds an error in his computer calculations, and traces it back to the Pentium processor Tim Coe, Vitesse Semiconductor presents an example with the worst-case error c = / Pentium = Correct result = November 7, 1994 Late 1994 First press announcement, Electronic Engineering Times

30 Pentium bug (2) Intel admits “subtle flaw” Intel’s white paper about the bug and its possible consequences Intel - average spreadsheet user affected once in 27,000 years IBM - average spreadsheet user affected once every 24 days Replacements based on customer needs Announcement of no-question-asked replacements November 30, 1994 December 20, 1994

31 Pentium bug (3) Error traced back to the look-up table used by the radix-4 SRT division algorithm 2048 cells, 1066 non-zero values {-2, -1, 1, 2} 5 non-zero values not downloaded correctly to the lookup table due to an error in the C script

32

33 Multiply/Divide Unit

34 The control unit proceeds through necessary steps for multiplication or division (including using the appropriate shift direction) Fig Sequential radix-2 multiply/divide unit. The slight speed penalty owing to a more complex control unit is insignificant Multiply-Divide Unit

DIGITAL SYSTEMS DESIGN Concentration advisors: Kris Gaj 1.ECE 545 Digital System Design with VHDL (Fall semesters) – K. Gaj, project, FPGA design with VHDL, Aldec/Synplicity/Xilinx/Altera 2. ECE 645 Computer Arithmetic (Spring semesters) – K. Gaj, project, FPGA design with VHDL or Verilog, Aldec/Synplicity/Xilinx/Altera 3. ECE 586 Digital Integrated Circuits (Spring semesters) – D. Ioannou 4. ECE 681 VLSI Design for ASICs (Fall semesters) – TBD, project/lab, front-end and back-end ASIC design with Synopsys tools 5. ECE 682 VLSI Test Concepts (Spring semesters) – T. Storey, homework

Follow-up courses Computer Arithmetic ECE 645 ECE 746 Advanced Applied Cryptography (Spring 2013) ECE 646 Cryptography and Computer Network Security (Fall 2012) ECE 899 Cryptographic Engineering (Spring 2012/Spring 2014)

Cryptography and Computer Network Security Advanced Applied Cryptography AES Stream ciphers Elliptic curve cryptosystems Random number generators Smart cards Attacks against implementations (timing, power, fault analysis) Efficient and secure implementations of cryptography Security in various kinds of networks (IPSec, wireless) Zero-knowledge identification schemes Historical ciphers Classical encryption (DES, Triple DES, RC5, IDEA) Modes of operation of block ciphers Public key encryption (RSA) Hash functions and MACs Digital signatures Public key certificates PGP Secure Internet Protocols Cryptographic standards Modular integer arithmetic Operations in the Galois Fields GF(2 n )