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

36. If m is a positive integer less than 2n-1, how is the one’s complement representation of −m obtained from the one’s complement of m, when bit strings of length n are used?

Short Answer

Expert verified

The one’s complement of-mis the one’s complement ofmwith every 1 changed to 0 and every 0 changed to 1.

Step by step solution

01

Step 1:

mis positive, thus the one’s complement of mstarts with a 0(first digit).

-mis negative, thus the one’s complement of -mstarts with a 1(first digit) and thus we need to change the first digit from 0 to 1.

Ignoring the first digit, the one’s complement of mis then the binary representation of m

The one’s complement of-m(without the first digit) is then the complement of the binary representation of m and thus every 1 is changed to a 0 and every 0 is changed to a 1.

We then note that the one’s complement of-mis the one’s complement ofmwith every 1 changed to 0 and every 0 changed to 1

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

Study anywhere. Anytime. Across all devices.

Sign-up for free