• @[email protected]
    link
    fedilink
    English
    3814 hours ago

    For those ASCIIng themselves why this works, 0x20 is 00100000 in binary, so it only flips one bit, increasing or decreasing the character’s value by 32. Capital ‘A’ is 65 and lowercase ‘a’ is 97, an offset of exactly 32! The rest of the uppercase and lowercase letters follow in order.

    • @WR5
      link
      English
      1013 hours ago

      Wow that’s crazy it’s exactly 263,130,836,933,693,530,167,218,012,160,000,000. Wonder why increasing or decreasing by 32 makes a difference? /s

    • @[email protected]
      link
      fedilink
      English
      1013 hours ago

      Done that way completely on purpose, of course.

      The numbers all have their binary value in their low nibble, too, which makes Binary-Coded Decimal completely trivial to convert into the equivalent string, or vice-versa. Nearly as easy to convert ‘normal’ binary numbers in either direction, too.

  • Cralder
    link
    English
    1715 hours ago

    Same energy as chr(sum(range(ord(min(str(not())))))))