bug fixed

Several bug fixed and "binary" method introduced to convert decimal to
binary