08 - Lecture 08

# 08 - Lecture 08 - 04/01/2011 Computer Organization and...

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

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: ersun.iscioglu@emu.edu.tr MULTIPLICATION AND DIVISION Integer Arithmetic -2-

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

View Full Document
2 Integer Arithmetic: Multiplication b Multiplication is a complex process. b A wide variety of algorithms have been used in various computers. b There are Multiplying two unsigned (nonnegative) integers . Multiplying numbers in twos complement representation . -3- Integer Arithmetic: Multiplication: Unsigned Integers b Multiplication of unsigned binary integers , as might be carried out using paper and pencil: -4-
3 Integer Arithmetic: Multiplication: Unsigned Integers. .. b 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)

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

View Full Document
4 Integer Arithmetic: Multiplication: Unsigned Integers. .. -7- Flow chart of operation of multiplication of unsigned integers: Integer Arithmetic: Twos Complement Multiplication Simple solution h Convert both multiplier and multiplicand to positive numbers . h Perform multiplication . h Take twos complement of result if and only if signs of original numbers were different . h 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-
5 Integer Arithmetic: Division b Division is more complex than multiplication. b 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. .. Cont.: Result is referred to as a partial remainder. Additional bits from dividend are appended to partial remainder until result is greater than or equal to divisor.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 08/12/2011 for the course ITEC 255 taught by Professor Ersuniscioglu during the Spring '11 term at Eastern Mediterranean University.

### Page1 / 27

08 - Lecture 08 - 04/01/2011 Computer Organization and...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online