Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Assume 151 and 214 are signed 8-bit decimal integers stored in two’s complement format. Calculate 151 - 214 using saturating arithmetic. The result should be written in decimal. Show your work.

Short Answer

Expert verified

The result of performing saturating arithmetic of 152-214 is as follows:-105+42=-63

Step by step solution

01

Determine the addition and subtraction showing carries

The binary values of the signed decimal numbers will be used for addition and subtraction. For addition the right most bits will be added and the carry will be forwarded through left. The operands should have the values that fits 32 bits or specified bits . The subtraction will takes place from the right most bits and the borrowed bits will be considered as carry.

02

Determine 151-214 using saturating arithmetic.

Given that , the 151 and 214 are signed 8 bit decimal integers that are stored in a 2’s complement format.

Convert each of decimal numbers to binary:

151 = 100101112

214 = 110101102

Now take 2’s Complement for both the numbers:

Convert all the 1s to 0s and 0s to 1s . Then add 1 to the converted number.

151 = 100101112

2's Complement = 01101000

Add 1 = 01101000 + 1

2's Complement = 01101001

214 = 110101102

2's complement = 00101001

Add 1 = 00101001 + 1

2's complement = 00101010

Now, convert them in to decimal numbers:

151= -105

214=42

For , subtraction use the converted decimal numbers:

-105+42 = -63

Therefore, the result of 151-214=-63

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Calculate 3.984375×10-1+3.4375×10-1+1.771×103 by hand, assuming each of the values are stored in the 16-bit half precision format described in Exercise 3.27 (and also described in the text). Assume 1 guard, 1 round bit, and 1 sticky bit, and round to the nearest even. Show all the steps, and write your answer in both the 16-bit

floating point format and in decimal.

Question: [10] <§3.5> Write down the bit pattern assuming that we are using base 15 numbers in the fraction instead of base 2. (Base 16 numbers use the symbols 0–9 and A–F. Base 15 numbers would use 0–9 and A–E.) Assume there are 24 bits, and you do not need to normalize. Is this representation exact?

Question: [10] Write down the binary representation of the decimal number 63.25 assuming the IEEE 754 single precision format.

Calculate 3.4179687510-3×6.34765625×10-3×1.05625×102by hand, assuming each of the values are stored in the 16-bit half precision format described in Exercise 3.27 ( and also described in the text). Assume 1 guard, 1 round bit, and 1 sticky bit, and round to the nearest even. Show all the steps, and write your answer in both the 16-bit floating point format and in decimal.

Calculate 1.666015625×100×1.9760×104+1.9744×104by hand, assuming each of the values is stored in the 16-bit half-precision format described in Exercise 3.27 (and also described in the text). Assume 1 guard, 1 round bit, and 1 sticky bit, and round to the nearest even. Show all the steps, and write your answer in both the 16-bit floating-point format and in decimal.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free