Skip to main content


Showing posts from January, 2008

Operation on Bits and Bitwise Operators

OK guys, this is my first post in the New Year 2008, I thought of posting it earlier but at last I didn’t. It’s already been so long since I posted so let’s keep everything aside and talk just about what we have for today. ;-) I was sitting the other day thinking about what to write for a post here. Suddenly I realized that we have discussed operations on matrices , arrays , and what not but we haven’t had the chance to talk anything about the most fundamental thing a computer understands. Yeah, Operation on Bits. Bits can have only two values either ON (1) or OFF (0). In this article, we’ll be discussing about the different operations which can be performed on bits. One thing to note here is, we don’t perform these operation on single bits but rather on a group of bits (byte(s)). So even though Bitwise operators operate on bits its almost always a part of a group (byte, which makes up each data type), it means we can do bitwise operations on any d