Thanks Hank Green.

  • nycki@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    6 days ago

    yep! the ascii standard was originally invented for teletypewriters, and includes four ‘blocks’ of 32 codes each, for 128 in total, so it only uses seven bits per code.

    the first block, hex 00 - 1F, contains control codes for the typewriter. stuff like “newline”, “backspace”, and “ring bell” all go in here.

    The second block has the digits are in order, from hex 30 = ‘0’ all the way to hex 39 = ‘9’,

    The uppercase alphabet starts at hex 41 = ‘A’, and exactly one block later, the lowercase alphabet starts at hex 61 = ‘a’. This means their binary codes are 100 0001 and 110 0001, differering only in a single bit! So you can easily convert between upper and lowercase ascii by flipping that bit.

    The remaining space in the last three blocks is filled with various punctuation marks. I’m not sure if these are in any particular order.

    The final ascii code, 7F, is reserved for “delete”, because its binary representation is 111 1111, perfect for “deleting” data on a punch card by punching over it.