You should use Google to find such answers. There are 1000’s of pages on Delphi.
So you want to change ‘x’, for example into it’s ASCII equivalent?
This is basic delphi/pascal.
Use Ord(‘A’) = 65, to reverse it use Chr(65) = ‘A’
http://www.delphibasics.co.uk/ is a good website for basic delphi. http://delphi.about.com/ is also has very interesting topics.