wrote binary-decimal converter