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.0.tar.gz
(2.3 kB
view hashes)
Built Distribution
bin2-0.0.0-py3-none-any.whl
(2.5 kB
view hashes)