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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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