edited by
556 views
2 votes
2 votes
How many 1s in Binary represention of (1*4096)+(9*256)+(7*16)+5??

 

And

 

2s compliment of -17??
edited by

1 Answer

Best answer
3 votes
3 votes
each power of 2 will contain single 1.
=2^12 + ((1 +8)2^8) + (( 1 + 2 + 4)2^4) + 4 +1
=2^12 + 2^8 + 2^11 + 2^4 + 2^5 + 2^6 + 2^2 + 2^0
there will be 8 1's.

2's complement of -17

17 = 0001 0001, (take 2's complement)

-17 = 11101111
edited

No related questions found