All representations
| Format | Value |
|---|---|
| Name | Digit 4 |
| Decimal | 52 |
| Hexadecimal | 0x34 |
| Octal | 064 |
| Binary | 00110100 |
| HTML numeric entity | 4 / 4 |
| Unicode code point | U+0034 |
| URL encoded | %34 |
| UTF-8 bytes | 34 (one byte, same as ASCII) |
Notes
- Subtracting 48 from the code gives the digit value 4.
- In C:
'4' - '0' == 4.
Nearby codes
Get this code in code
JavaScript '4'.charCodeAt(0) // 52
Python ord('4') # 52
C (char)52