What are differnt with bitwise operators and arithmetic operators?
What are differnt with bitwise operators and arithmetic operators?
If u could have a look at FAQ a clear explanation is given. Just a brief note
ssharish2005Code:<< -> left shift operator is similar to multiple by 2 >> -> right shift operator is similar to divide by 2
<< and >> aren't the only bitwise operators, though. There's !, &, |, and ^, and maybe some I can't remember at the moment.
http://www.cprogramming.com/tutorial...operators.html
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
'!' is logical; you meant '~', of course.
System: Debian Sid and FreeBSD 7.0. Both with GCC 4.3.
Useful resources:
comp.lang.c FAQ | C++ FQA Lite
Oops. Of course.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.