pyinterconvert

A simple tool for interconversion between binary, decimal, octal and hexadecimal


Keywords
Converter
License
MIT
Install
pip install pyinterconvert==0.1.5

Documentation

PyInterconvert

A simple tool for interconversion of binary, decimal, hexadecimal and octal

Do pip install pyinterconvert in shell to use

Current functions

  • BinToDec
  • BinToOct
  • BinToHex
  • DecToBin
  • DecToOct
  • DecTohex
  • HexToBin
  • OctToBin

For other Hexadecimal and Octal conversions the given functions can be used together as follows:-

BinToDec(HexToBin(arg)) #Hexadecimal to Decimal
BinToOct(HexToBin(arg)) #Hexadecimal to Octal
BinToDec(OctToBin(arg)) #Octal to Decimal
BinToHex(OctToBin(arg)) #Octal to Hexadecimal

Arg is of type string

Sample Usage

from pyinterconvert import ConvClient

c = ConvClient

print(c.BinToOct(1010101))
#prints 125

Please note that it is ConvClient and not ConvClient()