This is the implementaton of BCD operations using C code.