strint
strint copied to clipboard
Would be nice to have bitwise operations.
- & (bitwise and)
- | (bitwise or)
- ^ (bitwise XOR)
- ~ (bitwise compliment)
- << (left shift)
- >> (right shift)
- >>> (zero fill right shift)
Good idea. I should be able to get those implemented in a few days.
@AdnanHafeez : Hum, days? Or years? ;-)
Except from implementing bit shifts via multiplications, bitwise operations on decimal numbers are quite tough. The brutal approach I've got in mind is via base conversion (into base-16 or base-2), do the bit operations, and convert it back into base-10. :-/