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

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 ? ? ? ?
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 ___________
Write a verilog code for 8-bit signed multiplication using Booth algorithm and represent the RTL view...
Write a verilog code for 8-bit signed multiplication using Booth algorithm and represent the RTL view for code
Write -127 as 8 bit signed binary number both using 2'complement and sign/magnitude notation.
Write -127 as 8 bit signed binary number both using 2'complement and sign/magnitude notation.
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of...
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of that number? include the sign for that number with no spaces between the number and sign. for example -3 or +3
Part 2: Signed values: Convert each as indicated. 8. Decimal to Hexadecimal (1 byte, one's complement)...
Part 2: Signed values: Convert each as indicated. 8. Decimal to Hexadecimal (1 byte, one's complement)      a. -18      b. -41
Explain the following: a bit, octet, hexadecimal, and decimal value
Explain the following: a bit, octet, hexadecimal, and decimal value
Suppose that two integers from the set of 8 integers {1, 2, … , 8} are...
Suppose that two integers from the set of 8 integers {1, 2, … , 8} are choosen at random. Find the probability that 5 and 8 are picked. Both numbers match. Sum of the two numbers picked is less than 4. [3+3+4 marks] Suppose that you pick a bit string from the set of all bit strings of length ten. Find the probability that: The bit string has the sum of its digits equal to seven. The bit string has...
Of all bit sequences of length 8, an 8-bit sequence is selected at random. Assuming that...
Of all bit sequences of length 8, an 8-bit sequence is selected at random. Assuming that the probability of a bit being 0 is equal to that being 1, determine the probability that the selected bit sequence starts with a 1 or ends with the two bits 00.
1a. Convert 67 (base 10) to 8-bit binary using signed magnitude. Show your work. 1b. Convert...
1a. Convert 67 (base 10) to 8-bit binary using signed magnitude. Show your work. 1b. Convert 69 (base 10) to 8-bit binary using one’s complement. Show your work 1c. Convert 70 (base 10) to 8-bit binary using two’s complement. Show your work. 1d. Convert - 67 (base 10) to 8-bit binary using signed magnitude. 1e. Convert - 67 (base 10) to 8-bit binary using ones compliment. Show your work. 1f. Convert - 67 (base 10) to 8-bit binary using 2s...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT