DevKits

ASCII 98

Latin Small Letter B (b)

Printable ASCII

Lowercase letter b. ASCII code 98. Uppercase 'B' is 66. The lowercase block a-z spans 97-122.

Common uses & context

Thelowercase letter 'b' has ASCII code 98 (0x62). Its uppercase twin 'B' sits exactly 32 code points away at 66. 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 b. ASCII code 98. Uppercase 'B' is 66. The lowercase block a-z spans 97-122.

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 'b' to its uppercase form youclear bit 5: 'b' & ~0x20 gives 'B'. 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.

'b' is also a hexadecimal digit: in base-16 it represents the value 11. Hex uses 0–9 for 0–15's firstten values and A–F (or a–f) for 10–15, so 'b' is valid inside literals like 0xbb and colour codes like #bbbbbb.

All encodings at a glance

Decimal98
Hexadecimal0x62
Octal0142
Binary01100010
HTML numeric entity&#98;
URL encoding%62
UTF-8 bytes0x62

Code snippets

JavaScript

String.fromCharCode(98); // "b"
98.toString(16); // "62"

Python

chr(98)           # 'b'
ord(chr(98))      # 98
hex(98)           # '0x62'

HTML

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

Programming notes

  • Case toggle: 'b' & ~0x20 = 'B' (a single-bit change).
  • Letter test: c >= 'a' && c <= 'z' — the lowercase block is contiguous (97–122).
  • As a hex digit, 'b' has value 11 in base-16.

Frequently asked questions

What character is ASCII code 98?

ASCII code 98 is the character 'b' (Latin Small Letter B). In hexadecimal it is 0x62, in octal 0142, and in binary 01100010.

What is 0x62 in ASCII?

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

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

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

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

'b' is code 98; its uppercase counterpart 'B' is code 66. The two always differ by 32, so you can convert by subtracting 32 (or clearing bit 0x20).

Nearby codes

Encode & convert this character