https://github.com/dcdeepesh/convert
Base conversion program
https://github.com/dcdeepesh/convert
Last synced: 10 months ago
JSON representation
Base conversion program
- Host: GitHub
- URL: https://github.com/dcdeepesh/convert
- Owner: dcdeepesh
- License: apache-2.0
- Created: 2019-08-11T12:52:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-22T01:17:42.000Z (almost 7 years ago)
- Last Synced: 2025-06-10T14:49:44.068Z (about 1 year ago)
- Language: C++
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# convert
Base conversion program
This program converts data from one base to another.
There are upto 62 possible bases depending on the options provided.
The program is completely command-line and argument-based.
### Usage
The usage of the program can be found by supplying `--help` or `-h` option.
The help message is as follows:
```
Usage: convert [baseOptions] [-P|--no-pad] data
Convert data from one base to another.
baseOptions:
-f , --from= convert the data from given base to base 10
-t , --to= convert the data from base 10 to given base
--to convert data from & to predefined bases
NOTE: If --to option is not set, -t or -f or both HAVE to be set.
If either is omitted, it is taken to be 10.
Predefined bases:
bin binary; base 2 (digits: 0-1)
dec decimal; base 10 (digits: 0-9)
hex hexadecimal; base 16 (digits: 0-9,A-F/a-f)
oct octal; base 8 (digits: 1-8)
Other options:
-P, --no-pad do NOT pad the output, default setting pads output
-h, --help show this help message
e.g. convert --hex2bin E2F4
converts E2F4 to binary
```
### Contributing
Contributions to this program are welcome in the form of pull requests.
Contributors are requested to group the commits as individual units of features/fixes etc.
The contributions will be acted upon within a week of pull request.
All the comments/replies to comments will also be replied to within a week.
Feel free to suggest anything and star this repository ;).