Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decimal_binary_converter-0.1.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

decimal_binary_converter-0.1.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file decimal_binary_converter-0.1.0.tar.gz.

File metadata

File hashes

Hashes for decimal_binary_converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d1643dac4b932199a832e45a6da9c61fcea13ea62ebed9e97cef2c41daca4fbd
MD5 90fb799bf214f18820043e9671fb1107
BLAKE2b-256 a0547ff089769bd144381c8858596b1757f44c197a6e3bc70f0b12a06b3e4047

See more details on using hashes here.

File details

Details for the file decimal_binary_converter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for decimal_binary_converter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13fc256d2ad49e7e8f2407094e9787e504542b2f0d00f1684f7b776346e51a11
MD5 9f18bde789575ea2ae0eb5f8ecaf0815
BLAKE2b-256 bd1ded755c28b48b9ce87ec19a63904336d4d6ee9da99c38dae93c3917fa8604

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page