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