convert input from binary format to decemal