2
Two
PrintableASCII 50 | Hex 0x32 | U+0032
ASCII 50 encodes the digit two. Binary (base-2) notation uses powers of two as place values, which is why memory sizes, buffer lengths, and hash table capacities in computing are almost always powers of two. In C-style printf formatting, the character '2' minus '0' yields the integer 2, exploiting the fact that ASCII digits are contiguous. The number two is the only even prime, a property relevant in cryptographic algorithms like RSA that depend on prime factorization.
ASCII Code
Decimal
50
Hexadecimal
0x32
Octal
62
Binary
0011 0010
URL Escape
%32
Unicode
Code Point
U+0032
Escape
\u0032
UTF-8 Hex
0x32
UTF-8 Binary
00110010
UTF-16
0x0032
UTF-32
0x00000032
HTML Entities
Numeric
2
Hex
2
How to Type
Windows Alt CodeAlt + 50
HTML Entity
2
Unicode InputU+0032
Source Code Representations
C / Java
"\u0032"CSS
\0032JavaScript
"\u0032"Perl
\x{0032}Python 2
u"\u0032"Python 3
\u0032Ruby
\u{0032}Frequently Asked Questions
What is ASCII code 50?
ASCII code 50 represents the Two character. In hexadecimal it is 0x32, in binary 0011 0010, and in octal 62. It is a printable character that appears as "2" in text.
How do I type ASCII 50 on a keyboard?
On Windows, hold Alt and type 50 on the numeric keypad. On Mac, you can use the Character Viewer (Edit > Emoji & Symbols). In HTML, use the entity 2 or 2.