4
Four
PrintableASCII 52 | Hex 0x34 | U+0034
ASCII 52 holds the digit four. Hexadecimal notation works because 16 equals 2 to the fourth power, so each hex digit represents exactly four binary bits (a nibble). IPv4 addresses consist of four octets separated by dots, giving 2 to the 32nd power possible addresses. UTF-8 encoding uses a maximum of four bytes per character to represent any Unicode code point up to U+10FFFF.
ASCII Code
Decimal
52
Hexadecimal
0x34
Octal
64
Binary
0011 0100
URL Escape
%34
Unicode
Code Point
U+0034
Escape
\u0034
UTF-8 Hex
0x34
UTF-8 Binary
00110100
UTF-16
0x0034
UTF-32
0x00000034
HTML Entities
Numeric
4
Hex
4
How to Type
Windows Alt CodeAlt + 52
HTML Entity
4
Unicode InputU+0034
Source Code Representations
C / Java
"\u0034"CSS
\0034JavaScript
"\u0034"Perl
\x{0034}Python 2
u"\u0034"Python 3
\u0034Ruby
\u{0034}Frequently Asked Questions
What is ASCII code 52?
ASCII code 52 represents the Four character. In hexadecimal it is 0x34, in binary 0011 0100, and in octal 64. It is a printable character that appears as "4" in text.
How do I type ASCII 52 on a keyboard?
On Windows, hold Alt and type 52 on the numeric keypad. On Mac, you can use the Character Viewer (Edit > Emoji & Symbols). In HTML, use the entity 4 or 4.