Toolman

ASCII 52

ASCII 52 is Digit 4, written 4.

Every representation

Character4
NameDigit 4
Decimal52
Hexadecimal0x34
Octal0064
Binary00110100
HTML entity4
Escape sequence\x34
UnicodeU+0034
GroupDigit

What it is for

The digit 4. 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: 52 in binary is 00110100, and the last four bits are 0100, which is 4.

Frequently asked questions

What is ASCII 52?

Digit 4, the character 4. In hexadecimal it is 0x34, in octal 0064, and in binary 00110100.

How do I type ASCII 52?

Type 4 directly. In a string literal it can also be written \\x34, and in HTML as 4.

Is ASCII 52 printable?

Yes. Codes 32 to 126 are the printable range, which is every character ASCII can actually display.

Nearby codes

Full ASCII table · Text to binary converter · Number base converter