The number 1234.456 is a real number, as opposed to an integer or whole number. Converting a real number to a binary number can only be achieved when the real number is an exact power of 2. Unfortunately, 1234.456 is not an exact power of 2 and therefore cannot be accurately converted to binary.
Converting integers to binaryThe integer portion, 1234, is easily dealt with as all decimal integers can be represented accurately in binary. We convert the integer portion to its binary equivalent by repeatedly dividing by 2 and placing the remainder (which can only be 0 or 1) in right-to-left order (least-significant to most-significant).So we have:
Therefore 1234 in binary is:
100110100102
Converting fractions to binaryThe fractional portion is not so easily dealt with because 0.456 is not an exact power of 2. To understand why, consider that the digits following a decimal point represent decreasing powers of 10; tenths, hundredths, thousandths, and so on. In other words, 0.45610 means four tenths, five hundredths and six thousandths in decimal.
But in binary, the digits following a binary point are decreasing powers of 2. Thus the first digit after a binary point represents halves, the next represents quarters, then eighths, sixteenths, and so on. Therefore a binary number such as 0.112 means three quarters (a half plus a quarter), or 0.75 in decimal.
If we attempt to convert .45610 into binary, we will get this far:
0.0111010010111100011010100111111011111001110110110010001011010000111001010110000001000001100010010011...2
The binary digits will begin to repeat into infinity at this point. This is not unlike trying to represent an irrational number like a third in decimal: 0.333...
To demonstrate this more clearly, let's work it out one step at a time. We begin with 0.456 and multiply by 2. If the result is greater than 1, we place a 1 after the binary point and subtract 1 from the result, otherwise we place a zero after the binary point. We then multiply the result by 2 and repeat until the result is zero.
Thus we have:
And we're back where we started.
In order to represent 1234.45610 in binary, we must use an approximation (just as 0.333 is an approximation for a third in decimal). The precision will depend on how many significant digits we wish to expose. If we allow 32-digit precision, then we can say that .45610 in binary is approximately:
0.011101001011110001101010011111102
Thus we can say that 1234.45610 in binary is (approximately):
10011010010.011101001011110001101010011111102
Converting binary to octalTo convert to octal, we simply group these binary digits into groups of three digits each (padding with a leading and trailing zeroes if necessary) and convert them to their decimal equivalent (which will always be digit in the range 0 to 7).
Thus 1234.456 in octal is (approximately):
2322.351361523748
In binary this number is equivalent to 11111000011 while in octal it is 3703
15173
Starting from the right hand end, take the digits in groups of 3 and convert each group to its octal equivalent (which for this task will always be the same as decimal). eg 110 is octal 6
You can use the Windows calculator to do the conversions. If you want to learn how to do it yourself:To convert binary to decimal, multiply the right-most digit with 1, the second digit (from the right) with 2, the third with 4, etc.To convert to octal, group the bits from the right to the left, in groups of 3. Convert each group to a decimal digit.
Octal 76 = 111110
Octal = 52746757 Binary = 101010111100110111101111
1470 octal = 001 100 111 000 binary
In binary this number is equivalent to 11111000011 while in octal it is 3703
Don't. 889 is not an octal number.
1111111010 = octal 1772
221122: Binary = 1000100001000100100010 Octal = 10410442 Decimal = 2232610
10111001100001000
fdfd
134.105
15173
You must first convert them to a common base. For example, convert all to binary.
128 is not a valid octal number. Please restate the question.