Computer Science, asked by paribusiness092, 5 months ago

how to convert decimal to binary explain the algorithm​

Answers

Answered by BihariLadki
3

Answer:

Decimal to Binary Conversion Algorithm

Step 1: Divide the number by 2 through % (modulus operator) and store the remainder in array.

Step 2: Divide the number by 2 through / (division operator)

Step 3: Repeat the step 2 until number is greater than 0.

Answered by cheerfulGirl
0

Explanation:

  1. Divide the number by 2.
  2. Get the integer quotient for the next iteration.
  3. Get the remainder for the binary digit.
  4. Repeat the steps until the quotient is equal to 0.
Similar questions