The basic way of doing it with pencil and paper.
# Write down "0." (i.e. "zero point") # Start with n=-1 and your number x # If 2^n > x, then decrement n, and write down a "0". Keep repeating until 2^n < x. # Let x = x - 2^n, and decrement n. # If x is 0, you're done. Otherwise, return to step 3. Here's an infinite example, converting 0.7 to a decimal
# At step 1. We have written down "0." # At step 2. n=-1, x=0.7. # At step 3. 2^-1 = 0.5, which is less than x (now 0.7)
# At step 4. Let x = 0.7 - 0.5 = 0.2. Decrement n to -2. We have written down "0.1" # At step 5. x is not 0, so we return to step 3. # At step 3. 2^-2 = 0.25, which is greater than x (now 0.2). Decrement n to -3. We have written down "0.10"
# At step 3. 2^-3 = 0.125, which is less than x (now 0.2). # At step 4. Let x = 0.2 - 0.125 = 0.075. Decrement n to -4. We have written down "0.101". # At step 5. x is not 0, so we return to step 3. # At step 3. 2^-4 = 0.0625, which is less than x (now 0.075). # At step 4. Let x = 0.075 - 0.0625 = 0.0125. Decrement n to -5. We have written down "0.1011". # At step 5. x is not 0, so we return to step 3. # At step 3. 2^-5 = 0.03125, which is greater than x (now 0.0125). Decrement n to -6. We have written down "0.10110". # At step 3. 2^-6 = 0.015625, which is still greater than x. Decrement n to -7. We have written down "0.101100". # At step 3. 2^-7 = 0.0078125, which is less than x (now 0.0125). # At step 4. Let x = 0.0125 - 0.0078125 = 0.0046875. Decrement n to -8. We have written down "0.1011001". # At step 5. x is not 0, so we return to step 3. # Et cetera ad nauseum
The simplest way to convert a fraction to a decimal is to get the denominator to equal 100. To do this, simply divide 100 by the denominator you have, e.g. 17/20 so you would divide 100 by 20 giving you an answer of 5. You now multiply the numerator and the denominator by 5, so you would end up with 85/100. The decimal would therefore be 0.85.
Although, in fractions this symbol, / , simply means divide. So you could use your calculator to figure out say 61/73 (61 divided by 73), which the answer would be 0.835616438 etc.
Hope that helped.
Converting from binary to decimal:
1. Write the binary digits in a column, least-significant bit first. Thus 10110100 would be written:
0 < least-significant bit
0
1
0
1
0
1
1 < most-significant bit
2. Multiply each digit by increasing powers of 2, starting with 2^0:
0 x 2^0 = 0 0 x 2^1 = 0
1 x 2^2 = 4
0 x 2^3 = 0
1 x 2^4 = 16
0 x 2^5 = 0
1 x 2^6 = 64
1 x 2^7 = 128
3. Sum the products:
128 + 64 + 0 + 16 + 0 + 4 + 0 + 0 = 212
Thus 10110100 binary is 212 decimal.
To reverse the process, repeatedly divide by 2 and take the remainder. Thus to convert 212 decimal to binary:
212 / 2 = 106 r 0
106 / 2 = 53 r 0
53 / 2 = 26 r 1
26 / 2 = 13 r 0
13 / 2 = 6 r 1
6 / 2 = 3 r 0
3 / 2 = 1 r 1
1 / 2 = 0 r 1
Read the remainders in reverse order (bottom up): 11010100
write the binary number
just below binary number digit write their place value such as 1,2,4,8,16,32,64......... starting from right to left.
in case zero appears in the last position , ignore the decimal value for that position
to get decimal equivalent add the remaining weights.
for example 111.101
Binary number 1 1 1 . 1 0 1
Place value of
decimal position 22 21 20 . 2-1 2-2 2-3
4 2 1 1/2 1/4 1/8
k n o w ? First convert it to ASCII code ... 107 110 111 119 (all decimal numbers) Then convert to binary : 1101011 1101110 1101111 1110111
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?
It is a decade counter with a binary to decimal translator meaning it can take binary and turn it into decimal numbers for example a seven segment display
110.101 is already a decimal number. Unless that is intended to be two binary numbers with a decimal point between them for some reason. (decimal points are not used to represent fractional numbers in the binary system).
a) 6401 in Binary is 1100100000001b) 1010110 in decimal is 86
Convert 189 to binary number
An easy way is to convert them to decimal, subtract, then convert the answer back to binary.
1001 base 2 = 9 base 10
easy, 1011. in binary of course. convert 1011 binary to decimal you get 11.
Steps to convert fractional decimal to binary: 1.Multiply the number fractional part) successively by 2 and note the integer part of product. 2.Repeat the process till the fractional part becomes 0 or required accuracy is reached. 3.Binary equivalent of fractional part are the carries i.e. integer which is noted separately. Write down these carries from top to bottom. e.g. Conversion of 0.75 to binary 0.75*2=1.50 1 0.50*2=1.00 1 ans==> (0.11)
In binary this number is equivalent to 11111000011 while in octal it is 3703
The answer depends on what you are converting from: binary, ternary, octal, hexadecimal ...
If you want to add numbers in different bases, in this case decimal and binary, or do any other calculation that involves different bases for that matter, you have to convert all numbers to a single system first - for example, all to decimal. Then you can do the operation. It is really up to you in what base you represent the final answer. In this example, you can convert back to binary, for example.
Just use the Windows calculator, and set it to scientific mode, or use any scientific calculator that supports binary/decimal. In the Windows calculator, make sure you are in decimal, type in each of the four numbers, then select "Binary" to convert to binary. You will have to fill out some of the binary numbers with zeroes to the left (each one must have 8 binary digits).Just use the Windows calculator, and set it to scientific mode, or use any scientific calculator that supports binary/decimal. In the Windows calculator, make sure you are in decimal, type in each of the four numbers, then select "Binary" to convert to binary. You will have to fill out some of the binary numbers with zeroes to the left (each one must have 8 binary digits).Just use the Windows calculator, and set it to scientific mode, or use any scientific calculator that supports binary/decimal. In the Windows calculator, make sure you are in decimal, type in each of the four numbers, then select "Binary" to convert to binary. You will have to fill out some of the binary numbers with zeroes to the left (each one must have 8 binary digits).Just use the Windows calculator, and set it to scientific mode, or use any scientific calculator that supports binary/decimal. In the Windows calculator, make sure you are in decimal, type in each of the four numbers, then select "Binary" to convert to binary. You will have to fill out some of the binary numbers with zeroes to the left (each one must have 8 binary digits).
25 and nothing that had a decimal point well the number 369.3125 decimal. to convert to binary it worked fine the whole number 369 by justnumber by just dividing the desired base so since i wanted binary