From 6731e4167208b9ae29983b639fa2688df9e9d2b9 Mon Sep 17 00:00:00 2001 From: virajsharma2000 Date: Mon, 22 Sep 2025 21:39:28 +0530 Subject: [PATCH] add a new coding idea: decimal to binary --- Projects/1-Beginner/Dec2Bin.md | 40 ++++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 41 insertions(+) create mode 100644 Projects/1-Beginner/Dec2Bin.md diff --git a/Projects/1-Beginner/Dec2Bin.md b/Projects/1-Beginner/Dec2Bin.md new file mode 100644 index 00000000..362283ae --- /dev/null +++ b/Projects/1-Beginner/Dec2Bin.md @@ -0,0 +1,40 @@ +# 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](https://en.wikipedia.org/wiki/ASCII) +- [click here for unicode information](https://en.wikipedia.org/wiki/Unicode) + +## Useful links and resources + +[Binary number system](https://en.wikipedia.org/wiki/Binary_number) + +## Example projects +- [decimal to binary program geeks for geeks] (https://www.geeksforgeeks.org/dsa/program-binary-decimal-conversion/) + +# HAPPY CODING!! + diff --git a/README.md b/README.md index 2d209743..4fc95ebe 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ required to complete them. | Name | Short Description | Tier | | --------------------------------------------------------------------------------- | ---------------------------------------------------------- | ---------- | | [Bin2Dec](./Projects/1-Beginner/Bin2Dec-App.md) | Binary-to-Decimal number converter | 1-Beginner | +| [Dec2Bin](./Projects/1-Beginner/Dec2Bin.md) | Decimal-to-Binary number converter | 1-Beginner | | [Border Radius Previewer](./Projects/1-Beginner/Border-Radius-Previewer.md) | Preview how CSS3 border-radius values affect an element | 1-Beginner | | [Calculator](./Projects/1-Beginner/Calculator-App.md) | Calculator | 1-Beginner | | [Christmas Lights](./Projects/1-Beginner/Christmas-Lights-App.md) | Simulate a string of Christmas lights | 1-Beginner |