Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Bitwise Operators

Reply
Thread Tools

Bitwise Operators

 
 
Jared Contrascere
Guest
Posts: n/a
 
      07-19-2003
Hey,

I understand what Bitwise Operators are... and what they do, but what are
they good for? The only thing I can think of is quick mathematics (because
it doesn't really have to be computed) at a sacrifice of losing data. Can
anyone explain what they are good for?

Thanks,
Jared


 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      07-19-2003
"Jared Contrascere" <(E-Mail Removed)> wrote...
> I understand what Bitwise Operators are... and what they do, but what are
> they good for? The only thing I can think of is quick mathematics

(because
> it doesn't really have to be computed) at a sacrifice of losing data.

Can
> anyone explain what they are good for?


If you have some kind of flag set, which you might want to keep
in a single integral variable (instead of in a bunch of bools),
the simplest way to set such flag is the bitwise OR, to clear or
check it is bitwise AND.

Victor


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Equivalent of Javascript Bitwise Operators Michael Foord Python 2 10-28-2004 12:48 AM
?bitwise operators Mike Hodkin C++ 4 01-06-2004 06:32 AM
how important are bitwise operators? Andy C Programming 8 11-13-2003 02:05 PM
how to multiply two integers using bitwise operators sandy_pt_in@yahoo.com C Programming 12 09-23-2003 05:04 PM
mulitiplication using bitwise operators sandy_pt_in@yahoo.com C Programming 3 09-22-2003 02:50 AM



Advertisments