Format the cell as "Custom", choosing 0 from the drop down menu, then click beside the 0 in the Type field and add three zeros. Click ok.
You will now have a 4 digit number. If you enter 1 in this cell, 0001 will appear.