Replace BCD2BIN and BIN2BCD macros with inline functions