Skip to content

Bitwise and, or, xor, and not operators#62

Open
muytingc wants to merge 3 commits intofaheel:masterfrom
muytingc:bitwise-operators
Open

Bitwise and, or, xor, and not operators#62
muytingc wants to merge 3 commits intofaheel:masterfrom
muytingc:bitwise-operators

Conversation

@muytingc
Copy link

Excited to submit my first pull request for the repository. I know harish-vnkt already submitted a pull request for bitwise left and right shifts, but I added the other primary operators suggested in #60 with support for both positive and negative values using two's complement binary numbers.
I did my best to follow the other commenting and style conventions from the rest of the project, but I believe there could be some improvements, so I'd love suggestions. I did some basic testing on my own machine, but believe it could use more thorough testing especially in terms of efficiency.

…Have no implemented converting BigInt to two's complement binary numbers currently, but will be necessary in future versions
…ension of two's complement binary numbers, and two's complement binary numbers back to BigInt type
richardboehme added a commit to natalie-lang/natalie that referenced this pull request Jan 11, 2022
Most of this was taken from the following PR in the BigInt repository:
faheel/BigInt#62
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

Successfully merging this pull request may close these issues.

1 participant