Skip to content
/ bin2 Public

Python module to get 2's complement form of an integer

License

Notifications You must be signed in to change notification settings

codemee/bin2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Python module to get 2's complement form of an integer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages