8

ASCII Code 56

Eight

About This Character

ASCII code 56 (0x38) represents the Eight character "8". The digit "8" has ASCII code 56. The digits 0–9 occupy consecutive ASCII codes 48–57, which makes numeric conversion straightforward: subtracting 48 (or 0x30) from any digit character’s ASCII code gives its numeric value. The printable ASCII characters (codes 32–126) include the space, digits, uppercase and lowercase Latin letters, and common punctuation symbols. These 95 characters form the foundation of text representation in virtually all computing systems and are universally supported across all character encodings, programming languages, and operating systems.

Character Encoding

Decimal 56
Octal 070
Hexadecimal 0x38
Binary 00111000
HTML Code 8
HTML Entity
Unicode U+0038
Unicode Name DIGIT EIGHT
URL Escape %38
Quoted-Printable 8
UTF-8 (Hex) 38
Category Printable — Digits

How to Type in Code

JavaScript
// Character literal
let char = '8';
// Using char code
let char2 = String.fromCharCode(56);
// Unicode escape
let char3 = '\x38';
Python
# Character literal
char = '8'
# Using chr()
char = chr(56)
# Using ord() to get code
code = ord('8')  # Returns 56
HTML
<!-- Direct character -->
8
<!-- HTML entity (numeric) -->
&#56;
<!-- Hex entity -->
&#x38;
C#
// Character literal
char c = '8';
// Using cast
char c2 = (char)56;
// To get code from char
int code = (int)'8';  // Returns 56

See Also

Copied!