COMPUTER ARITHMETIC
• Addition and Subtraction
• Two’s Compliment Representation
• Signed Addition and Subtraction
• Multiplication and division
• Division Operation
• Data is manipulated by using the arithmetic instructions in
digital computers.
• Data is manipulated to produce results necessary to give solution for
the computation problems.
• The Addition, subtraction, multiplication and division are the four
basic arithmetic operations.
• Inside a computer system, all operations are carried out on fixed-
length binary values
• The unsigned (binary number system) and signed (2’s complement)
representations have the advantage that addition and subtraction
operations have simple
• and that the same algorithm can be used for both representations.
ADDITION AND
SUBTRACTION
General concept
• Decimal addition
(carry) 1_
19
+ 7
26
• Binary addition
( carry) 111_
10011
+ 111
11010
• 16+8+2 = 26
• Signed Binary Numbers
• Signed Binary Numbers use the
MSB as a sign bit to display a
range of either positive numbers
or negative numbers
• In mathematics, positive numbers (including zero) are represented as
unsigned numbers. That is we do not put the +ve sign in front of them
to show that they are positive numbers.
• However, when dealing with negative numbers we do use a -ve sign in
front of the number to show that the number is negative in value and
different from a positive unsigned value, and the same is true
with signed binary numbers.
• However, in digital circuits there is no provision made to put a plus or
even a minus sign to a number,
• since digital systems operate with binary numbers that are
represented in terms of “0’s” and “1’s”.
• When used together in microelectronics, these “1’s” and “0’s”, called
a bit (being a contraction of BInary digiT), fall into several range sizes
of numbers which are referred to by common names, such as
a byte or a word.
• Mathematical numbers are generally made up of a sign and a value
(magnitude) in which the sign indicates whether the number is
positive, ( + ) or negative, ( – ) with the value indicating the size of the
number,
• for example 23, +156 or -274. Presenting numbers is this fashion is
called “sign-magnitude” representation since the left most digit can
be used to indicate the sign and the remaining digits the magnitude
or value of the number.
• But how do we represent signed binary numbers if all we have is just
one’s and zero’s.
• We know that binary digits, or bits only have two values, either a “1”
or a “0” and conveniently for us, a sign also has only two values, being
a “+” or a “–“.
signed binary numbers
• For signed binary numbers the most significant bit (MSB) is used as
the sign bit.
• If the sign bit is “0”, this means the number is positive in value.
• If the sign bit is “1”, then the number is negative in value.
• The remaining bits in the number are used to represent the
magnitude of the binary number in the usual unsigned binary number
format way.
signed binary numbers
• Then we can see that the Sign-and-Magnitude (SM) notation stores
positive and negative values by dividing the “n” total bits into two
parts:
• 1 bit for the sign and n–1 bits for the value which is a pure binary
number.
Positive Signed Binary Numbers
Negative Signed Binary Numbers
Signed and unsigned additions
• Unsigned addition in 4-
bit arithmetic
( carry) 11_
1011
+ 0011
1110
• 11 + 3 = 14
(8 + 4 + 2)
• Signed addition in
4-bit arithmetic
( carry) 11_
1011
+ 0011
1110
• -5 + 3 = -2
• 1 0
• 0+0=0
• 1+0=1
• 1+1=0 carry =1
• 01+01=10
• 1+1+1=11
• 10+1=11
• 0-0=0
• 1-0=1
• 0-1=-1
• 1-1=0
• 10-11
Signed and unsigned additions
• Same rules apply even though bit strings represent different values
• Sole difference is overflow handling
One’s Complement of a Signed Binary Number
• One’s Complement or 1’s Complement is another method which we
can use to represent negative binary numbers in a signed binary
number system.
• In one’s complement, positive numbers remain unchanged as before
with the sign-magnitude numbers.
One’s Complement of a Signed Binary Number
• Negative numbers are represented by taking the one’s complement of the
unsigned positive number.
• Since positive numbers always start with a “0”, the complement will always
start with a “1” to indicate a negative number.
• The one’s complement of a negative binary number is the complement of
its positive counterpart, so to take the one’s complement of a binary
number, all we need to do is change each bit in turn.
• Thus the one’s complement of “1” is “0” and vice versa,
• then the one’s complement of 100101002 is simply 011010112 as all the 1’s
are changed to 0’s and the 0’s to 1’s.
2’s complement
• The 2’s complement is defined as 2n-N
• Can be done by subtraction of N from 2n or adding 1 to the 1’s
complement of a number.
• For 6 = 0110
• The 1’s complement is 1001
• The 2’s complement is 1010
operation is carried out by means of the following steps:
• (i) At first, 2’s complement of the subtrahend is found.
• (ii) Then it is added to the minuend.
• (iii) If the final carry over of the sum is 1, it is dropped and the result
is positive.
• (iv) If there is no carry over, the two’s complement of the sum will be
the result and it is negative.
(i) 110110 - 10110
• The numbers of bits in the subtrahend is 5 while that of minuend is 6.
• We make the number of bits in the subtrahend equal to that of minuend by taking a `0’ in the
sixth place of the subtrahend.
• Now, 2’s complement of 010110 is (101101 + 1) i.e.101010.
• Adding this with the minuend.
•
1 1 0 1 1 0 Minuend
1 0 1 0 1 0 2’s complement of subtrahend
Carry over 1 1 0 0 0 0 0 Result of addition
• After dropping the carry over we get the result of subtraction to be 100000.
(ii) 10110 – 11010
• 2’s complement of 11010 is (00101 + 1) i.e. 00110.
• Hence
• Minued - 1 0 1 1 0
2’s complement of subtrahend - 0 0 1 1 0
Result of addition - 1 1 1 0 0
• As there is no carry over, the result of subtraction is negative and is
obtained by writing the 2’s complement of 11100 i.e.(00011 + 1) or 00100.
• Hence the difference is – 100.
(iii) 1010.11 – 1001.01
• 2’s complement of 1001.01 is 0110.11. Hence
• Minued - 1 0 1 0 . 1 1
2’s complement of subtrahend - 0 1 1 0 . 1 1
Carry over 1 0 0 0 1 . 1 0
• After dropping the carry over we get the result of subtraction as 1.10.
Subtract the following numbers:
• i) 101 from 1001
Solution:
101 from 1001
1 Borrow
1 0 0 1
1 0 1
1 0 0
ii) 1010101.10 from 1111011.11
• Solution:
1010101.10 from 1111011.11
1 Borrow
1 1 1 1 0 1 1 . 1 1
1 0 1 0 1 0 1 . 1 0
1 0 0 1 1 0 . 0 1
• The operation is carried out by means of the following steps:
• (i) At first, 2’s complement of the subtrahend is found.
• (ii) Then it is added to the minuend.
• (iii) If the final carry over of the sum is 1, it is dropped and the result
is positive.
• (iv) If there is no carry over, the two’s complement of the sum will be
the result and it is negative.
Subtraction by 2’s Complement
(i) 110110 - 10110
• The numbers of bits in the subtrahend is 5 while that of minuend is 6. We make the
number of bits in the subtrahend equal to that of minuend by taking a `0’ in the sixth
place of the subtrahend.
• Now, 2’s complement of 010110 is (101101 + 1) i.e.101010. Adding this with the
minuend.
•
1 1 0 1 1 0 Minuend
1 0 1 0 1 0 2’s complement of subtrahend
Carry over 1 1 0 0 0 0 0 Result of addition
• After dropping the carry over we get the result of subtraction to be 100000.
•
• (iii) 1010.11 – 1001.01
• Solution:
• 2’s complement of 1001.01 is 0110.11. Hence
• Minued - 1 0 1 0 . 1 1
2’s complement of subtrahend - 0 1 1 0 . 1 1
Carry over 1 0 0 0 1 . 1 0
• After dropping the carry over we get the result of subtraction as 1.10.
•
Subtraction by 1’s Complement
• The steps to be followed in subtraction by 1’s complement are:
• i) To write down 1’s complement of the subtrahend.
• ii) To add this with the minuend.
• iii) If the result of addition has a carry over then it is dropped and an 1
is added in the last bit.
• iv) If there is no carry over, then 1’s complement of the result of
addition is obtained to get the final result and it is negative.
• 1’s complement of 10011 is 011010. Hence
• Minued - 1 1 0 1 0 1
1’s complement of subtrahend - 0 1 1 0 1 0
Carry over - 1 0 0 1 1 1 1
1
0 1 0 0 0 0
• The required difference is 10000
Evaluate:
(i) 110101 – 100101
• (iii) 1011.001 – 110.10
• Solution:
• 1’s complement of 0110.100 is 1001.011 Hence
• Minued - 1 0 1 1 . 0 0 1
1’s complement of subtrahend - 1 0 0 1 . 0 1 1
Carry over - 1 0 1 0 0 . 1 0 0
1
0 1 0 0 . 1 0 1
Binary Multiplication
• (i) 10111 by 1101
• Solution:
• 1 0 1 1 1
1 1 0 1
1 0 1 1 1 ← First partial product
1 0 1 1 1
1 1 1 0 0 1 1 ← First intermediate sum
1 0 1 1 1
1 0 0 1 0 1 0 1 1 ← Final sum.
• Hence the required product is 100101011.
• 1x0=0
• 1x1=1
•
• 12x11
• 12
• X11
• 11x2 22
• +11x1 11
• 132
• (i) 11001 ÷ 101
• 101) 11001 (101
101
101
101
• Hence the quotient is 101
Binary Division
• (ii) 11101.01 ÷ 1100
• Solution:
• 1100) 11101.01 (10.0111
1100
10101
1100
0010
1100
1100
1100
• Hence the quotient is 10.0111
Operation with 2’s comp
• Add 4 and -6
• Will use the 2’s complement of -6 or 1010
• 4 0100
• -6 1010 1010
• 1110
• And taking the 2’s complement of 1110 get 0001 + 1 = 0010
Overflow
• When adding 2 n-bit numbers it is possible to get a n+1 bit result if
there is a carry out.
• On paper it is easy just add another bit.
• In 2’s complement add a msb 0 for a positive or a msb 1 for a
negative.
• In a computer the number of bits that can be used is fixed
Overflow handling
• No overflow in signed
arithmetic
( carry) 111_
1110
+ 0011
0001
• -2 + 3 = 1
(correct)
• Signed addition in
4-bit arithmetic
( carry) 1__
0110
+ 0011
1001
• 6 + 3  -7
(false)
Overflow handling
• In signed arithmetic an overflow happens when
• The sum of two positive numbers exceeds the maximum positive value that
can be represented using n bits: 2n – 1 – 1
• The sum of two negative numbers falls below the minimum negative value
that can be represented using n bits: – 2n – 1
MULTIPLICATION
Decimal multiplication
(carry) 1_
37
x 12
74
370
444
• What are the rules?
• Successively multiply the multiplicand
by each digit of the multiplier starting
at the right shifting the result left by
an extra left position each time each
time but the first
• Sum all partial results
Binary multiplication
(carry)
111 _
1101
x 101
1101
00
110100
1000001
• What are the rules?
• Successively multiply the
multiplicand by each digit of the
multiplier starting at the right
shifting the result left by an extra
left position each time each time
but the first
• Sum all partial results
• Binary multiplication is easy!
Binary multiplication table
X 0 1
0 0 0
1 0 1
Example (I)
• Multiply 0011 by 0011
• Start
Multiplicand Multiplier Product
0011 0011 0000
• First addition
Multiplicand Multiplier Product
0011 0011 0011
DIVISION
Division
• Implemented by successive subtractions
• Result must verify the equality
Dividend = Multiplier× Quotient + Remainder
Decimal division (long division
• What are the rules?
• Repeatedly try to subtract smaller
multiple of divisor from dividend
• Record multiple (or zero)
• At each step, repeat with a lower
power of ten
• Stop when remainder is smaller
than divisor
303
7 2126
-210
26
-21
5
Binary division
• What are the rules?
• Repeatedly try to subtract powers of
two of divisor from dividend
• Mark 1 for success, 0 for failure
• At each step, shift divisor one position
to the right
• Stop when remainder is smaller than
divisor
011
11 1011
-11
1011
>-11
101
>>-11
10
X
X
Same division in decimal
• What are the rules?
• Repeatedly try to subtract powers of
two of divisor from dividend
• Mark 1 for success, 0 for failure
• At each step, shift divisor one position
to the right
• Stop when remainder is smaller than
divisor
2+1=3
3 11
-12
11
>-6
5
>-3
2
X
X
Normalizing binary numbers
• 0.1 becomes 1.0×2-1
• 0.01 becomes 1.0×2-2
• 0.11 becomes 1.1×2-1
• 1.1 is already normalized and equal to1.0×20
• 10.01 becomes 1.001×21
• 11.11 becomes 1______×2_____

L3 ARITHMETIC OPERATIONS.pptx

  • 1.
  • 2.
    • Addition andSubtraction • Two’s Compliment Representation • Signed Addition and Subtraction • Multiplication and division • Division Operation
  • 3.
    • Data ismanipulated by using the arithmetic instructions in digital computers. • Data is manipulated to produce results necessary to give solution for the computation problems. • The Addition, subtraction, multiplication and division are the four basic arithmetic operations.
  • 4.
    • Inside acomputer system, all operations are carried out on fixed- length binary values • The unsigned (binary number system) and signed (2’s complement) representations have the advantage that addition and subtraction operations have simple • and that the same algorithm can be used for both representations.
  • 5.
  • 6.
    General concept • Decimaladdition (carry) 1_ 19 + 7 26 • Binary addition ( carry) 111_ 10011 + 111 11010 • 16+8+2 = 26
  • 7.
    • Signed BinaryNumbers • Signed Binary Numbers use the MSB as a sign bit to display a range of either positive numbers or negative numbers
  • 9.
    • In mathematics,positive numbers (including zero) are represented as unsigned numbers. That is we do not put the +ve sign in front of them to show that they are positive numbers. • However, when dealing with negative numbers we do use a -ve sign in front of the number to show that the number is negative in value and different from a positive unsigned value, and the same is true with signed binary numbers.
  • 10.
    • However, indigital circuits there is no provision made to put a plus or even a minus sign to a number, • since digital systems operate with binary numbers that are represented in terms of “0’s” and “1’s”. • When used together in microelectronics, these “1’s” and “0’s”, called a bit (being a contraction of BInary digiT), fall into several range sizes of numbers which are referred to by common names, such as a byte or a word.
  • 11.
    • Mathematical numbersare generally made up of a sign and a value (magnitude) in which the sign indicates whether the number is positive, ( + ) or negative, ( – ) with the value indicating the size of the number, • for example 23, +156 or -274. Presenting numbers is this fashion is called “sign-magnitude” representation since the left most digit can be used to indicate the sign and the remaining digits the magnitude or value of the number.
  • 12.
    • But howdo we represent signed binary numbers if all we have is just one’s and zero’s. • We know that binary digits, or bits only have two values, either a “1” or a “0” and conveniently for us, a sign also has only two values, being a “+” or a “–“.
  • 13.
    signed binary numbers •For signed binary numbers the most significant bit (MSB) is used as the sign bit. • If the sign bit is “0”, this means the number is positive in value. • If the sign bit is “1”, then the number is negative in value. • The remaining bits in the number are used to represent the magnitude of the binary number in the usual unsigned binary number format way.
  • 14.
    signed binary numbers •Then we can see that the Sign-and-Magnitude (SM) notation stores positive and negative values by dividing the “n” total bits into two parts: • 1 bit for the sign and n–1 bits for the value which is a pure binary number.
  • 15.
  • 16.
  • 17.
    Signed and unsignedadditions • Unsigned addition in 4- bit arithmetic ( carry) 11_ 1011 + 0011 1110 • 11 + 3 = 14 (8 + 4 + 2) • Signed addition in 4-bit arithmetic ( carry) 11_ 1011 + 0011 1110 • -5 + 3 = -2
  • 18.
    • 1 0 •0+0=0 • 1+0=1 • 1+1=0 carry =1 • 01+01=10 • 1+1+1=11 • 10+1=11
  • 19.
    • 0-0=0 • 1-0=1 •0-1=-1 • 1-1=0 • 10-11
  • 20.
    Signed and unsignedadditions • Same rules apply even though bit strings represent different values • Sole difference is overflow handling
  • 21.
    One’s Complement ofa Signed Binary Number • One’s Complement or 1’s Complement is another method which we can use to represent negative binary numbers in a signed binary number system. • In one’s complement, positive numbers remain unchanged as before with the sign-magnitude numbers.
  • 22.
    One’s Complement ofa Signed Binary Number • Negative numbers are represented by taking the one’s complement of the unsigned positive number. • Since positive numbers always start with a “0”, the complement will always start with a “1” to indicate a negative number. • The one’s complement of a negative binary number is the complement of its positive counterpart, so to take the one’s complement of a binary number, all we need to do is change each bit in turn. • Thus the one’s complement of “1” is “0” and vice versa, • then the one’s complement of 100101002 is simply 011010112 as all the 1’s are changed to 0’s and the 0’s to 1’s.
  • 23.
    2’s complement • The2’s complement is defined as 2n-N • Can be done by subtraction of N from 2n or adding 1 to the 1’s complement of a number. • For 6 = 0110 • The 1’s complement is 1001 • The 2’s complement is 1010
  • 24.
    operation is carriedout by means of the following steps: • (i) At first, 2’s complement of the subtrahend is found. • (ii) Then it is added to the minuend. • (iii) If the final carry over of the sum is 1, it is dropped and the result is positive. • (iv) If there is no carry over, the two’s complement of the sum will be the result and it is negative.
  • 25.
    (i) 110110 -10110 • The numbers of bits in the subtrahend is 5 while that of minuend is 6. • We make the number of bits in the subtrahend equal to that of minuend by taking a `0’ in the sixth place of the subtrahend. • Now, 2’s complement of 010110 is (101101 + 1) i.e.101010. • Adding this with the minuend. • 1 1 0 1 1 0 Minuend 1 0 1 0 1 0 2’s complement of subtrahend Carry over 1 1 0 0 0 0 0 Result of addition • After dropping the carry over we get the result of subtraction to be 100000.
  • 26.
    (ii) 10110 –11010 • 2’s complement of 11010 is (00101 + 1) i.e. 00110. • Hence • Minued - 1 0 1 1 0 2’s complement of subtrahend - 0 0 1 1 0 Result of addition - 1 1 1 0 0 • As there is no carry over, the result of subtraction is negative and is obtained by writing the 2’s complement of 11100 i.e.(00011 + 1) or 00100. • Hence the difference is – 100.
  • 27.
    (iii) 1010.11 –1001.01 • 2’s complement of 1001.01 is 0110.11. Hence • Minued - 1 0 1 0 . 1 1 2’s complement of subtrahend - 0 1 1 0 . 1 1 Carry over 1 0 0 0 1 . 1 0 • After dropping the carry over we get the result of subtraction as 1.10.
  • 28.
    Subtract the followingnumbers: • i) 101 from 1001 Solution: 101 from 1001 1 Borrow 1 0 0 1 1 0 1 1 0 0
  • 29.
    ii) 1010101.10 from1111011.11 • Solution: 1010101.10 from 1111011.11 1 Borrow 1 1 1 1 0 1 1 . 1 1 1 0 1 0 1 0 1 . 1 0 1 0 0 1 1 0 . 0 1
  • 30.
    • The operationis carried out by means of the following steps: • (i) At first, 2’s complement of the subtrahend is found. • (ii) Then it is added to the minuend. • (iii) If the final carry over of the sum is 1, it is dropped and the result is positive. • (iv) If there is no carry over, the two’s complement of the sum will be the result and it is negative. Subtraction by 2’s Complement
  • 31.
    (i) 110110 -10110 • The numbers of bits in the subtrahend is 5 while that of minuend is 6. We make the number of bits in the subtrahend equal to that of minuend by taking a `0’ in the sixth place of the subtrahend. • Now, 2’s complement of 010110 is (101101 + 1) i.e.101010. Adding this with the minuend. • 1 1 0 1 1 0 Minuend 1 0 1 0 1 0 2’s complement of subtrahend Carry over 1 1 0 0 0 0 0 Result of addition • After dropping the carry over we get the result of subtraction to be 100000. •
  • 32.
    • (iii) 1010.11– 1001.01 • Solution: • 2’s complement of 1001.01 is 0110.11. Hence • Minued - 1 0 1 0 . 1 1 2’s complement of subtrahend - 0 1 1 0 . 1 1 Carry over 1 0 0 0 1 . 1 0 • After dropping the carry over we get the result of subtraction as 1.10. •
  • 33.
    Subtraction by 1’sComplement • The steps to be followed in subtraction by 1’s complement are: • i) To write down 1’s complement of the subtrahend. • ii) To add this with the minuend. • iii) If the result of addition has a carry over then it is dropped and an 1 is added in the last bit. • iv) If there is no carry over, then 1’s complement of the result of addition is obtained to get the final result and it is negative.
  • 34.
    • 1’s complementof 10011 is 011010. Hence • Minued - 1 1 0 1 0 1 1’s complement of subtrahend - 0 1 1 0 1 0 Carry over - 1 0 0 1 1 1 1 1 0 1 0 0 0 0 • The required difference is 10000 Evaluate: (i) 110101 – 100101
  • 35.
    • (iii) 1011.001– 110.10 • Solution: • 1’s complement of 0110.100 is 1001.011 Hence • Minued - 1 0 1 1 . 0 0 1 1’s complement of subtrahend - 1 0 0 1 . 0 1 1 Carry over - 1 0 1 0 0 . 1 0 0 1 0 1 0 0 . 1 0 1
  • 36.
    Binary Multiplication • (i)10111 by 1101 • Solution: • 1 0 1 1 1 1 1 0 1 1 0 1 1 1 ← First partial product 1 0 1 1 1 1 1 1 0 0 1 1 ← First intermediate sum 1 0 1 1 1 1 0 0 1 0 1 0 1 1 ← Final sum. • Hence the required product is 100101011. • 1x0=0 • 1x1=1 •
  • 37.
    • 12x11 • 12 •X11 • 11x2 22 • +11x1 11 • 132
  • 38.
    • (i) 11001÷ 101 • 101) 11001 (101 101 101 101 • Hence the quotient is 101 Binary Division
  • 39.
    • (ii) 11101.01÷ 1100 • Solution: • 1100) 11101.01 (10.0111 1100 10101 1100 0010 1100 1100 1100 • Hence the quotient is 10.0111
  • 41.
    Operation with 2’scomp • Add 4 and -6 • Will use the 2’s complement of -6 or 1010 • 4 0100 • -6 1010 1010 • 1110 • And taking the 2’s complement of 1110 get 0001 + 1 = 0010
  • 42.
    Overflow • When adding2 n-bit numbers it is possible to get a n+1 bit result if there is a carry out. • On paper it is easy just add another bit. • In 2’s complement add a msb 0 for a positive or a msb 1 for a negative. • In a computer the number of bits that can be used is fixed
  • 43.
    Overflow handling • Nooverflow in signed arithmetic ( carry) 111_ 1110 + 0011 0001 • -2 + 3 = 1 (correct) • Signed addition in 4-bit arithmetic ( carry) 1__ 0110 + 0011 1001 • 6 + 3  -7 (false)
  • 44.
    Overflow handling • Insigned arithmetic an overflow happens when • The sum of two positive numbers exceeds the maximum positive value that can be represented using n bits: 2n – 1 – 1 • The sum of two negative numbers falls below the minimum negative value that can be represented using n bits: – 2n – 1
  • 45.
  • 46.
    Decimal multiplication (carry) 1_ 37 x12 74 370 444 • What are the rules? • Successively multiply the multiplicand by each digit of the multiplier starting at the right shifting the result left by an extra left position each time each time but the first • Sum all partial results
  • 47.
    Binary multiplication (carry) 111 _ 1101 x101 1101 00 110100 1000001 • What are the rules? • Successively multiply the multiplicand by each digit of the multiplier starting at the right shifting the result left by an extra left position each time each time but the first • Sum all partial results • Binary multiplication is easy!
  • 48.
  • 49.
    Example (I) • Multiply0011 by 0011 • Start Multiplicand Multiplier Product 0011 0011 0000 • First addition Multiplicand Multiplier Product 0011 0011 0011
  • 50.
  • 51.
    Division • Implemented bysuccessive subtractions • Result must verify the equality Dividend = Multiplier× Quotient + Remainder
  • 52.
    Decimal division (longdivision • What are the rules? • Repeatedly try to subtract smaller multiple of divisor from dividend • Record multiple (or zero) • At each step, repeat with a lower power of ten • Stop when remainder is smaller than divisor 303 7 2126 -210 26 -21 5
  • 53.
    Binary division • Whatare the rules? • Repeatedly try to subtract powers of two of divisor from dividend • Mark 1 for success, 0 for failure • At each step, shift divisor one position to the right • Stop when remainder is smaller than divisor 011 11 1011 -11 1011 >-11 101 >>-11 10 X X
  • 54.
    Same division indecimal • What are the rules? • Repeatedly try to subtract powers of two of divisor from dividend • Mark 1 for success, 0 for failure • At each step, shift divisor one position to the right • Stop when remainder is smaller than divisor 2+1=3 3 11 -12 11 >-6 5 >-3 2 X X
  • 55.
    Normalizing binary numbers •0.1 becomes 1.0×2-1 • 0.01 becomes 1.0×2-2 • 0.11 becomes 1.1×2-1 • 1.1 is already normalized and equal to1.0×20 • 10.01 becomes 1.001×21 • 11.11 becomes 1______×2_____