Question

In: Computer Science

Assume -122 and -66 are signed 8-bit decimal integers. Calculate -122 + (- 66). and -122...

Assume -122 and -66 are signed 8-bit decimal integers. Calculate -122 + (- 66). and -122 - (- 66). Do we have overflow or underflow after each operation? Why?

Solutions

Expert Solution

Overflow or underflow happens when the result of addition or subtraction is greater or less than than specified range.Overflows do not happen in multiplication and division

im.performing the additions in decimal and then in explaining why overflow or underflow occurs with reference to range of number for this representation

If we have 8 bit signed magnitude no

We have seven bits for number magnitude and 1 bit for sign

Maximum decimal value that can be represented in 7 bit binary is ==127 (when all 7 1's are there in magnitude)

So maximum value in 8 bit signed magnitude is =127 in decimal

If sign bit =1 and all 7 bits are ones then no is -127 this is minimum value in decimal

If we add -122-66=-192

-192 does not lie between -127 to 127 so underflow occurs in final operation when 2 numbers are added.

Second case

Final arithmetic expressions

-122+66 =56

which lies between -127 to 127 so no underflow occurs

If you are having any doubts please ask i will answer asap


Related Solutions

Complete the following table. All binary numbers are 8-bit signed integers. (Don't forget to show the...
Complete the following table. All binary numbers are 8-bit signed integers. (Don't forget to show the steps of your solution!) Decimal value Sign-magnitude representation Ones' complement representation Two's complement representation -98 10001011 01110101 10100100 Compute the results of the indicated operations in columns 2 and 3, assuming that the binary numbers represent integers in the formats given by column 1. Identify which of the operations, if any, results in an overflow. (Don't forget to show the steps of your solution!)...
1. Complete the following table using 8-bit representation ((show your work to get credit) Decimal Signed...
1. Complete the following table using 8-bit representation ((show your work to get credit) Decimal Signed Magnitude One’s Complement Two’s Complement 30 -47 0
Represent -60 in binary using 8-bit signed magnitude. Add the following unsigned 8 bit binary numbers...
Represent -60 in binary using 8-bit signed magnitude. Add the following unsigned 8 bit binary numbers as shown. 01110101 + 00111011 Add the following unsigned 8 bit binary numbers as shown. 01000100 + 10111011
Interpret these signed 8-bit sequences with each type of signed/unsigned encoding. Remember the bits are arbitrary!...
Interpret these signed 8-bit sequences with each type of signed/unsigned encoding. Remember the bits are arbitrary! They can be interpreted in many different ways. C.1: Complete the following table using decimal (base-10) numbers. The first line is already completed for you bit sequence unsigned sign-magnitude 1s’ complement 2’s complement 00000101 +5 +5 +5 +5 11110001 ? ? ? ? 01010011 ? ? ? ? 10000000 ? ? ? ? 11111111 ? ? ? ?
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Find the decimal equivalents for the following 8-bit two’s complement numbers. a. 0010 0100 Decimal Equivalent...
Find the decimal equivalents for the following 8-bit two’s complement numbers. a. 0010 0100 Decimal Equivalent ___________ b. 1010 1001 Decimal Equivalent ___________ c. 1100 0011 Decimal Equivalent ___________ d. 0101 0101 Decimal Equivalent ___________
What decimal value does the 8-bit binary number 10011110 have if: a) it is interpreted as...
What decimal value does the 8-bit binary number 10011110 have if: a) it is interpreted as an unsigned number? b) It is on a computer using signed-magnitude representation? c) It is on a computer using one’s complement representation? d) It is on a computer using two’s complement representation?
Convert the following binary number (signed 32-bit floating point IEEE-754) into decimal. 0100 0011 0100 0000...
Convert the following binary number (signed 32-bit floating point IEEE-754) into decimal. 0100 0011 0100 0000 0000 0000 0000 0000
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT