answersLogoWhite

0


Best Answer

#include #include
void main()
{
int a[20],b,c,d,i=0;
printf("Enter a decimal no. to convert it into binary no.");
scanf("%d",&b);
c=b;
while(b>0)
{
d[i]=b%2;
i++;
b=b/2;
}
i--;
printf("\nBinary equivalent of decimal no. %d is ",c);
while(i>=0)
{
printf("%d",d[i]);
i--;
}
getch();
}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

16y ago

In words:- All binary numbers can be found from base 10 by inserting 1 for any power of 2 and zero for any powers of two that are absent.

For example:- write down the series of 2 to power n to help:-

1,2,4,8,16,32,64,128,256.........

so to find 93 we have 64 + 0x32 + 16 +8 +4 + 0x2 +1 giving 1011101

I would have to give this a bit more thought as to how to set this out as a mathematical instruction but it is easy to see the logic from the above.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Repetitively divide by 2, then take the remainder (either a 0 or 1) as the digit. Example:

19 (base 10).

  • 19/2 = 9 remainder 1 (this is the least significant digit)
  • then 9/2 = 4 remainder 1.
  • 4/2 = 2 remainder 0.
  • 2/2 = 1 remainder 0.
  • 1/2 = 0 remainder 1.

So 10011 is equivalent to 19. Check arithmetic: 10011 --> 16 + 2 + 1 = 19. Try one more 25:

  • 25/2 = 12 remainder 1.
  • 12/2 = 6 remainder 0.
  • 6/2 = 3 remainder 0.
  • 3/2 = 1 remainder 1.
  • 1/2 = 0 remainder 1.

So 11001 base 2 is 25 base 10. Check: 11001 --> 16 + 8 + 1 = 25.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Decimal numbers into their equivalent binary numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Convert the following decimal numbers into their equivalent binary numbers and then convert the resulting binary numbers back into the decimal numbers a. 6401 b. 1010110?

a) 6401 in Binary is 1100100000001b) 1010110 in decimal is 86


Convert 186 decimal numbers to its binary equivalent?

Convert 189 to binary number


Which of the following binary numbers is the equivalent of the decimal number 206?

206 = 11001110


Convert the decimal numbers 1987 to binary then to octal?

In binary this number is equivalent to 11111000011 while in octal it is 3703


What decimal number is equivalent to binary number 121?

That's not a binary number ! Binary numbers can only use the digits 1 and 0.


What is the binary equivalent of the decimal number 131?

The binary equivalent of the decimal number 131 is 10000011.


What is the binary equivalent of the decimal number 14?

The binary equivalent of the decimal number 14 is 00001110.


Decimal 4 is binary equivalent to?

Decimal 4 is binary 100.


What is 1101 in binary form?

If 1101 is a decimal number, then its binary equivalent is 10001001101. If 1101 is a binary number, then its decimal equivalent is 13.


What is the binary equivalent hexa number of AB5D base 16?

The binary equivalent would be... 1010101101011101 - There is a multi-functional calculator built-in to Windows which can covert numbers between Hex, Decimal, Octal and Binary.


Which binary number is equivalent of the decimal number 208?

11010000 is the equivalent binary representation of the decimal number 208.


What is the binary equivalent of 47?

The binary equivalent of the decimal number 47 is 101111.