2ⁿ 整数写成 2 的幂形式Convert Number to Power of Two
判断并写成 2^k,或拆成若干 2 的幂之和(二进制展开)。本地处理。Write as 2^k when exact, or as a sum of powers of two (binary expansion). Processed locally.
使用说明与常见问题How-to & FAQ
「整数写成 2 的幂形式」是什么?What is the Convert Number to Power of Two tool?
判断并写成 2^k,或拆成若干 2 的幂之和(二进制展开)。本地处理。Write as 2^k when exact, or as a sum of powers of two (binary expansion). Processed locally.
如何使用「整数写成 2 的幂形式」?How do I use the Convert Number to Power of Two tool?
在「整数写成 2 的幂形式」中,把内容粘贴或输入到上方输入框,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「8」,得到「2^3」。In the Convert Number to Power of Two: Paste or type into the input box; the result appears below instantly — click "Copy result" to copy it. Example: "8" → "2^3".
非 2 的幂?Not a power of two?
输出二进制展开之和,例如 10 = 2^3 + 2^1。Outputs the binary expansion sum, e.g. 10 = 2^3 + 2^1.
结果精确吗?能处理多大的整数?Are the results exact? How large can the integer be?
精确。整数按大整数(BigInt)处理,不经过浮点,也没有 32 位限制,最多 1,000 位,例如 2147483648 = 2^31、4294967297 = 2^32 + 2^0。千位分隔逗号(1,000)会去掉并提示;指数写法和十六进制会报错。Yes. The integer is handled as a big integer (BigInt) with no floating-point step and no 32-bit limit, up to 1,000 digits — 2147483648 = 2^31 and 4294967297 = 2^32 + 2^0. Thousands commas (1,000) are removed with a note; exponent forms and hex give an error.
输入和输出是什么样的?What does the input and output look like?
例如在「整数写成 2 的幂形式」中输入 8,输出为:2^3。For example, the Convert Number to Power of Two turns the input 8 into: 2^3.
「整数写成 2 的幂形式」免费吗?需要注册吗?Is the Convert Number to Power of Two free? Do I need an account?
「整数写成 2 的幂形式」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Convert Number to Power of Two is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.