Skip to main content

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"

Metadata

Release files for binary-system 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for binary-system 0.0.1
File Size Uploaded
binary_system-0.0.1.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for binary-system 0.0.1
File Interpreter ABI Platform
binary_system-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.0 kB

Release files / binary_system-0.0.1.tar.gz

Download URL binary_system-0.0.1.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ad3e66aea933af9fe4fa8d19d511f19015f1779c2aa461a2cde18f78ecd6c8c2
BLAKE2b-256 checksum
How to use checksums
603902168978a1a4455ac6277eb87435a326460936bf810583b961d75ba60ab8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / binary_system-0.0.1-py3-none-any.whl

Download URL binary_system-0.0.1-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c82fbcca8fa8de8e6910cfba93cbd364d1c69e0b75cd2843c94187475dfcdf6
BLAKE2b-256 checksum
How to use checksums
30f9a7e3cfbce62b39ed2ab44d8d543c4f3a865650b03544affb8b51457fe68e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page