100 in base two equals 4 in base 10
1*(2^2)+0*(2^1)+0*(2^0)=2^2=4
Chat with our AI personalities
4
this isn't the fact that the binary number 11 will have decimal equivalent 11... instead it have decimal number 1011 for decimal equivalant 11.here is the alogorithms for converting the decimal number to binary equivalent...!!!#include#includevoid main(){ int i,n,j,b[100];clrscr();printf("Enter a Number:");scanf("%d",&n);i=0;while(n>0){b[i]=n%2;n=n/2;i++;}printf("\n\nBinary Equivalent:");j=i-1;for(i=j;j>=0;j--)printf("%d",b[j]);getch();}using this algorithms... the binary equivalent of any number is taken out...!!! enjoy... have any query... email at :- "devilllcreature@yahoo.com" thank you....!!!
First lets start with some basic concepts. We normall use base 10 (0 through 9); Binary or Base 2 uses 1's and 0's. In base 10 the place values are based on 10 ( ie 14 means one set of 10 + 4); in binary the place values are based on 2. 2 would be represented as 10 in binary, 4 would be represented as 100 in binary, 5 would be represented as 101 in binary. Applying this to 14 results in one set of 8 + one set of 4 plus one set of 2, which gives us 1110 which is 14 in binary.
55. 101 in binary is 5. there is a shortcut in getting the equivalent in binary. 421 if it is 1, then it's 001. if it is 2, then it's 010. if it is 3, then it's 011. if it is 4, then it's 100. if it is 5, then it's 101. see? you just have to add the numbers that you need. you'll write 1 when you used the number that is needed and 0 when not.
100