Exercises Signed Binary Arithmetic CSE 271

Exercises Signed Binary Arithmetic CSE 271

<p> Exercises – Signed Binary Arithmetic – CSE 271 K. Dudeck</p><p>1. Determine the unsigned and signed decimal equivalent operations for the following binary operations. Also indicate if any of these equivalent operations generate an overflow condition.</p><p> a) 01101 b) 0110111 + 10010 + 0011100 ------</p><p> c) 10010 d) 11000001 - 11000 - 00110100 ------</p><p>2. Convert each of the following numbers into Signed 2’s Complement Binary Numbers. Use 8 bits for each conversion.</p><p> a) +10710 d) -1258</p><p> b) -6910 e) -112</p><p> c) –12510 f) +4C16</p><p>3. Suppose you have to write an assembly program that performs the following calculation:</p><p> y  x 2  30x 161</p><p>The input x is an UNSIGNED five-bit binary number.</p><p> a) What is the decimal range for input x?</p><p> b) What is the maximum positive value for y?</p><p> c) What is the maximum negative value for y?</p><p> d) How many bits will you need to allocate for the SIGNED result y?</p><p> e) Convert your decimal answers for parts b) and c) to SIGNED 2’s complement binary. Answers </p><p>(1) a) 111112 , 13 + 18 = 31 Unsigned 13 + -14 = -1 Signed</p><p> b) 10100112 , 55 + 28 = 83 Unsigned 55 + 28 = -45* Signed</p><p> c) 110102 , 18 – 24 = 26* Unsigned -14 – -8 = -6 Signed</p><p> d) 100011012 , 193 – 52 = 141 Unsigned -63 - +52 = -115 Signed (*-Overflow)</p><p>(2)</p><p> a) 01101011 b) 10111011 c) 10000011</p><p> d) 10101011 e) 11111101 f) 10110100</p><p>(3)</p><p> a) 0 31 b) 192 c) –64</p><p> d) 9 bits e) 192 = 011000000 , -64 = 111000000</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