首页Home › 编码与加密Encoding & Crypto
🔀 翻转 ASCII 位(按位取反、异或、反转位序)Flip ASCII Bits
对文字的每个字节做位运算:按位取反(NOT,8 位或只翻转低 7 位)、与掩码异或(XOR,如 0x20 切换大小写)、翻转指定的位,或把每个字节的位顺序反转;结果可以显示为二进制、十六进制、十进制或文字。也可以直接输入二进制或十六进制字节。适合学习位运算、ASCII 编码原理和 CTF 解题,数据在本地处理。Apply bit operations to every byte of a text: invert all bits (NOT, 8-bit or just the low 7 bits), XOR with a mask (0x20 toggles letter case), flip chosen bit positions, or reverse the bit order of each byte. Show the result as binary, hex, decimal or text. You can also enter binary or hex bytes directly. Handy for learning bitwise operations and how ASCII works, and for CTF puzzles. Processed locally.
使用说明与常见问题How-to & FAQ
「翻转 ASCII 位(按位取反、异或、反转位序)」是什么?What is the Flip ASCII Bits tool?
对文字的每个字节做位运算:按位取反(NOT,8 位或只翻转低 7 位)、与掩码异或(XOR,如 0x20 切换大小写)、翻转指定的位,或把每个字节的位顺序反转;结果可以显示为二进制、十六进制、十进制或文字。也可以直接输入二进制或十六进制字节。适合学习位运算、ASCII 编码原理和 CTF 解题,数据在本地处理。Apply bit operations to every byte of a text: invert all bits (NOT, 8-bit or just the low 7 bits), XOR with a mask (0x20 toggles letter case), flip chosen bit positions, or reverse the bit order of each byte. Show the result as binary, hex, decimal or text. You can also enter binary or hex bytes directly. Handy for learning bitwise operations and how ASCII works, and for CTF puzzles. Processed locally.
如何使用「翻转 ASCII 位(按位取反、异或、反转位序)」?How do I use the Flip ASCII Bits tool?
在「翻转 ASCII 位(按位取反、异或、反转位序)」中,把内容粘贴或输入到上方输入框,按需设置「输入」、「操作」、「掩码」、「位的位置(0–7)」、「输出」,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「A」,得到「10111110」。In the Flip ASCII Bits: Paste or type into the input box, adjust "Input", "Operation", "Mask", "Bit positions (0–7)", "Output"; the result appears below instantly — click "Copy result" to copy it. Example: "A" → "10111110".
同一个位置写两次会怎样?What if I list the same position twice?
每个位置只翻转一次:例如写“0,0”和写“0”的结果一样,工具会在结果下方提示哪些位置重复了。如果想让某一位保持不变,直接不写这个位置即可。Each position is flipped once: "0,0" gives the same result as "0", and a note under the result names the repeated positions. To leave a bit unchanged, simply do not list it.
位的位置怎么数?How are bit positions numbered?
每个字节有 8 位,第 0 位是最低位(数值 1),第 7 位是最高位(数值 128)。例如字母 A 是 01000001,第 0 位和第 6 位是 1。在 ASCII 中第 5 位(数值 32 = 0x20)决定英文字母的大小写,所以翻转第 5 位或异或 0x20 可以切换大小写。Each byte has 8 bits. Bit 0 is the lowest (value 1) and bit 7 the highest (value 128). For example A is 01000001, with bits 0 and 6 set. In ASCII, bit 5 (value 32 = 0x20) decides whether a letter is upper or lower case, so flipping bit 5 or XOR-ing with 0x20 toggles the case.
8 位取反和 7 位取反有什么区别?What's the difference between 8-bit and 7-bit inversion?
ASCII 只用到低 7 位(0–127)。8 位取反会把最高位也变成 1,结果都大于 127,不再是 ASCII 字符;只翻转低 7 位则结果仍在 ASCII 范围内,例如 A(65)变成 >(62)。ASCII only uses the low 7 bits (0–127). Inverting all 8 bits also sets the top bit, so every result is above 127 and no longer ASCII. Inverting just the low 7 bits keeps the result inside ASCII; for example A (65) becomes > (62).
怎样还原?How do I undo it?
取反、异或和翻转指定位再做一次相同的操作就会还原,反转位序也是如此。把结果以二进制或十六进制复制回来,输入选择对应格式,执行同样的操作,输出选“文字”即可。不可显示的字节在文字输出中写成 \x16 这样的形式。Inverting, XOR and flipping chosen bits all undo themselves when applied again, and so does reversing the bit order. Copy the result as binary or hex, choose that input format, apply the same operation and set the output to Text. Bytes that can't be displayed appear as escapes like \x16 in text output.
编码和加密有什么区别?Is encoding the same as encryption?
编码(如 Base64、URL 编码)可直接还原,不提供保密性;加密需要密钥。「翻转 ASCII 位(按位取反、异或、反转位序)」的处理全部在本地完成。No. Encoding (Base64, URL…) is reversible by anyone; encryption needs a key. The Flip ASCII Bits works fully offline in your browser.
「翻转 ASCII 位(按位取反、异或、反转位序)」免费吗?需要注册吗?Is the Flip ASCII Bits free? Do I need an account?
「翻转 ASCII 位(按位取反、异或、反转位序)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Flip ASCII Bits is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.