using functions

Total copy paste change on this commit. Moved the conversion set out of the main() function and placed it into a function all by itself called binary().