- Where Developers Learn, Share, & Build Careers


Is this an easy way to find out? What is the lowest (most negative) number that can be presented by two complementes of 7-bit? Show how to convert the number into two complementary presentations.

The least number is -2 ^ 6 . To find out the negative number of a negative number in the supplement of 2 (aka its full value) flip the bits and add one then (- 1) * 1000001 = 0111110 + 1 = 0111111 = 1000000 - 1 = 2 ^ 6-1 . As you can see that there is less than 1000001 and it is less than that: 1000000 . We are getting this full value:

(- 1) * (100000) = (-1) * (100001-1) = (-1) * (100001) + 1 = (2 ^ 6-1) +1 = 2 ^ 6 .

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -