How do I transform the motor steps of two motors of a 2WD robot into X/Y coords?

I have a robot with two motors A and B connected to wheels 21.6mm in diameter. The motors move in steps, and there are twenty steps for each complete revolution of the wheel. To make the robot move forwards, I turn on A and B in the forward direction and have it rotate a number of steps. To make it move backwards, I turn on A and B in the reverse direction. To get it to turn left, I turn on A and turn off B. Similarly to get it to turn right, I turn off A and turn on B. Using this scheme, I can get the robot to move in any direction.

My question is this: is it possible to transform the steps of motor A and motor B into the X/Y coordinates for the robot? For example, if I move the robot forward 10 steps, turn right 10 steps and move forwards again 10 steps can I calculate the X/Y coordinates of the robot?

I should have consulted Google first before posting a question here. Apparently, determining the X/Y location of a robot using the wheel encoders is called "dead reckoning". There's an article and some easy to understand C code that performs the function:

The author mentions the fact that he gets reasonably accurate results on hard floors, but carpeted floors cause drift.