從浮点數轉換

按照相應標准对輸入执行從浮点數轉換。

輸入: 文本結果: 二進位位元組

文本輸入

執行後查看結果

範例

Store 1 -2 0.5 as IEEE 754 bytes

Store 1 -2 0.5 as IEEE 754 bytes. The input is a small public learning fixture; it contains no private production data.

輸入

1 -2 0.5

Expected answer

Hexadecimal bytes
OffsetHex bytesASCII
000000003f 80 00 00 c0 00 00 00 3f 00 00 00?.......?...
位元組順序
Big Endian
大小
Float (4 bytes)
分隔符
Space
Store -0.0 3.5 as IEEE 754 bytes

Store -0.0 3.5 as IEEE 754 bytes. The input is a small public learning fixture; it contains no private production data.

輸入

-0.0 3.5

Expected answer

Hexadecimal bytes
OffsetHex bytesASCII
0000000000 00 00 80 00 00 60 40......`@
位元組順序
Little Endian
大小
Float (4 bytes)
分隔符
Space
Store 1.5 -2.25 as IEEE 754 bytes

Store 1.5 -2.25 as IEEE 754 bytes. The input is a small public learning fixture; it contains no private production data.

輸入

1.5 -2.25

Expected answer

Hexadecimal bytes
OffsetHex bytesASCII
000000003f f8 00 00 00 00 00 00 c0 02 00 00 00 00 00 00?...............
位元組順序
Big Endian
大小
Double (8 bytes)
分隔符
Space
Store 0 1000 as IEEE 754 bytes

Store 0 1000 as IEEE 754 bytes. The input is a small public learning fixture; it contains no private production data.

輸入

0 1000

Expected answer

Hexadecimal bytes
OffsetHex bytesASCII
0000000000 00 00 00 00 00 00 00 00 00 00 00 00 40 8f 40.............@.@
位元組順序
Little Endian
大小
Double (8 bytes)
分隔符
Space
Store 0.125 -16 as IEEE 754 bytes

Store 0.125 -16 as IEEE 754 bytes. The input is a small public learning fixture; it contains no private production data.

輸入

0.125 -16

Expected answer

Hexadecimal bytes
OffsetHex bytesASCII
000000003e 00 00 00 c1 80 00 00>.......
位元組順序
Big Endian
大小
Float (4 bytes)
分隔符
Space
From Float (Big Endian, 4 bytes): 0.5

輸入

0.5 0.5

Expected answer

Hexadecimal bytes
OffsetHex bytesASCII
000000003f 00 00 00 3f 00 00 00?...?...
位元組順序
Big Endian
大小
Float (4 bytes)
分隔符
Space
From Float (Big Endian, 8 bytes): 0.5

輸入

0.5 0.5

Expected answer

Hexadecimal bytes
OffsetHex bytesASCII
000000003f e0 00 00 00 00 00 00 3f e0 00 00 00 00 00 00?.......?.......
位元組順序
Big Endian
大小
Double (8 bytes)
分隔符
Space
From Float (Little Endian, 4 bytes): 0.5

輸入

0.5 0.5

Expected answer

Hexadecimal bytes
OffsetHex bytesASCII
0000000000 00 00 3f 00 00 00 3f...?...?
位元組順序
Little Endian
大小
Float (4 bytes)
分隔符
Space
From Float (Little Endian, 8 bytes): 0.5

輸入

0.5 0.5

Expected answer

Hexadecimal bytes
OffsetHex bytesASCII
0000000000 00 00 00 00 00 e0 3f 00 00 00 00 00 00 e0 3f.......?.......?
位元組順序
Little Endian
大小
Double (8 bytes)
分隔符
Space

相关工具

資料格式

操作参考

查看原始技术文檔 (English)