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
Release history Release notifications | RSS feed
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.1.tar.gz
(2.3 kB
view details)
Built Distribution
bin2-0.0.1-py3-none-any.whl
(2.5 kB
view details)
File details
Details for the file bin2-0.0.1.tar.gz
.
File metadata
- Download URL: bin2-0.0.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 |
31ae2fe6165d239e970e37b92b5db3965cadd567d0c94d7232416e593ddc3965
|
|
MD5 |
ead6b41b7ff7cefa91b595139746f97d
|
|
BLAKE2b-256 |
13566b2f3d7c14a557ff9581f909c9bb7dc74600721de2d0982b2300473be6d1
|
File details
Details for the file bin2-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: bin2-0.0.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 |
c97e91a7c433a5c5d02bc11f599a1a61826dc4da38f62e100e3bdaa7aa7e3bc3
|
|
MD5 |
91b5b65d93bf2179644e90e72e82b4e1
|
|
BLAKE2b-256 |
974a39ae9ed4c2a541d73453c8796658c1a875ba112bd1bb8c2ea852b49d78d8
|