bit math

bit math

Anonymous
Not applicable
391 Views
2 Replies
Message 1 of 3

bit math

Anonymous
Not applicable

Hello,

 

I'd like to use bit codes in a similar way that object snap does (OSMODE variable).  For example 0 NONe , 1 ENDpoint , 2 MIDpoint ,4 CENter ,8 NODe ,16 QUAdrant ,32 INTersection et cetera

 

I'm not sure how to do the math though to figure out what for example 33 means.  I can see that 33 in binary 00100001 would mean EndPoint and Intersection.  Would you need to define Intersection = "00100000" , endpoint = "00000001", etc. and compare strings, or is there another much simpler method?

 

thanks!

0 Likes
392 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
http://www.cpearson.com/excel/BitsAndBytes.aspx seems to answer the question.  

 

0 Likes
Message 3 of 3

Anonymous
Not applicable

No I can't translate it 😉 but thanks

0 Likes