Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for various numeral systems #63

Open
2 tasks
neicore opened this issue Oct 9, 2023 · 1 comment
Open
2 tasks

Support for various numeral systems #63

neicore opened this issue Oct 9, 2023 · 1 comment
Labels
Feature Request New feature or request

Comments

@neicore
Copy link
Member

neicore commented Oct 9, 2023

Describe the feature

Currently, we only have support for the base 10 numeral system but it would be cool to support other systems like Hexadecimal numbers for example.

Use Case

Low-Level Programming
In systems programming or when working with hardware, hexadecimal and binary representations are often used to specify memory addresses, bit patterns, and control registers.

Data Encoding and Decoding:
When dealing with data formats like binary, hexadecimal, or base64, the ability to convert between numeral systems is crucial for tasks such as data serialization, deserialization, and encoding/decoding.

Cryptography:
Cryptographic algorithms often require working with binary data and performing bitwise operations.

Network Programming:
Network protocols like IP addresses and MAC addresses are often represented in hexadecimal notation.

Mathematics Applications:
In mathematical applications, different numeral systems might be used to represent numbers or perform specific calculations.

Educational Purposes:
Teaching programming and computer science concepts can benefit from exposing students to different numeral systems. It helps in understanding how computers store and manipulate data.

Custom Base Number Systems:
Some specialized applications may require custom base number systems.

Proposed Solution

A function for converting string to a number that will take a string and a radix and return a number and if the one of the parameters are incorrect, throw an errora

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Version used

v0.2.0

Environment details (OS name and version, etc.)

    OS: Linux 6.1 Manjaro Linux
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Memory: 6.19 GB / 15.31 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
@neicore neicore added the Feature Request New feature or request label Oct 9, 2023
@AvicennaJr
Copy link
Member

After one year I'll attempt this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants