Skip to main content

Get 2' complemnt form of a integer

Project description

bin2(): get 2's complement form of an integer

The Python builtin function bin() gives the binary literal form of an integer. But Python uses 2's complement inside for integers. This module provide bin2() to produce 2's complement form of an integer.

>>> from bin2 import bin2
>>> bin2(-5)
0b1011

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

bin2-0.0.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

bin2-0.0.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file bin2-0.0.0.tar.gz.

File metadata

  • Download URL: bin2-0.0.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2

File hashes

Hashes for bin2-0.0.0.tar.gz
Algorithm Hash digest
SHA256 e77bcff4db16599ad75212df3666179e3f27ec943c3a78b5b165c8bfa90394f5
MD5 cc13e288de0fa8272aadce3988c4dc44
BLAKE2b-256 fb3ba64ef0273c877448d7f120e9924045e696d0bb66a422b1828bdd42983e62

See more details on using hashes here.

File details

Details for the file bin2-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: bin2-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2

File hashes

Hashes for bin2-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ecc58b43977e757dddd149c4d56326b68e2dd897b385397f5348890e087b721
MD5 29ec7ca9dca2e2ff6cd68881753d3a64
BLAKE2b-256 f1edfa656bc08fca9ee88e308d4e26b98b539e4746a6254f7bbe41172a9ed4d1

See more details on using hashes here.

Supported by

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