Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would be nice to have bitwise operations. #6

Open
philippeboyd opened this issue Dec 21, 2015 · 2 comments
Open

Would be nice to have bitwise operations. #6

philippeboyd opened this issue Dec 21, 2015 · 2 comments

Comments

@philippeboyd
Copy link

philippeboyd commented Dec 21, 2015

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

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

@RokerHRO
Copy link

RokerHRO commented Jan 23, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants