Computer Science, asked by shamali7982, 1 year ago

what are the binary equivalent of the decimal numbers 7,20,31,64

Answers

Answered by SushmitaAhluwalia
6

To convert decimal numbers to binary, we divide the number by 2 and take the next quotient for the next iteration.

a.

7 is 111 in binary.

\frac{7}{2}= > 3 / 1 remainder

\frac{3}{2}= > 1/1remainder

\frac{1}{2}= > 0/1remainder

So,

The binary value of 7 is 111.

b.

20 is 10100 in binary.

\frac{20}{2}= > 10/0remainder

\frac{10}{2}= > 5/0remainder

\frac{5}{2}= > 2/1remainder

\frac{2}{2}= > 1/0remainder

\frac{1}{2}=0/1remainder

Taking the remainders in reverse order, we get the binary value of 20 as 10100.

c.

31 is 11111 in binary.

\frac{31}{2}= > 15/1remainder

\frac{15}{2}= > 7/1remainder

\frac{7}{2}= > 3/1remainder

\frac{3}{2}= > 1/1remainder

\frac{1}{2} = > 0/1remainder

So, the binary value of 31 is 11111.

d.

64 is 1000000 in binary.

\frac{64}{2}= > 32/0remainder

\frac{32}{2}= > 16/0remainder

\frac{16}{2}= > 8/0remainder

\frac{8}{2}= > 4/0remainder

\frac{4}{2}= > 2/0remainder

\frac{2}{2}= > 1/0remiander

\frac{1}{2}= > 0/1remainder

Taking the remainders in inverse order, we get the binary value of 64 as 1000000.

Similar questions
Math, 7 months ago