{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

08 - Lecture 08 - Computer Organization and Architecture...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
04/01/2011 1 Computer Organization and Architecture COMPUTER ARITHMETIC -3- Dr. Ersun İşçioğlu Eastern Mediterranean University, School of Computing and Technology, Department of IT e-mail: [email protected] MULTIPLICATION AND DIVISION Integer Arithmetic -2-
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
04/01/2011 2 Integer Arithmetic: Multiplication boxshadowdwn Multiplication is a complex process. boxshadowdwn A wide variety of algorithms have been used in various computers. boxshadowdwn There are Multiplying two unsigned (nonnegative) integers . Multiplying numbers in twos complement representation . -3- Integer Arithmetic: Multiplication: Unsigned Integers boxshadowdwn Multiplication of unsigned binary integers , as might be carried out using paper and pencil: -4-
Image of page 2
04/01/2011 3 Integer Arithmetic: Multiplication: Unsigned Integers... boxshadowdwn Hardware implementation of unsigned binary multiplication has repeated additions. -5- Multiplier and multiplicand are loaded into two registers ( Q and M ). Third register ( A ) is initially set to zero. There is a 1-bit C register, initialised to 0, which holds a potential carry bit. Control logic reads bits of multiplier one at a time. Example: 11 (1011) × 13 (1101) = 143 (10001111) Integer Arithmetic: Multiplication: Unsigned Integers... -6- If Q 0 is 1, multiplicand is added to A and result is stored in A, with C bit used for overflow. Then all bits of C, A and Q registers are shifted to right one bit, so that C bit goes into A n -1 , A 0 goes into Q n -1 and Q 0 is lost. If Q 0 is 0, then no addition is performed, just shift. Process is repeated for each bit of original multiplier Resulting 2 n -bit product is contained in A and Q. Example: 11 (1011) × 13 (1101) = 143 (10001111)
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
04/01/2011 4 Integer Arithmetic: Multiplication: Unsigned Integers... -7- Flow chart of operation of multiplication of unsigned integers: Integer Arithmetic: Twos Complement Multiplication Simple solution head2right Convert both multiplier and multiplicand to positive numbers . head2right Perform multiplication . head2right Take twos complement of result if and only if signs of original numbers were different . head2right Implementers have preferred to use techniques that do not require this final transformation step. One of most common of these is Booth’s algorithm . -8-
Image of page 4
04/01/2011 5 Integer Arithmetic: Division boxshadowdwn Division is more complex than multiplication. boxshadowdwn Long division of unsigned binary numbers is carried as: First bits of dividend are examined from left to right, until set of bits examined represents a number greater than or equal to divisor; this is referred to as divisor being able to divide number. Until this even occurs, 0s are placed in quotient from left to right. When event occurs, a 1 is placed in quotient and divisor is subtracted from partial dividend. -9- Integer Arithmetic: Division...
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern