Every digit in a binary number corresponds to power of two. So 0001 0101 is equal to 0*2^7 + 0*2^6 + 0*2^5 + 1*2^4 + 0*2^3 + 1*2^2 + 0*2^1 + 1*2^0, which equals 0+0+0+16+0+4+0+1, which equals 21.
Chat with our AI personalities
First you have to break it down into a base of 10 like so:
(10000001)2= (1x107)+(0x106)+(0x105)+(0x104)+(0x103)+(0x102)+(0x101)+(1x100)
Next you convert the base 10 into 2 (just replacing each 10 you see above with a 2) and carry out the equation:
(1x27)+(0x26)+(0x25)+(0x24)+(0x23)+(0x22)+(0x21)+(1x20)
= (129)10
129 should be your answer
write a c++ program to convert binary number to decimal number by using while statement
All I know is that when a number is negative, you convert the decimal into binary and if it is negative you put 1111 before the binary digits.
Write algorithms and draw a corresponding flow chart to convert a decimal number to binary equivalent?
The number 4693 in binary is 1001001010101
The number 6 in binary is 110