The operaor Or

Reply

Join Date: Oct 2007
Posts: 16
Reputation: Annex is an unknown quantity at this point 
Solved Threads: 0
Annex Annex is offline Offline
Newbie Poster

The operaor Or

 
0
  #1
Oct 21st, 2007
Hello.Help me to understand.
Using Immediate Window of IDE Microsoft Visual Basic,calculate values of following
expressions on the base bit-by-bit operator Or.
In Immediate Window I'm writting following
?2 or 3 [Enter]
3
Result is 3. Is it so?
Thanks.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 147
Reputation: hopalongcassidy is an unknown quantity at this point 
Solved Threads: 13
hopalongcassidy's Avatar
hopalongcassidy hopalongcassidy is offline Offline
Junior Poster

Re: The operaor Or

 
0
  #2
Oct 21st, 2007
To understand this, you need to go back to basics. "OR" is a bitwise operation. The binary for 2 is X10, 3 is X11. ORing the two gives X11 which is 3.

Hoppy
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 16
Reputation: Annex is an unknown quantity at this point 
Solved Threads: 0
Annex Annex is offline Offline
Newbie Poster

Re: The operaor Or

 
0
  #3
Oct 21st, 2007
Now I am assured.Thank you.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 147
Reputation: hopalongcassidy is an unknown quantity at this point 
Solved Threads: 13
hopalongcassidy's Avatar
hopalongcassidy hopalongcassidy is offline Offline
Junior Poster

Re: The operaor Or

 
0
  #4
Oct 23rd, 2007
You should mark the thread as "Solved".

Hoppy
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum


Views: 917 | Replies: 3
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC