ASCII Cheat Sheet

Here’s an ASCII cheat sheet:

ASCII Characters

  • ASCII stands for American Standard Code for Information Interchange.
  • It represents characters using numbers from 0 to 127.
  • Basic ASCII characters include letters, digits, punctuation, and control characters.

Common ASCII Values

DecimalCharacterDecimalCharacter
32Space65A
48-570-997-122a-z
58-64Punctuation123-126Special Characters

Control Characters

DecimalCharacterDescription
0NULNull
7BELBell
8BSBackspace
9TABHorizontal Tab
10LFLine Feed (New Line)
13CRCarriage Return

Extended ASCII

  • Extends the basic ASCII set to include values from 128 to 255.
  • Used for special characters, symbols, and additional characters.

ASCII Art

  • ASCII art is a form of creative expression using ASCII characters.
  • Example:
_______________
| ASCII Art     |
|    is fun!    |
|_______________|

Conversion

Convert between characters and ASCII values in programming languages:

In Python:

char = 'A'
ascii_value = ord(char)
print(f'The ASCII value of {char} is {ascii_value}')

In JavaScript:

let char = 'A';
let asciiValue = char.charCodeAt(0);
console.log(`The ASCII value of ${char} is ${asciiValue}`);