You convert binary numbers with a binary point into octal then same way you convert any number with a point in any other base to any other base.
Multiply or divide the number by its base until it is an integer, remembering how many times you multiplied or divided.
Iteratively divide the number by the new base, using the rules of arithmetic of the old base, recording the remainders, until the result is zero.
Represent the number in its new base by using the remainder in reverse order.
Divide or multiply the new number by the old base the same number of times you originally multiplied or divided it when you scaled it into an integer, using the rules of arithmetic of the new base. You are done.
Now, it turns out that converting binary to octal is easy and can be done on sight, because dividing by 10002 is the same as right shifting by three, and you don't have to prescale to an integer. Take the number 1101011.10011012. Simply group it into groups of three bits, starting at the binary point, giving you 001 101 011.100 110 1002. Note that I padded on the left and right with zeroes. Now you can convert by sight into octal. The result is 1534.4648.
It's a tricky area: Decimal numbers can be represented exactly. In contrast, numbers like 1.1 do not have an exact representation in binary floating point. End users typically would not expect 1.1 to display as 1.1000000000000001 as it does with binary floating point. The exactness carries over into arithmetic. In decimal floating point, 0.1 + 0.1 + 0.1 - 0.3 is exactly equal to zero. In binary floating point, the result is 5.5511151231257827e-017. While near to zero, the differences prevent reliable equality testing and differences can accumulate. For this reason, decimal is preferred in accounting applications which have strict equality invariants. So you have to be carefull how you store floating point decimals in binary. It can also be used in a fraction. It must be simplufied then reduced and multiplied.
Fixed point number usually allow only 8 bits (32 bit computing) of binary numbers for the fractional portion of the number which means many decimal numbers are recorded inaccurately. Floating Point numbers use exponents to shift the decimal point therefore they can store more accurate fractional values than fixed point numbers. However the CPU will have to perform extra arithmetic to read the number when stored in this format. Fixed point number usually allow only 8 bits (32 bit computing) of binary numbers for the fractional portion of the number which means many decimal numbers are recorded inaccurately. Floating Point numbers use exponents to shift the decimal point therefore they can store more accurate fractional values than fixed point numbers. However the CPU will have to perform extra arithmetic to read the number when stored in this format.
point, based and place value
The whole point of a nominal variable is that is has no numerical value associated with it. With a binary measure you can allocated the values 1 and 0 or +1 and -1 for observations where the attribute is present or absent. If there are more than 2 values that the nominal variable can take then you can allocate any numbers that you want but in all cases the numbers do not have a value: they are simply symbols which can help for sorting and for binary comparisons.
To convert the number 59 into a decimal, you simply write it as 59.0. This is because whole numbers are already considered decimals, with the decimal point being at the end of the number. So, 59 in decimal form is 59.0.
Binary is a base 2 number system, while octal is base 8. This happens to make conversion between binary and octal fairly trivial, although more complex than conversion to hexadecimal. To convert to octal from binary, take each three bits, starting from the least significant bit, and convert them to their octal equivalent. Examples: 25510 = 111111112 = 11 111 111 = 3778 17410 = 101011102 = 10 101 110 = 2568 You can repeat this process for as many bits as you need. A 24-bit number should translate into 8 octal numbers, for reference.
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
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 remainder is the numbers after a decimal point; sometimes used as repesenting in binary to get a binary number from a decimal number.
scanf
The same as real numbers are expressed in decimal, except only the digits 0 and 1 are used (instead of 0 to 9) and the separator between the integer and fraction part is called the binary point (instead of the decimal point). The sign if needed is the same as in decimal.
It would be a 30 second seminar. All that you need to translate Binary to Octal is take the binary number and group it into 3 bit groups starting with the LSB and assign the groups their equivlant Octal number. Binary = Octal 000 = 0 001 = 1 010 = 2 011 = 3 100 = 4 101 = 5 110 = 6 111 = 7 Example: 10100010111010011100001110110012 1 010 001 011 101 001 110 000 111 011 0012 = 121351607318 ...so 10100010111010011100001110110012 = 121351607318 If you were going to talk about translating between different numbering systems, you could put together a pretty nice seminar. Allowing for questions would be nice. Whatever you end up putting together, you have to stress the importance of Zero (0). It is the most important number in the translating from one numbering system to another, because it is the absolute starting point in all numbering systems. It is also the only common symbol in all numbering systems. Without the symbol for nothing, there would be no common reference point for conversion.
Each hexadecimal digit represent four binary bits. Using the table... 0 = 0000 1 = 0001 2 = 0010 3 = 0011 4 = 0100 5 = 0101 6 = 0110 7 = 0111 8 = 1000 9 = 1001 A = 1010 B = 1011 C = 1100 D = 1101 E = 1110 F = 1110 ... replace each hexadecimal digit with its correspnding binary digits. As an example, 37AB16 is 00110111101010112.
In the binary system the place values, going from right to left from the "decimal" point are: 20, 21, 22, 23 etc (that is 1, 2, 4, 8, ... )and to the right of the point are 2-1, 2-2, 2-3 etc (ie 1/2, 1/4, 1/8, ...). Similarly, in the octal system they are 80, 81, 82 etc going left, and 8-1, 8-2 etc to the right.
It's a tricky area: Decimal numbers can be represented exactly. In contrast, numbers like 1.1 do not have an exact representation in binary floating point. End users typically would not expect 1.1 to display as 1.1000000000000001 as it does with binary floating point. The exactness carries over into arithmetic. In decimal floating point, 0.1 + 0.1 + 0.1 - 0.3 is exactly equal to zero. In binary floating point, the result is 5.5511151231257827e-017. While near to zero, the differences prevent reliable equality testing and differences can accumulate. For this reason, decimal is preferred in accounting applications which have strict equality invariants. So you have to be carefull how you store floating point decimals in binary. It can also be used in a fraction. It must be simplufied then reduced and multiplied.
The first step is to use a function to convert the number (integer, floating point or otherwise) into a string. The next step is to convert each character within that string to its binary equivalent. Converting an unsigned char to binary will require the use of bitwise operators, specifically &, << and >>. There are plenty of code snippets on the Web that show you how to accomplish this task, however it might be worth your while to work it out on paper first and then write the code. The best recommendation at this point is to explore bitwise operators in C and understand how binary math works. You'll likely find many uses for this knowledge in the future.
Type your answer here... the Z1 was used for tracking the Binary floating point numbers.