A while back I wrote an article titled “The Great Mystery of the Tilde” where I tried to explain what the
Normally, I don’t care too much about going back and updating old content, but my error was quite eggregious. Not only that: that post is the second most view post I had last year, so if I’m going to have that much traffic going to it, then I need to fix it, so I’ve added a paragraph to that post directing visitors to this new post, so that I can prevent future misinformation from spreading.
8, it looks like this in binary:
1000. When you use the
~ on that number, it will convert each bit to the opposite value. That means, each
1 will become a
0 and vice versa. So
~8 would equal
7, whose binary representation looks like this:
0111. Or a
1101) would become 2 (
-9. If you want a better explanation than that, you’ll need to do some research on your own because I don’t feel adequate to explain it.
So, now I hope this sets the record straight and that people being directed to the old post by Google will end up seeing this post. God bless and happy coding!