Sorted part of decimal2binary algorithm but result is in reverse. Need to reverse the String before returning from method