You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.5 KiB
1.5 KiB
Dec2Bin
Tier: 1-Beginner
Binary is the number system all digital computers are based on. Therefore it's important for developers to understand binary, or base 2, mathematics. The purpose of Bin2Dec is to provide practice and understanding of how binary calculations.
Dec2Bin allows the user to enter integers and displays its binary
This challenge requires that the developer implementing it follow these constraints:
- Only integer datatype is allowed as the input
- Getting binary of a particular integer in the string must be calculated using a single mathematical function. It's up to you to figure out which function to use.
- Only strings are allowed as the output binary
User Stories
- User can any integer except just 0 or 1
- User must be notified if 0 or 1 was entered
- User views the results in a single output field containing the binary (base 2) equivalent of the decimal that was entered
Bonus features
- [non-numeric charecters to binary] We can give option to a user to convert a group of non-numeric charecters to binary by encoding to ascii or unicode
- click here for ascii information
- click here for unicode information
Useful links and resources
Example projects
- [decimal to binary program geeks for geeks] (https://www.geeksforgeeks.org/dsa/program-binary-decimal-conversion/)