Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a bitwise conversion for DecimalToBinary. #380
Conversation
|
|
@varunu28 Done. |
|
You can try to simplify the user input. You don't need to remove the existing code which handles the user input |
|
Take a look. |
This adds a (not pure) bitwise approach, which is more efficient than a conventional approach (it does not need any division operation), to convert from decimal to binary. It also creates an interface to ease the choose between conventional and bitwise methods.
I have a pure bitwise approach in another branch but it is less efficient (because the loops and method calls).