Re: [INFO] Bitsums and Operators
Quote:
|
Re: [INFO] Bitsums and Operators
If I have
Code:
(1<<CSW_*) |
Re: [INFO] Bitsums and Operators
If you were doing this in x86 assembly you'd use the bsr (bit search right) instruction.
In pawn I guess your best bet is looping and dividing by two (or shifting right by one) until the number becomes 0, and counting the number of divisions/shifts performed. |
Re: [INFO] Bitsums and Operators
Yep, I know only this way : do ++x; while ( ( bitsum /= 2 ) >= 1 )
|
Re: [INFO] Bitsums and Operators
PHP Code:
PHP Code:
PHP Code:
|
Re: [INFO] Bitsums and Operators
Quote:
PHP Code:
|
Re: [INFO] Bitsums and Operators
You should also add the '^' operator to this topic.
It switches the bit. Code:
Code:
|
Re: [INFO] Bitsums and Operators
Quote:
Code:
new iFlag1 = (1<<0) |
Re: [INFO] Bitsums and Operators
|
Re: [INFO] Bitsums and Operators
Stupid trivia. Why does this function:
PHP Code:
Code:
Has (1 << 13) |
All times are GMT -4. The time now is 17:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.