The left-most significant bit of b (before we toggle and add one), is the sign-bit. If it's 0, the number is positive and negative if 1. In b it is 1.
So b is a negative number. Now, the only significant bits of the toggled+add one value of b is 0101, which is 5 in unsigned binary. So the value of b is -5.
Although Darkestfright explained it pretty well this time, there is still a small minor problem that needs to be highlighted:
~ will, as said, flip ALL bits, when you don't know how many bits you have or what type you are handling, it can be a quite dangerous operator.