135k views
3 votes
Convert to binary:
a. 156
b. 12.34375

User IRHM
by
7.4k points

1 Answer

3 votes

Final answer:

To convert a decimal number to binary, you need to divide the number by 2 repeatedly and record the remainder. The remainders, read from bottom to top, will give you the binary representation of the number.

Step-by-step explanation:

To convert a decimal number to binary, you need to divide the number by 2 repeatedly and record the remainder. The remainders, read from bottom to top, will give you the binary representation of the number.

a. To convert 156 to binary:

  • 156 ÷ 2 = 78, remainder 0
  • 78 ÷ 2 = 39, remainder 0
  • 39 ÷ 2 = 19, remainder 1
  • 19 ÷ 2 = 9, remainder 1
  • 9 ÷ 2 = 4, remainder 1
  • 4 ÷ 2 = 2, remainder 0
  • 2 ÷ 2 = 1, remainder 0
  • 1 ÷ 2 = 0, remainder 1

So, 156 in binary is 10011100.

b. To convert 12.34375 to binary:

  • 12 ÷ 2 = 6, remainder 0
  • 6 ÷ 2 = 3, remainder 0
  • 3 ÷ 2 = 1, remainder 1
  • 1 ÷ 2 = 0, remainder 1

The integer part becomes 1100 in binary. For the fractional part, you multiply it by 2 repeatedly and record the integer part. The integer parts, read from top to bottom, will give you the binary representation of the fractional part.

0.34375 × 2 = 0.6875 (integer part: 0)

0.6875 × 2 = 1.375 (integer part: 1)

0.375 × 2 = 0.75 (integer part: 0)

0.75 × 2 = 1.5 (integer part: 1)

0.5 × 2 = 1 (integer part: 1)

So, 0.34375 in binary is 0.01011.

User Yeji
by
8.4k points

Related questions

asked Mar 12, 2024 66.9k views
Monksp asked Mar 12, 2024
by Monksp
8.3k points
1 answer
4 votes
66.9k views
asked Mar 2, 2024 188k views
Jszumski asked Mar 2, 2024
by Jszumski
8.1k points
2 answers
2 votes
188k views
asked May 3, 2020 205k views
Johannes Ferner asked May 3, 2020
by Johannes Ferner
8.2k points
2 answers
1 vote
205k views