Tuesday, January 17, 2006

First Project

I completed the first version of my first project, which converts cell-phone electronic serial numbers (ESNs) from hexadecimal format to decimal format and back again.

ESNs start with a one byte manufacturer code, which is the first two hexadecimal digits of the eight digit hexadecimal representation and the first three digits of the eleven digit decimal version. ESNs end with a three byte serial number which is the last six hexadecimal digits of the eight digit hexadecimal representation and the last eight digits of the eleven digit decimal version.

Thus the conversion must split the ESN into two parts, convert each part separately, pad both parts to the correct length by prepending zeros, and than join the two parts together.

The first enhancement to this program is to detect when each part of the decimal ESN is too large.

0 Comments:

Post a Comment

<< Home