As always, Welcome to the forums!
Well, can you explain your problem? As far as i am aware, there isn't an ASCII form of 2da to convert into Binary? If you mean from XML then look at KotOR Tool:
http://kotortool.starwarsknights.com/)
It has many tools built-in to convert/edit the different file types. For 2da you would click on the "2da" shortcut or: "Tools -> Open 2da File Editor", or press "Ctrl+D2".
Then click "load 2DA 2.b (XML) File..." and select your XML 2da file. Then press "Save as 2DA 2.b..." or press Ctrl+S.