Tools
Bit playground
Toggle seven bits and watch the character change: flip case, apply Ctrl, find the digit hiding in 0x30–0x39.
Toggling bits needs JavaScript. This shows A, 0x41.
Presets
- C / JS
c ^ 0x20- Python
chr(ord(ch) ^ 0x20)
0x41 ^ 0x20 = 0x61
Flip case works on letters: A–Z and a–z differ only in bit 0x20.
- C / JS
c & ~0x40- Python
chr(ord(ch) & ~0x40)
0x41 & ~0x40 = 0x01
Ctrl works on the letter row, 0x40–0x5F (@, A–Z, [ \ ] ^ _): it clears bit 0x40.
- C / JS
c & 0x0F- Python
ord(ch) & 0x0F
0x41 & 0x0F = 0x01
Digit value works on 0–9 (0x30–0x39): the low four bits are the digit.