2018-10-13 21:30:51 C language
Binary, octal, and 16-in: 1) Integral parts
Decimal integers are converted to n-ary integers using the "n-remainder, reverse-order" method.
Decimal number 36926 converted to octal?
110076
2) Number of decimal parts
Decimal decimals are converted into n decimal fractions using the "multiply N rounding, ordered" method.
Decimal decimal 0.930908203125 converted to octal decimals?
0.7345
If a number contains both an integer part and a fractional part, then separate the integer and fractional parts, complete the conversion according to the method above, and then merge together.
Note: When you convert decimal decimals to other decimal fractions, the result may be an infinite number of decimal places.
Example: 0.51
Summary: Other conversions into decimal---------------------------> Add by Weights, decimal to other binary---------------------------------> integer part (except N, In reverse order), fractional parts (multiply N rounded, ordered), if this decimal contains fractional and integral portions, the results of the two operations are added.
2018-10-13 21:30:51 Conversion of number systems