DevKits

ASCII 112

Latin Small Letter P (p)

Printable ASCII

Lowercase letter p. ASCII code 112. Uppercase 'P' is 80.

Common uses & context

Thelowercase letter 'p' has ASCII code 112 (0x70). Its uppercase twin 'P' sits exactly 32 code points away at 80. That constant gap of 32 — a single bit, 0x20 — is why changing letter case is one of the cheapest operations a CPU can do: you flip or mask one bit rather than looking anything up. Lowercase letter p. ASCII code 112. Uppercase 'P' is 80.

The lowercase Latin letters form the contiguous block 97–122, so range checks like c >= 'a' && c <= 'z' work without a lookup table. To convert 'p' to its uppercase form youclear bit 5: 'p' & ~0x20 gives 'P'. Because uppercase (65–90) sorts before lowercase (97–122) in raw byte order, naive sorting places every capitalized wordahead of every lowercase one — the reason "Zebra" comes before "apple" unless you sort case-insensitively.

All encodings at a glance

Decimal112
Hexadecimal0x70
Octal0160
Binary01110000
HTML numeric entity&#112;
URL encoding%70
UTF-8 bytes0x70

Code snippets

JavaScript

String.fromCharCode(112); // "p"
112.toString(16); // "70"

Python

chr(112)           # 'p'
ord(chr(112))      # 112
hex(112)           # '0x70'

HTML

&#112;   <!-- numeric entity (no named entity for this character) -->

Programming notes

  • Case toggle: 'p' & ~0x20 = 'P' (a single-bit change).
  • Letter test: c >= 'a' && c <= 'z' — the lowercase block is contiguous (97–122).

Frequently asked questions

What character is ASCII code 112?

ASCII code 112 is the character 'p' (Latin Small Letter P). In hexadecimal it is 0x70, in octal 0160, and in binary 01110000.

What is 0x70 in ASCII?

Hexadecimal 0x70 equals decimal 112, which is the character 'p' (Latin Small Letter P). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0x70 = 112) and look up that code point.

How do I write the character with code 112 in code?

In JavaScript use String.fromCharCode(112); in Python use chr(112); in HTML use the numeric entity &#112;. In a URL it is percent-encoded as %70, and in UTF-8 it is stored as the byte sequence 0x70.

What is the uppercase form of 'p' in ASCII?

'p' is code 112; its uppercase counterpart 'P' is code 80. The two always differ by 32, so you can convert by subtracting 32 (or clearing bit 0x20).

Nearby codes

Encode & convert this character