Fixed the bugs in decimal to hex conversion. Current version is final and working version