• @[email protected]
    link
    fedilink
    English
    511 month 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.

    • @[email protected]
      link
      fedilink
      English
      181 month 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.

    • @WR5
      link
      English
      111 month 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

  • Cralder
    link
    English
    251 month ago

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