ASCII 49
ASCII 49 is Digit 1, written 1.
Every representation
| Character | 1 |
| Name | Digit 1 |
| Decimal | 49 |
| Hexadecimal | 0x31 |
| Octal | 0061 |
| Binary | 00110001 |
| HTML entity | 1 |
| Escape sequence | \x31 |
| Unicode | U+0031 |
| Group | Digit |
What it is for
The digit 1. The digits occupy 48 to 57, so subtracting 48 from a digit's code gives its numeric value — the oldest trick in character handling.
Where the number comes from
The digits were placed at 48 to 57 so that 0 through 9 are contiguous and the low four bits of each code are the digit's own value: 49 in binary is 00110001, and the last four bits are 0001, which is 1.
Frequently asked questions
What is ASCII 49?
Digit 1, the character 1. In hexadecimal it is 0x31, in octal 0061, and in binary 00110001.
How do I type ASCII 49?
Type 1 directly. In a string literal it can also be written \\x31, and in HTML as 1.
Is ASCII 49 printable?
Yes. Codes 32 to 126 are the printable range, which is every character ASCII can actually display.
Nearby codes
- ASCII 42 — *
- ASCII 43 — +
- ASCII 44 — ,
- ASCII 45 — -
- ASCII 46 — .
- ASCII 47 — /
- ASCII 48 — 0
- ASCII 50 — 2
- ASCII 51 — 3
- ASCII 52 — 4
- ASCII 53 — 5
- ASCII 54 — 6
- ASCII 55 — 7
- ASCII 56 — 8
Full ASCII table · Text to binary converter · Number base converter