954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Bitwise operators

Anybody understand these? I'm having the hardest time with them. Partly because I don't see a use for them :P
But what would be an example of a time when you would need to operate on a bit itself? As in, what is their purpose?
Thanks for any help :)

Iron_Cross
Junior Poster
117 posts since Jul 2003
Reputation Points: 46
Solved Threads: 2
 

Most of the time you don't need to use the bitwise operations. The only time I've had to operate with bits is combining the modes in the ifstream/ofstream constructors:

ifstream in( "myfile.txt", ios::in | ios::binary ) ;


Also when I dealt with bitmaps and transparency, I had to use masking and it involved bitwise knowledge.

Dante Shamest
Light Poster
46 posts since Apr 2003
Reputation Points: 13
Solved Threads: 0
 

ok, thanks. Then I'll just read through them and get a basic understanding. I just wanted to know if I would be needing them quite often, so then I would need a full grasp of them.
But thanks!

Iron_Cross
Junior Poster
117 posts since Jul 2003
Reputation Points: 46
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You