-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
[FEATURE] Bitwise operators #32
Comments
I see that a&b is converted as it is but a|b is not because it is by default assumed in the code that | comes with | only. so b is replaced by | and lastly ^ is working for xor as ^ is used for power. So, I format should be |
I would like to work on it. |
@shobhit10058 AND, OR, XOR is confusing as users might think it is normal AND, OR, XOR and not bitwise versions of these operators. I believe retaining C's syntax of & (Bitwise and), | (Bitwise or), and ^ (Bitwise xor) will be best. Do let me know if you think otherwise 😄 |
But what can AND,or, xor of two numbers mean other than bitwise operators |
we can use the original also, just we need to change the ^ to work as xor. power function can be given some other name then |
Yeah I guess we can give ** to power like python. Using AND, OR, XOR might mean the regular AND, OR and XOR. As in True AND False = True, like in python. |
yes |
ok then I can try working with this |
Sure assigning this to you @shobhit10058. |
have you seen my commit? |
Merged. |
Is your feature request related to a problem? Please describe.
Add support for bitwise operators in simC.
Describe the solution you'd like
Check implementation of other operators.
Note: Discuss the bitwise operators and their syntax with a maintainer before implementing.
The text was updated successfully, but these errors were encountered: