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

Decimal binary converter #35

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

Salmatemsamani
Copy link

No description provided.

Function that convert a positive decimal int to
binary, represented as list of 0s and 1s
Function that converts a array of 0s and 1s to an int
Uses bitshift that are faster to compute than powers / divisions
Adds documentation to the conversion functions
raise an Exception if the input is negative for decimal to bin
conversion
Check bin to dec converter inputs. Raise error if some entries are not 0
or 1s
Check if inputs is made of bits only in a separate function
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.

None yet

2 participants