Computer Science, asked by sreejabanerjee09, 10 months ago

an algorithm to convert a decimal number to its binary equivalent. Urgent!

Answers

Answered by tanushka71
0

Answer:

The answer is an algorithm called “ Divide by 2 ” that uses a stack to keep track of the digits for the binary result. The Divide by 2 algorithm assumes that we start with an integer greater than 0. A simple iteration then continually divides the decimal number by 2 and keeps track of the remainder.

Answered by rekhakhandal469
11

An easy method of converting decimal to binary number equivalents is to write down the decimal number and to continually divide-by-2 (two) to give a result and a remainder of either a “1” or a “0” until the final result equals zero.Divide by 2 ” that uses a stack to keep track of the digits for the binary result. The Divide by 2 algorithm assumes that we start with an integer greater than 0. A simple iteration then continually divides the decimal number by 2 and keeps track of the remainder.

HOPE IT HELPS...

STAY HOME STAY HEALTHY...

Similar questions