Convert Binary to Decimal and Decimal to Binary!
Please note: This NodeJS app takes in currently only integers for decimals and binary that converts to whole integer numbers.
I made this little app to be my go-to for Binary conversions. Yeah sure there are websites you can find on Google that'll help me do that. But I'd rather just run a small lightweight app on my MacOS Terminal anytime I want to. Those websites can come and go, especially the free ones. And I don't want to have to always pick a website that'll help me when they stop working. Most of them have annoying Ads and can be slow to get results. Sometimes, I might have bad internet days (yes this exists to someone who works in the World Wide Web, lol). Really mostly, I just didn't want to have to convert things by hand anymore.
After reviewing and re-understanding how to convert binary to decimal and decimal to binary, I decided to code the coversions so I'll never have to do it by hand EVER AGAIN, mwahahahah! Then I figured, why not make a NodeJS prompt using TypeScript and add Jest Unit Testing!
Also: The prompts should be straightfoward enough for usage instructions / nagivations. If not, let me knooooow!
https://github.com/junerockwell/binary-conversions-in-c-plus-plus
The link should give you an executable file that contains NodeJS and NPM. https://nodejs.org/en/
Download the files to your local machine, or git clone
it!
npm install -g typescript
Make sure to be in the root directory of the project. Then, install the dependencies.
npm install
npm run prod
Stop the app in regular NodeJS fashion
Ctrl + C
npm test
- Node's Readline Module: https://nodejs.org/api/readline.html
- How to setup Jest: https://amenallah.com/node-js-typescript-jest-express-starter/
- Binary Coversions: https://www.build-electronic-circuits.com/binary-number-system/