Decimal integer to r integer
Decimal integers are converted into R series integers by the method of "r divided by remainder and arranged in reverse order". The specific method is: divide the decimal integer by r to get a quotient and remainder; If you divide the quotient by R, you will get a quotient and a remainder, and so on until the quotient is less than R. Then, the remainder obtained first is used as the low-order significant bit of the R-ary number, and the remainder obtained later is used as the high-order significant bit of the R-ary number, and they are arranged in turn.
Decimal to binary decimal
The method of converting decimal fraction into binary fraction is "rounding by R, in order". The specific method is: multiply the decimal part by r to get the product, take out the integer part of the product, multiply the remaining decimal part by r to get another product, then take out the integer part of the product, and so on until the decimal part in the product is zero or reaches the required accuracy.
37.25 to binary
37.25 is converted to binary, and r is 2. The integer part is: 37÷2= 18 remainder 1, 18÷2=9 remainder 0,9 ÷ 2 = 4 remainder 1, 4÷2=2 remainder 0,2 ÷. So the integer binary is: 10 10 1. The fractional part is: 0.25 * 2 = 0.5,0,0.5 * 2 = 1,1. So the decimal binary is: 0 1. 37.25 Convert to binary10101.01.
Decimal number to hexadecimal number
Decimal number to hexadecimal: (Note: 0 ~ 9 in hexadecimal 16 is represented by 0 ~ 9, and hexadecimal 10 ~ 15 is represented by a ~ f). 37÷ 16=2 is greater than 5. Therefore, the hexadecimal integer is: 52. The fractional part is 0.25* 16=4. 37.25 is converted to 52.4 in hexadecimal.