Here is the code for BitConvertor, a simple library made with Python for Python to convert between strings, decimal values, binary values and hexadecimal values.
Import :
To use the library in your script, you have to import it with this Python instruction :from bitconvertor import *
Convert decimal into... :
- Binary :
decimal_to_binary(integer_value)
Exemple :binary_value = decimal_to_binary(1234) # binary_value = 00000100 11010010
- Hexadecimal :
decimal_to_hexadecimal(integer_value)
Exemple :hexadecimal_value = decimal_to_hexadecimal(1234) # hexadecimal_value = 00000100 11010010
- Character :
decimal_to_character(integer_value)
Exemple :character_value = decimal_to_character(65) # character_value = 'A'
- String :
decimal_to_string(string_value)
Exemple :string_value = decimal_to_string("66 111 110 106 111 117 114") # string_value = "Bonjour"
Convert binary into... :
- Decimal :
binary_to_decimal(string_value)
Exemple :decimal_value = binary_to_decimal("0000010011010010") # decimal_value = 1234
- Hexadecimal :
binary_to_hexadecimal(string_value)
Exemple :hexadecimal_value = binary_to_hexadecimal("0000010011010010") # hexadecimal_value = 04 D2
- Character :
binary_to_char(string_value)
Exemple :character_value = binary_to_char("01000010") # character_value = 'B'
- String :
binary_to_string(string_value)
Exemple :string_value = binary_to_string("01000010 01101111 01101110 01101010 01101111 01110101 01110010") # string_value = "Bonjour"
Convert hexadecimal into... :
- Decimal :
hexadecimal_to_decimal(string_value)
Exemple :decimal_value = hexadecimal_to_decimal("04 D2") # decimal_value = 1234
- Binary :
hexadecimal_to_binary(string_value)
Exemple :binary_value = hexadecimal_to_binary("04 D2") # binary_value = 0000010011010010
- Character :
hexadecimal_to_char(string_value)
Exemple :character_value = hexadecimal_to_char("41") # character_value = 'A'
- String :
hexadecimal_to_string(string_value)
Exemple :string_value = hexadecimal_to_string("42 6F 6E 6A 6F 75 72") # string_value = "Bonjour"
Convert character into... :
- Decimal :
char_to_decimal(character_value)
Exemple :decimal_value = char_to_decimal('A') # decimal_value = 65
- Binary :
char_to_binary(character_value)
Exemple :binary_value = char_to_binary('A') # binary_value = 01000001
- Hexadecimal :
char_to_hexadecimal(character_value)
Exemple :hexadecimal_value = char_to_hexadecimal('A') # hexadecimal_value = 41
Convert string into... :
- Decimal :
string_to_decimal(string_value)
Exemple :decimal_value = string_to_decimal("Bonjour") # decimal_value = "66 111 110 106 111 117 114"
- Binary :
string_to_binary(string_value)
Exemple :binary_value = string_to_binary("Bonjour") # binary_value = "01000010 01101111 01101110 01101010 01101111 01110101 01110010"
- Hexadecimal :
string_to_hexadecimal(string_value)
Exemple :hexadecimal_value = string_to_hexadecimal("Bonjour") # hexadecimal_value = "42 6F 6E 6A 6F 75 72"
Metadata
Release files for bitconvertor 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bitconvertor-1.0.0.tar.gz | 4.2 kB | Without provenance | Details for bitconvertor-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bitconvertor-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for bitconvertor-1.0.0-py3-none-any.whl |
Total release size: 8.7 kB
Release files / bitconvertor-1.0.0.tar.gz
| Download URL | bitconvertor-1.0.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cb3f09421ebd4536a18f51a40782118a46f1f6428914376ad8a4c1fc389d914
|
|
BLAKE2b-256 checksum How to use checksums |
d25f63f582098e9dbf81eccb640d8e50170da6eac1aa5ee4caf4f064e041e058
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / bitconvertor-1.0.0-py3-none-any.whl
| Download URL | bitconvertor-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e893aac9dcf348ac78e65c182e5d7d6bcf3f2b5ffdde945a6f1d73e2adf95a41
|
|
BLAKE2b-256 checksum How to use checksums |
d09ee396451c02348e6b6309de6383b83866e99205badd2c25ec521472c9f8a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for bitconvertor 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.