Assignment #7 Key, Multiplication and Division Problems

Assignment #7 Key, Multiplication and Division Problems

<p> John Visser CS 2560 Assignment #7 Key, Multiplication and Division Problems a) 6 * 2 = 0110 * 0010</p><p>Iter Step Product Multiplicand 0. initialize 0000 0010 0110</p><p>1. 0 -> no op 0000 0010 sr product 0000 0001 + 0110 2. 1 -> add cand 0110 0001 sr product 0011 0000</p><p>3. 0 -> no op 0011 0000 sr product 0001 1000</p><p>4. 0 -> no op 0001 1000 sr product 0000 1100 = 12 b) 2 * 7 = 0010 * 0111</p><p>Iter Step Product Multiplicand 0. initialize 0000 0111 0010 + 0010 1. 1 -> add cand 0010 0111 sr product 0001 0011 + 0010 2. 1 -> add cand 0001 0011 sr product 0001 1001 + 0010 3. 1 -> add cand 0001 1001 sr product 0001 1100</p><p>4. 0 -> no op 0001 1100 sr product 0000 1110 = 14 c) 5 * 3 = 0101 * 0011</p><p>Iter Step Product Multiplicand 0. initialize 0000 0011 0101 + 0101 1. 1 -> add cand 0101 0011 sr product 0010 1001 + 0101 2. 1 -> add cand 0111 1001 sr product 0011 1100</p><p>3. 0 -> no op 0011 1100 sr product 0001 1110</p><p>4. 0 -> no op 0001 1110 sr product 0000 1111 = 15 d) 7 / 2 = 0111 / 0010</p><p>Iter Step Remainder Divisor 0. initialize 0000 0111 0010 sl remainder 0000 1110 - 0010 1. subtract div 1110 1110 rem < 0, restore & sl 0001 1100 - 0010 2. subtract div 1111 1100 rem < 0, restore & sl 0011 1000 - 0010 3. subtract div 0001 1000 rem > 0, sl rem, add 1 0011 0001 - 0010 4. subtract div 0001 0001 rem > 0, sl rem, add 1 0010 0011 5. sr left half of remainder 0001 0011 = 3, remainder 1 e) 13 / 3 = 1101 / 0011</p><p>Iter Step Remainder Divisor 0. initialize 0000 1101 0011 sl remainder 0001 1010 - 0011 1. subtract div 1110 1010 rem < 0, restore & sl 0011 0100 - 0011 2. subtract div 0000 0100 rem > 0, sl rem, add 1 0000 1001 - 0011 3. subtract div 1101 1001 rem < 0, restore & sl 0001 0010 - 0011 4. subtract div 1110 0010 rem < 0, restore & sl 0010 0100 5. sr left half of remainder 0001 0100 = 4, remainder 1 f) 11 / 4 = 1011 / 0100</p><p>Iter Step Remainder Divisor 0. initialize 0000 1011 0100 sl remainder 0001 0110 - 0100 1. subtract div 1101 0110 rem < 0, restore & sl 0010 1100 - 0100 2. subtract div 1110 1100 rem < 0, restore & sl 0101 1000 - 0100 3. subtract div 0001 1000 rem > 0, sl rem, add 1 0011 0001 - 0100 4. subtract div 1111 0001 rem < 0, restore & sl 0110 0010 5. sr left half of remainder 0011 0010 = 2, remainder 3</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us