This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.

Was a little bit confused about the “~” operator. Please clarify. Consider this eg: 3 is represented in the binary form in this manner 00000000 00000000 00000000 00000011 When we say ~3 we invert the “0” bits to “1” right? So it becomes 11111111 11111111 11111111 11111100 which when converted into decimal becomes : ………+16+8+4+0+0 right? And since the last higher bit is “1” it is a negative number. Then how is ~3 = -4??? What is the binary format of –4?? I feel 00000000 00000000 00000000 00000100 = 4 10000000 00000000 00000000 00000100 = -4 Is this rite? Please correct me if I am wrong.

Nope. Negative numbers are stored in twos compliment form. 00000000 00000000 00000000 00000100 = 4 11111111 11111111 11111111 11111011 = swap all the digits 11111111 11111111 11111111 11111100 = now add 1 And that's how negative numbers are stored.