943,920 Members | Top Members by Rank

Ad:
Oct 21st, 2007
0

The operaor Or

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Annex is offline Offline
16 posts
since Oct 2007
Oct 21st, 2007
0

Re: The operaor Or

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
Reputation Points: 53
Solved Threads: 13
Junior Poster
hopalongcassidy is offline Offline
148 posts
since Oct 2007
Oct 21st, 2007
0

Re: The operaor Or

Now I am assured.Thank you.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Annex is offline Offline
16 posts
since Oct 2007
Oct 23rd, 2007
0

Re: The operaor Or

You should mark the thread as "Solved".

Hoppy
Reputation Points: 53
Solved Threads: 13
Junior Poster
hopalongcassidy is offline Offline
148 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Code for Deleting a Record in a database??
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Getting the runtime error 424 (objet required)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC