Starting at the right with the "ones", the value of each successive place doubles. So: 1, 2, 4, 8, 16 etc. The value of the place is either 0 x that number or 1 x that number. You figure out the value of each place and add them up.
So you have:
0 x 1 =0
0 x 2 =0
1 x 4 =4
1 x 8 =8
1 x 16 =16
0 x 32 =0
1 x 64 =64
1 x 128 =128
1 x 256 =256
0 x 512 =0
0 x 1024 =0
1 x 2048 =2048
0 x 4096 =0
1 x 8192=8192
_______+_____
10716
to convert 10101111 start from least significant digit and multiply each digit of binary number by 2^(n){where n=0,1,2,3,4.....} and add the number calculated. The number obtained after addition is the equivalent decimal number. ex.- for 10101111 1*(2^7)+0*(2^6)+1*(2^5)+0*(2^4)+1*(2^3)+1*(2^2)+1*(2^1)+1*(2^0) = 175
The number 4693 in binary is 1001001010101
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.
The number 6 in binary is 110
The binary values is 10110101.
write a c++ program to convert binary number to decimal number by using while statement
170
The binary number 10101010 is equivalent, in decimal representation, to 128 + 32 + 8 + 2 = 170. But this answer assumes that the given number is binary - an assumption for which there is no real justification. Besides, the relationship is an equivalence, which is not quite "the same thing".
Decimal: 170Hex: AA
The decimal equivalent of the binary number 1111111111111111 is 65535.
That is 31 in decimal
The binary number 1111 = 15
13
45
110001.01
10
15 = 1111
Conversion of binary numbers is turning a binary number (base 2) into a number with a different base. For example, the binary number 10101010 can be converted into decimal in the following way: 1 X 27 + 0 X 26 + 1 X 25 + 0 X 24 + 1 X 23 + 0 X 22 + 1 X 21 + 0 X 20 = 128 + 0 + 32 + 0 + 8 + 0 + 2 + 0 = 170