Programming machines has always been a difficult task; newer techniques try to solve this by automating the tougher tasks, the low-level handling of the machines. However, some gates have been left open to the older methods, so whenever you wish to use them you are able to do so. At least this applies to C/C++. In this article you'll see how to use bitwise operators in C/C++, and learn why you may want to use them.
As you can see the usage of single bitwise operators just by themselves on their own can be quite limited, but if you figure out a good equation, together they can work wonders. But don't forget that you have yet to see most of their usage.
We arrived at the end of the first part and somehow managed to learn every one of the operators and some smart tricks for how to chain them together to get access to modify a single bit, the smallest segment in the memory of a computer. Take your time to understand what you have learned, as this will be absolutely necessary for the upcoming article: Bitwise Operators in Action.
You'll learn why, how, and where to use them. I shall also present usages that you'll see daily if you became a coder, and also a few methods that can make the difference between a good completion code and one that struggles to finish an algorithm today.
Until that occurs, make yourself at home within our Dev Network and remember that to succeed, first you must try, and then never give up no matter what happens. If you have further questions, the blog posting section that follows the article was meant for this "sacred" purpose, and if you visit our friendly and ever-growing forum over the DevHardware, information won't be denied to you.
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.