98.9k views
3 votes
B. Convert decimal number to binary number (show your solution ) 987

1 Answer

4 votes

Final answer:

To convert decimal number 987 to binary, use the division-by-2 algorithm. Divide the decimal number by 2 and write down the remainders as the binary digits until the quotient becomes 0. Read the remainders from bottom to top to find the binary representation.

Step-by-step explanation:

To convert a decimal number to binary, we can use a method called the division-by-2 algorithm. Here's how it works:

  1. Start by dividing the decimal number by 2.
  2. Write down the remainder (either 0 or 1) as the rightmost digit of the binary number.
  3. Continue dividing the quotient from the previous step by 2, writing down each remainder as the next digit of the binary number.
  4. Repeat this process until the quotient becomes 0.
  5. Read the binary number from right to left to find the binary representation of the decimal number.

Let's apply this method to the decimal number 987:

  1. Divide 987 by 2. The quotient is 493 and the remainder is 1.
  2. Divide 493 by 2. The quotient is 246 and the remainder is 1.
  3. Divide 246 by 2. The quotient is 123 and the remainder is 0.
  4. Divide 123 by 2. The quotient is 61 and the remainder is 1.
  5. Divide 61 by 2. The quotient is 30 and the remainder is 1.
  6. Divide 30 by 2. The quotient is 15 and the remainder is 0.
  7. Divide 15 by 2. The quotient is 7 and the remainder is 1.
  8. Divide 7 by 2. The quotient is 3 and the remainder is 1.
  9. Divide 3 by 2. The quotient is 1 and the remainder is 1.
  10. Divide 1 by 2. The quotient is 0 and the remainder is 1.

Reading the remainders from bottom to top, we get the binary representation of 987, which is 1111011011.

User Samg
by
9.0k points