I thought 0 is 0000 0000 0000 in bits and the bitwise not 0 would be 1111 1111 1111 which would be a really big number rather than -1. Even if the first digit is sign digit, then it should be a really negative number rather -1. Can someone explain for me?
            Asked
            
        
        
            Active
            
        
            Viewed 59 times
        
    2
            
            
        - 
                    2This is called "Twos Complement". See http://stackoverflow.com/questions/1049722/what-is-2s-complement for more info. – John Hascall Jan 02 '16 at 03:10
- 
                    wouldn't that account ^ as a possible duplicate? @JohnHascall – Funk Forty Niner Jan 02 '16 at 03:18
- 
                    @Fred-ii- I don't have the rep needed to close as dup... – John Hascall Jan 02 '16 at 03:21
- 
                    @JohnHascall No problemo; closed as such, *cheers* – Funk Forty Niner Jan 02 '16 at 03:22
1 Answers
0
            
            
        Because 11111....111 is -1. 10000....00 is the smallest negative number. Such is the binary representation of negative numbers. It's "inverted".
See more on this link: http://www.swarthmore.edu/NatSci/echeeve1/Ref/BinaryMath/NumSys.html#signint
 
    
    
        Alex
        
- 14,338
- 5
- 41
- 59
