Convert to and from multiple bases
Project description
BiHex
Simple binary to hexadecimal and backwards
How to use
from BiHex import *
To create an instance, use:
foo = Bihex("b10110100")
, where the letter behind the number is the base (2 = b, 8 = o, 10 = d, 16 = x)
To display the number in:
- decimal:
foo.returnnum("d")
, gives"180"
- binary:
foo.returnnum("b")
, gives"0b10110100"
- hexadecimal:
foo.returnnum("x")
, gives"0xB4"
- octal:
foo.returnnum("o")
. gives"0o264"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for bihex_domedi-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 894693c5364c926e2e38ff3ef7d1d71739de3b5b105f3664bf4fec589d0af887 |
|
MD5 | 8891014e0baf90f830218d78e2794d72 |
|
BLAKE2b-256 | 178d71963b0f22a2cf9835d3b7195570f644c5b7d262cf885b530fbbd47f6ca7 |