Question

Problem 1: Assume 168 and 102 are unsigned 8-bit decimal integers. Calculate 168 - 102. Is...

Problem 1: Assume 168 and 102 are unsigned 8-bit decimal integers. Calculate 168 - 102. Is there overflow, underflow, or neither? Show the process of your calculation and explanation for the 2nd question.

Problem 2: Assume 168 and 102 are signed 8-bit decimal integers. Calculate 168 - 102. Is there overflow, underflow, or neither? Show the process of your calculation and explanation for the 2nd question.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
  • Arithmetic operations have a potential to run into a condition known as overflow.

  • Overflow occurs with respect to the size of the data type that must accommodate the result.

  • Overflow indicates that the result was too large or too small to fit in the original data type.

  • When two signed 2's complement numbers are added, overflow is detected if:

    1. both operands are positive and the result is negative, or

    2. both operands are negative and the result is positive.

  • When two unsigned numbers are subtracted, underflow occurrs if

    • there is a borrow out of the leftmost bit.

Add a comment
Know the answer?
Add Answer to:
Problem 1: Assume 168 and 102 are unsigned 8-bit decimal integers. Calculate 168 - 102. Is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Assume 185 and 122 are signed 8-bit decimal integers stored in sign-magnitude format. Calculate 185–122. Is...

    Assume 185 and 122 are signed 8-bit decimal integers stored in sign-magnitude format. Calculate 185–122. Is there overflow, underflow, or neither? The result is -193 but I want to know the steps to solving it. Please show your work. Thanks.

  • 1. Compute the decimal value for the following bit pattern, assuming it is a single-precision floating...

    1. Compute the decimal value for the following bit pattern, assuming it is a single-precision floating point number (show major steps): 1100 0011 0001 0010 0100 1001 0010 0100 2. Convert the decimal -2118.75 into single-precision floating point number (show major steps). 3. Assume -75 and -122 are signed decimal integers stored in 8-bit sign-magnitude binary format. Calculate -75 + -122. Is there overflow, underflow, or neither?

  • Problem 2 (18 points): a) Compute the sum of the following pair orbit unsigned integers and...

    Problem 2 (18 points): a) Compute the sum of the following pair orbit unsigned integers and indicate if the sum produces overflow (3 points) 010111 + 101101 b) Compute the sum of the following pair of 6-bit signed integers and indicate if the sum produces overflow (3 points) 011011 +001101 c) Do the following subtraction and show the operands and the answers in decimal. Indicate if there is overflow (12 points) 1) the numbers are unsigned (6 points) 2) the...

  • Problem 1: Write a function add64 that adds two input unsigned 64 bit integers x and...

    Problem 1: Write a function add64 that adds two input unsigned 64 bit integers x and y and returns the unsigned 64 bit integer sum z, i.e. zx+y. In your main function, you should assume that x, y, and z will be stored in the following 6 registers as follows: x: upper 32 bits in $t1 y: upper 32 bits in St3 z: upper 32 bits in St5 lower 32 bits in $to lower 32 bits in $t2 lower 32...

  • (3 pts) Consider an unsigned fixed point decimal (Base10) representation with 8 digits, 5 to the...

    (3 pts) Consider an unsigned fixed point decimal (Base10) representation with 8 digits, 5 to the left of the decimal point and 3 to the right. a.      What is the range of the expressible numbers?    b.      What is the precision?    c.       What is the error?    ______________________________________________________________________________   (3 pts) Convert this unsigned base 2 number, 1001 10112, to each base given below   (Note: the space in the binary string is purely for visual convenience) Show your work. Using...

  • Assume that 151 and 214 are signed 8-bit decimal integers stored in two’s complement format. Calculate...

    Assume that 151 and 214 are signed 8-bit decimal integers stored in two’s complement format. Calculate 151 + 214 by adding the two’s complement numbers first and then writing the final result in decimal. Then explain why the final result is very different from 366 (151+214=366). Note that if a number requires more than 8 bits, you need to represent first the number correctly using as many bits as necessary, then keep only the 8 bits, and use the resulting...

  • The following table is used to calculate the division of two decimal unsigned 4-bit integers, 15...

    The following table is used to calculate the division of two decimal unsigned 4-bit integers, 15 and 6, using the optimized division hardware. Please complete the table by filling the "Step" column with a step number listed below and filling the "Remainder" column with a 8-bit binary number. Steps: 2. Left-half Remainder = Left-half Remainder - Divisor 3a. Left-shift Remainder 1 bit, set the new rightmost bit to 1 3b. Restore Remainder, Left-shift Remainder 1 bit, set the new rightmost...

  • 8.9 Use FA's to design a device which will calculate 5x +4y where x and y are 4-bit unsigned inpu...

    8.9 Use FA's to design a device which will calculate 5x +4y where x and y are 4-bit unsigned inputs. Use 8-bit arithmetic. 8.10 Use FA's and logic gates to design a device which will multiply a given 4-bit signed input by -2. (Hint: if you think about this for a bit, you should see the answer is actually pretty straightforward. ..) in addition to the normal sum and carry outputs, a third output called overflow does not. 8.11 Use...

  • Question 1: (4 pts) (CLO#: 4 )(SO#: 1) [1]. The hex number 8f is Unsigned decimal...

    Question 1: (4 pts) (CLO#: 4 )(SO#: 1) [1]. The hex number 8f is Unsigned decimal number ..... Signed decimal number using 2's complement :...... (2). Using 10-bit representation : Give your answer in decimal (i) The largest unsigned value is : .......... (ii) The smallest unsigned value is: ................ (ii) The largest signed value is ... (iii) The smallest negative signed value is: ................

  • ints) The following questions pertain to machine numbers (a) (2 points) For an 8-bit unsigned integer, what is the decimal equivalent of 10010101? (b) (3 points) For an S-bit signed integer, what...

    ints) The following questions pertain to machine numbers (a) (2 points) For an 8-bit unsigned integer, what is the decimal equivalent of 10010101? (b) (3 points) For an S-bit signed integer, what is the decimal equivalent for the 2's compliment of 11010101? (c) (5 points) Consider an 8-bit floating point number like the one in Homework A2 (one sign bit, three exponent bits, and four assignable mantissa bits), what is the floating point number that associates with 01101 1001? ints)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT