strint icon indicating copy to clipboard operation
strint copied to clipboard

Would be nice to have bitwise operations.

Open philippeboyd opened this issue 10 years ago • 2 comments

- & (bitwise and)
- | (bitwise or)
- ^ (bitwise XOR)
- ~ (bitwise compliment)
- << (left shift)
- >> (right shift)
- >>> (zero fill right shift)

philippeboyd avatar Dec 21 '15 22:12 philippeboyd

Good idea. I should be able to get those implemented in a few days.

AdnanHafeez avatar Jan 12 '18 06:01 AdnanHafeez

@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. :-/

RokerHRO avatar Jan 23 '20 14:01 RokerHRO