Skip to main content

No project description provided

Project description

code-binary-system

Esto lo he hecho con fines educativo cuando estaba en clases de Arquitectura del Computador y quise realizar mi propio algoritmo.

Te permite convertir números decimales a binarios y viceversa.

Instalación

pip install binary_system

Uso

Para convertir un número decimal a binario, se puede llamar a la función number_to_binary() y proporcionar el número como argumento. La función devolverá una cadena de texto que representa el número en su forma binaria.

from binary_system import Binary

binary = Binary()
result = binary.number_to_binary(10) # Convierte el número 10 a binario
print(result) # Imprime "1010"

Para convertir un número binario a decimal, se puede llamar a la función binary_to_number() y proporcionar la cadena de texto binaria como argumento. La función devolverá el número decimal correspondiente.

from binary_system import Binary

binary = Binary()
result = binary.binary_to_number('1010') # Convierte la cadena de texto "1010" a decimal
print(result) # Imprime "10"

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

binary_system-0.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

binary_system-0.0.1-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file binary_system-0.0.1.tar.gz.

File metadata

  • Download URL: binary_system-0.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for binary_system-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ad3e66aea933af9fe4fa8d19d511f19015f1779c2aa461a2cde18f78ecd6c8c2
MD5 56934ac4caf4373c5595c3e8f4c6a58b
BLAKE2b-256 603902168978a1a4455ac6277eb87435a326460936bf810583b961d75ba60ab8

See more details on using hashes here.

File details

Details for the file binary_system-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for binary_system-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c82fbcca8fa8de8e6910cfba93cbd364d1c69e0b75cd2843c94187475dfcdf6
MD5 4faad35313f3d4f725e998c93e26c8f2
BLAKE2b-256 30f9a7e3cfbce62b39ed2ab44d8d543c4f3a865650b03544affb8b51457fe68e

See more details on using hashes here.

Supported by

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