Convert decimal numbers to binary and binary to decimal in Python.
Project description
decimal_binary_converter
A Python package to convert numbers between decimal and binary representations.
Features
- Convert decimal to binary with
decimal_to_binary - Convert binary to decimal with
binary_to_decimal
Installation
Copy the dec_bi_conv folder into your project or use pip install . from the root folder.
Usage
from dec_bi_conv import decimal_to_binary, binary_to_decimal
print(decimal_to_binary(15)) # '1111' print(binary_to_decimal('1111')) # 15
Testing
Run tests using pytest: pytest tests/
License
See LICENSE.txt for terms.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file decimal_binary_converter-0.1.0.tar.gz.
File metadata
- Download URL: decimal_binary_converter-0.1.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1643dac4b932199a832e45a6da9c61fcea13ea62ebed9e97cef2c41daca4fbd
|
|
| MD5 |
90fb799bf214f18820043e9671fb1107
|
|
| BLAKE2b-256 |
a0547ff089769bd144381c8858596b1757f44c197a6e3bc70f0b12a06b3e4047
|
File details
Details for the file decimal_binary_converter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: decimal_binary_converter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13fc256d2ad49e7e8f2407094e9787e504542b2f0d00f1684f7b776346e51a11
|
|
| MD5 |
9f18bde789575ea2ae0eb5f8ecaf0815
|
|
| BLAKE2b-256 |
bd1ded755c28b48b9ce87ec19a63904336d4d6ee9da99c38dae93c3917fa8604
|