i did it.
i've written code on EMU8086 with detailed comments.(moreover this will be work with more digits if you want)
can you pay via paypal(or trough site, if you don't have)?
PS:
Hi, i have experience in C,Delphi,Php,Perl , Asm x86 and etc, also , i have big experience in reverse engineering (OllyDbg,IDA Pro,Softice, Hiew and etc),can make keygen,loaders,patch,registration,extract some algoritms from programs,insert some code in program without recomplitaion,unpack and pack programs. Total experience of more than 8 years, i have all instruments and knowledge for solve your problem. write me in pm or in skype : wu_zong1