Skip to main content

A library for binary, decimal, octal, and hexadecimal conversions

Project description

bindecocthex

bindecocthex is a Python library that provides a Conversion class for converting numbers between decimal, binary, octal, and hexadecimal representations.

Installation

You can install bindecocthex using pip:

pip install bindecocthex

Usage

from bindecocthex.conversion import Conversion

# Create an instance of the Conversion class
converter = Conversion()

# Example usage
decimal_number = 10

# Decimal to Binary
binary_representation = converter.decimal_to_binary(decimal_number)
print(f"Binary representation: {binary_representation}")

# Binary to Decimal
decimal_result = converter.binary_to_decimal(binary_representation)
print(f"Decimal result: {decimal_result}")

Methods

  • decimal_to_binary(number) Converts a decimal number to binary.

  • decimal_to_octal(number) Converts a decimal number to octal.

  • decimal_to_hexadecimal(number) Converts a decimal number to hexadecimal.

  • binary_to_decimal(number) Converts a binary number to decimal.

  • binary_to_octal(number) Converts a binary number to octal.

  • binary_to_hexadecimal(number) Converts a binary number to hexadecimal.

  • octal_to_decimal(number) Converts an octal number to decimal.

  • octal_to_binary(number) Converts an octal number to binary.

  • octal_to_hexadecimal(number) Converts an octal number to hexadecimal.

  • hexadecimal_to_decimal(number) Converts a hexadecimal number to decimal.

  • hexadecimal_to_binary(number) Converts a hexadecimal number to binary.

  • hexadecimal_to_octal(number) Converts a hexadecimal number to octal.

License

This project is licensed under the MIT License.

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

bindecocthex-0.4.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

bindecocthex-0.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file bindecocthex-0.4.tar.gz.

File metadata

  • Download URL: bindecocthex-0.4.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for bindecocthex-0.4.tar.gz
Algorithm Hash digest
SHA256 d5fda9eb24fda19db6ccb9fdf6d0dcceb92df5ed0a7fa66872a44f67f5d1de45
MD5 763e795bb2d76c7d4869d3fdf1590b51
BLAKE2b-256 292e3a80f4c95a14d6db60a042b9975c89a50ae9a34a8ef62776bb4ae932a15d

See more details on using hashes here.

File details

Details for the file bindecocthex-0.4-py3-none-any.whl.

File metadata

  • Download URL: bindecocthex-0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for bindecocthex-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 16de77e7471a8ab095cdd00ddbb1ef6e89e342ac8c9621dcbe42ddfc5a2d6f82
MD5 c4b1a12cca02cc46a199048b94344309
BLAKE2b-256 cfbc4283a90337e0de15a3cb5c56156f34964e2d36a5e0b9a61fba31cddf6a05

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