The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 4 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
The 2"s complement of an n-digit binary number p is an n-digit binary number q such that p + q equals an n-digit representation of zero (any carry digit to column n + 1 is ignored). Thus 01110 is the 2"s complement of 10010 because

The 2"s complement idea can be used to represent negative integers in binary form. After all, the negative of p is by definition a number that, when added to p, results in zero. Given a binary number p, the 2"s complement of p is found by scanning p from loworder to high-order digits (right to left). As long as digit i of p is 0, digit i of q is 0. When the first 1 of p is encountered, say at digit j, then digit j of q is 1, but for the remaining digits, j < i - n, q, = p". For p = 10010, for instance, the rightmost 0 digit of p stays a 0 digit in q, and the first 1 digit stays a 1 digit. The remaining digits of q, however, are the reverse of the digits in p.

For each binary number p, find the 2"s complement of p, namely q, and then calculate p + q.
|
a. 1100 |
b. 1001 |
c. 001 |
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll