반응형 2024/04/021 hexa string to Floating-point value # hexa string to Floating-point value # hexa string to Floating-point value import struct # Hexadecimal string hex_string = "43663334" # Convert hexadecimal string to binary string binary_string = bin(int(hex_string, 16))[2:].zfill(32) # Split binary string into sign, exponent, and mantissa sign_bit = int(binary_string[0]) exponent = int(binary_string[1:9], 2) mantissa = int(binary_string[9:], 2.. 2024. 4. 2. 이전 1 다음 반응형