Skip to content

namanko/pyinterconvert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyInterconvert

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

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

Releases

No releases published

Packages

No packages published

Languages