Home›Conversion›Hex to decimal›0x09 hex to decimal

0x09 Hex to Decimal

The hexadecimal value 0x09 equals 9 in decimal. Below you'll find the step-by-step conversion, binary equivalent, ASCII meaning, programming examples, and more.

Quick Answer
0x09 = 9 in decimal
Hexadecimal 09 (base 16) equals 9 (base 10)
📅 Last Updated: August 15, 2025 · ✅ Fact-Checked · 👨💻 Written by Number Systems Experts · ⏱️ 8 min read

📑 Table of Contents

  1. Quick Answer: 0x09 = 9
  2. What Is 0x09?
  3. Step-by-Step Conversion
  4. 0x09 in Other Number Systems
  5. 0x09 in ASCII (Horizontal Tab)
  6. Programming Language Examples
  7. Real-World Use Cases
  8. Hex Comparison Table
  9. The 0x Prefix Explained
  10. Signed vs. Unsigned
  11. Common Mistakes When Converting
  12. History of Hexadecimal
  13. 0x09 in Memory & Data Storage
  14. 0x09 in Unicode
  15. FAQ
Hexadecimal
0x09
Decimal
9
Binary
00001001
Octal
11
ASCII
TAB (\t)
Hexadecimal Input (Base 16)
Decimal Result (Base 10)
Binary Result (Base 2)
Hex: 09 Position 1 (digit 0): 0 × 16¹ = 0 Position 0 (digit 9): 9 × 16⁰ = 9 Sum: 0 + 9 = 9 0x09 = 9 in decimal

What Is 0x09 in Hexadecimal?

0x09 is a hexadecimal (base-16) number. The 0x prefix is a standard notation used in programming to identify hexadecimal values. The actual hex digits are 09.

In the hexadecimal number system, each digit represents a power of 16. The available digits are 0–9 and A–F, where A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.

Since both digits in 09 are within the 0–9 range, this is one of the simpler hex values to convert — it looks the same as a regular decimal number, but the calculation method is different because the base is 16, not 10.

How to Convert 0x09 to Decimal: Step-by-Step

Converting hexadecimal to decimal uses a positional notation formula. Here's exactly how to convert 0x09 to decimal:

The Formula

Decimal = d₁ × 16¹ + d₀ × 16⁰

Where d₁ is the leftmost digit and d₀ is the rightmost digit.

Step 1: Identify Each Digit

The hex number 09 has two digits:

Step 2: Multiply by Powers of 16

0 × 16¹ = 0 × 16 = 0 9 × 16⁰ = 9 × 1 = 9

Step 3: Add the Results

0 + 9 = 9

Therefore, 0x09 in hexadecimal = 9 in decimal.

Why Does 0x09 Equal 9?

0x09 equals 9 because the left digit is 0 and the right digit is 9, making the calculation 0 × 16 + 9 × 1 = 9. In this specific case, since the left digit is 0, the 16¹ position contributes nothing. The entire value comes from the rightmost digit (9), which sits in the 16⁰ (ones) position. This makes 0x09 one of the hex values where the decimal result matches the hex digits — but only because the value is below 10. For hex values 0A (10) and above, the decimal result starts to diverge.

0x09 in Other Number Systems

Here's how 0x09 looks in every common number base:

Number SystemBaseValue
HexadecimalBase 1609
DecimalBase 109
OctalBase 811
BinaryBase 200001001

0x09 to Binary Conversion

Each hex digit maps to exactly 4 binary bits:

0 → 0000 9 → 1001 0x09 = 00001001 in binary

This binary value 00001001 represents the decimal number 9: the 2³ bit (8) and the 2⁰ bit (1) are set, giving 8 + 1 = 9.

0x09 to Octal Conversion

To convert 0x09 to octal, first convert to decimal (9), then divide by 8:

9 ÷ 8 = 1 remainder 1 Read remainders bottom-up: 11 (octal)

What Is 0x09 in ASCII? (Horizontal Tab)

In the ASCII character table, 0x09 (decimal 9) represents the Horizontal Tab (HT) character. This is a non-printable control character — it doesn't display as a visible symbol on screen.

What Does the Tab Character Do?

The horizontal tab character advances the cursor to the next tab stop position. In most systems, tab stops are set at every 8 characters, though many editors use 4 spaces. It's one of the most commonly used control characters.

How Is It Written in Code?

In almost every programming language, the tab character is represented by the escape sequence \t:

Various// Tab character escape sequences C/C++: '\t' or "\t" Python: '\t' or "\t" JavaScript: '\t' or "\t" Java: '\t' or "\t" C#: '\t' or "\t"

ASCII Control Characters Near 0x09

HexDecimalASCIIDescription
0x077BELBell (alert beep)
0x088BSBackspace
0x099HTHorizontal Tab ← this one
0x0A10LFLine Feed (new line)
0x0B11VTVertical Tab
0x0D13CRCarriage Return

Together, 0x09 (tab), 0x0A (line feed), and 0x0D (carriage return) are the three most commonly encountered whitespace control characters in programming and text processing.

How to Convert 0x09 to Decimal in Programming Languages

Here's how you handle the hex value 0x09 in popular programming languages:

Python

Python# Method 1: Using int() with base 16 result = int('09', 16) print(result) # Output: 9 # Method 2: Hex literal value = 0x09 print(value) # Output: 9 # Method 3: Using the 0x prefix string result = int('0x09', 16) print(result) # Output: 9

JavaScript

JavaScript// Method 1: parseInt with radix 16 let result = parseInt('09', 16); console.log(result); // Output: 9 // Method 2: Hex literal let value = 0x09; console.log(value); // Output: 9 // Method 3: Number() with 0x prefix let num = Number('0x09'); console.log(num); // Output: 9

Java

Java// Method 1: Integer.parseInt with radix int result = Integer.parseInt("09", 16); System.out.println(result); // Output: 9 // Method 2: Hex literal int value = 0x09; System.out.println(value); // Output: 9

C / C++

C/C++// Method 1: Hex literal int value = 0x09; printf("%d\n", value); // Output: 9 // Method 2: strtol for string conversion long result = strtol("09", NULL, 16); printf("%ld\n", result); // Output: 9

C#

C#// Method 1: Convert.ToInt32 int result = Convert.ToInt32("09", 16); Console.WriteLine(result); // Output: 9 // Method 2: Hex literal int value = 0x09; Console.WriteLine(value); // Output: 9

PHP

PHP// Method 1: hexdec function $result = hexdec('09'); echo $result; // Output: 9 // Method 2: intval with base 16 $result = intval('09', 16); echo $result; // Output: 9

Where Is 0x09 Used in the Real World?

0x09 is used in the real world as a horizontal tab character for formatting text files, separating data in CSVs, and aligning terminal outputs. The hex value 0x09 appears in many contexts across computing and programming:

📝

Text Files & CSV Data

Tab-separated values (TSV) files use 0x09 as the column delimiter between data fields.

🖥️

Terminal & Console

The tab character aligns output in columns when printing formatted data to the terminal.

📊

Spreadsheet Imports

When pasting tabular data, 0x09 tells the spreadsheet to place data in the next column.

🔍

Hex Editors

When inspecting files in a hex editor, you'll frequently see 09 bytes representing tab characters.

🌐

HTML & Web

In HTML, 0x09 is treated as whitespace. It can also be written as the entity 	 or 	.

🔐

Data Protocols

Many network protocols and data formats use 0x09 as a field separator or whitespace token.

Hex Values Near 0x09 — Comparison Table

Here's a handy reference showing hex values around 0x09 and their decimal, binary, octal, and ASCII equivalents:

HexDecimalBinaryOctalASCII
0x000000000000NUL
0x011000000011SOH
0x022000000102STX
0x033000000113ETX
0x044000001004EOT
0x055000001015ENQ
0x066000001106ACK
0x077000001117BEL
0x0880000100010BS
0x0990000100111HT ◄
0x0A100000101012LF
0x0B110000101113VT
0x0C120000110014FF
0x0D130000110115CR
0x0E140000111016SO
0x0F150000111117SI
0x10160001000020DLE

What Does the 0x Prefix Mean?

The 0x prefix is a widely recognized convention in programming that marks a number as hexadecimal. It originated in the C programming language and is now used across virtually all modern languages.

Why 0x?

The 0x prefix is used because the 0 signals a numeric literal and the x stands for hexadecimal. The prefix uses 0 (which signals a non-decimal literal in many languages) followed by x (for hexadecimal). This prevents ambiguity — without it, the number 09 might be interpreted as decimal 9 or even cause an error in languages that treat leading-zero numbers as octal.

Other Hex Notations

NotationExampleUsed In
0x prefix0x09C, C++, Java, JavaScript, Python, C#
# prefix#09HTML/CSS color codes
h suffix09hAssembly language (Intel syntax)
$ prefix$09Pascal, Motorola assembly
&H prefix&H09Visual Basic
16# prefix16#09#Ada, VHDL

0x09 — Signed vs. Unsigned Interpretation

For the value 0x09, the signed and unsigned interpretations are identical because the most significant bit is 0.

As an 8-bit Value (Byte)

Unsigned: 0x09 = 9 Signed: 0x09 = 9 Binary: 00001001 MSB (bit 7) = 0 → positive number

In 2's complement representation, any byte where the most significant bit (MSB) is 0 is positive, and its signed value equals its unsigned value. Since 0x09 = 00001001, the MSB is 0, so the signed value is also 9.

Bit-Level Breakdown

Bit Position76543210
Binary Value00001001
Power of 21286432168421
Contribution00008001

Total: 8 + 1 = 9

Common Mistakes When Converting 0x09 to Decimal

The most common mistake is confusing the number base — treating 0x09 as octal instead of hexadecimal. Here are the errors developers frequently encounter:

Mistake 1: Confusing Octal and Hex

In JavaScript (pre-ES5) and some C compilers, a leading zero (like 09) is interpreted as octal notation. Since 9 is not a valid octal digit (octal only uses 0–7), this causes a syntax error or unexpected behavior. Always use the 0x prefix to explicitly indicate hexadecimal.

JavaScript// Wrong — may be treated as octal in older engines let x = 09; // SyntaxError in strict mode! // Correct — explicit hex notation let x = 0x09; // 9 (correct)

Mistake 2: Forgetting the Base Parameter

When using parseInt() in JavaScript without specifying the radix, the function may guess the wrong base. Always pass 16 as the second argument for hex conversion.

JavaScript// Risky — base may be guessed incorrectly parseInt('09'); // Returns 9 (decimal) in modern JS, but was 0 in old engines // Safe — always specify base parseInt('09', 16); // Returns 9 (always correct)

Mistake 3: Case Sensitivity Confusion

0x09, 0X09, and 0x09 are all equivalent in every major programming language. Hex digits A–F are case-insensitive, so 0xFF and 0xff are identical. However, some style guides prefer lowercase for consistency.

Mistake 4: Adding the 0x Prefix to Conversion Functions

Some functions expect raw hex digits without the 0x prefix, while others accept it. Know which is which for your language:

Python# Both work in Python: int('09', 16) # → 9 (without prefix) int('0x09', 16) # → 9 (with prefix — also works) # But NOT with base 0 without prefix: int('0x09', 0) # → 9 (auto-detect base from prefix) int('09', 0) # → ValueError! Ambiguous without prefix

A Brief History of the Hexadecimal Number System

Hexadecimal was first adopted in computing in the 1960s as a human-friendly shorthand for binary data. Here is a brief timeline of how hex notation evolved into the universal standard used today:

Why Base 16?

Base 16 is used because 16 is a power of 2 (2⁴ = 16), which means each hex digit maps perfectly to exactly 4 binary bits. Computers operate in binary (base 2), but binary strings are long and error-prone for humans to read. Hexadecimal solves this because of this 1:4 mapping, making conversion between hex and binary instantaneous — no math required, just a lookup table.

Before Hex: Octal Was King

In the 1950s and 1960s, octal (base 8) was the dominant shorthand because early computers used 12-bit, 24-bit, and 36-bit word sizes — all divisible by 3 (the number of bits per octal digit). When IBM introduced the System/360 mainframe in 1964 with 8-bit bytes and 32-bit words, hexadecimal became the natural choice because these are divisible by 4 (the number of bits per hex digit).

The 0x Prefix Origin

The 0x prefix was introduced in the C programming language (circa 1972) by Dennis Ritchie and Brian Kernighan at Bell Labs. The design rationale: the leading 0 signals a non-decimal literal to the compiler's lexer, and the x stands for hexadecimal. This convention was inherited by C++, Java, JavaScript, Python, C#, Go, Rust, Swift, and virtually every modern language.

Modern Usage

Today, hexadecimal is ubiquitous in computing: memory addresses, color codes (#FF0000), MAC addresses (00:1A:2B:3C:4D:5E), Unicode code points (U+0041), byte-level debugging, cryptographic hashes (SHA-256), and low-level hardware programming all rely on hex notation. The value 0x09 specifically appears constantly as the ASCII tab character in text processing, data formats, and protocol specifications.

How Is 0x09 Stored in Computer Memory?

0x09 is stored as a single byte (8 bits) with the binary pattern 00001001 in computer memory. Here is how it is represented at the hardware level and in different data contexts:

Byte Representation

In memory, 0x09 occupies exactly one byte. A byte is the fundamental addressable unit of memory in modern computers, consisting of 8 bits. The value 9 requires only 4 bits (1001), but it is stored in a full byte with the upper 4 bits set to zero: 00001001.

Endianness

For a single-byte value like 0x09, byte order (endianness) is irrelevant — it is the same in both big-endian and little-endian systems. Endianness only affects multi-byte values (2 bytes or more). This makes single-byte hex values like 0x09 portable across all architectures without byte-swapping concerns.

In Different Data Types

Data TypeSizeHex RepresentationBinary
uint8 / byte1 byte0900001001
uint16 / short2 bytes00 0900000000 00001001
uint32 / int4 bytes00 00 00 0900000000 ... 00001001
uint64 / long8 bytes00 00 00 00 00 00 00 0900000000 ... 00001001

In a Hex Dump

When you view a file in a hex editor, the byte 09 appears frequently in text files wherever a tab character is used for indentation or data separation. In a typical hex dump, it looks like this:

Offset 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ASCII 00000000 4E 61 6D 65 09 41 67 65 09 43 69 74 79 0D 0A 4A Name.Age.City..J 00000010 6F 68 6E 09 32 35 09 4E 59 43 0D 0A 00 00 00 00 ohn.25.NYC......

In this TSV file hex dump, the 09 bytes are the tab delimiters separating the data fields "Name", "Age", and "City".

Is 0x09 the Same in Unicode and ASCII?

Yes, 0x09 represents the same Horizontal Tab character in both ASCII and Unicode — Unicode is a superset of ASCII for the first 128 code points (U+0000 to U+007F). The Unicode code point for the tab character is U+0009, which corresponds directly to ASCII 0x09.

Unicode Details for U+0009

PropertyValue
Code PointU+0009
NameCHARACTER TABULATION
BlockBasic Latin (ASCII)
CategoryControl (Cc)
Bidirectional ClassSegment Separator (S)
UTF-8 Encoding09
UTF-16 Encoding0009
UTF-32 Encoding00000009

UTF-8 Encoding of 0x09

In UTF-8 encoding, any Unicode code point from U+0000 to U+007F is encoded as a single byte, identical to its ASCII value. Therefore, U+0009 (tab) is encoded as the single byte 0x09 in UTF-8. This means UTF-8 encoded text files have the exact same byte value for tab as ASCII files — there is no encoding difference for this character.

HTML Entities for Tab

In HTML documents, you can represent the tab character using these entity notations:

	 → Tab (decimal entity) 	 → Tab (hex entity) 	 → Tab (hex entity, short form)

However, in rendered HTML, tab characters are treated as whitespace and collapsed to a single space by default. To preserve tab formatting, use the CSS property white-space: pre or the <pre> element.

Key Takeaways: 0x09 Hex to Decimal

Frequently Asked Questions About 0x09

0x09 in decimal is 9. The 0x prefix indicates hexadecimal notation, and the value 09 in base 16 equals 0 × 16 + 9 × 1 = 9 in base 10.

0x09 in binary is 00001001. Each hex digit converts to 4 bits: 0 → 0000, 9 → 1001.

0x09 is the Horizontal Tab (HT) character in ASCII. It's a non-printable control character represented in code as \t. It moves the cursor to the next tab stop, typically every 4 or 8 characters.

The 0x prefix is a notation convention from the C programming language that marks a number as hexadecimal (base 16). It's now universally used in C, C++, Java, JavaScript, Python, and many other languages. So 0x09 means "the hex number 09."

Yes, 0x09 equals decimal 9. For hex values 0x00 through 0x09, the decimal equivalent matches the hex digits. Starting from 0x0A (decimal 10), hex and decimal values begin to diverge because hex uses letters A–F for values 10–15.

0x09 in octal is 11. Convert to decimal first (9), then to octal: 9 ÷ 8 = 1 remainder 1, so octal = 11.

In Python, use int('09', 16) which returns 9. You can also use int('0x09', 16) or simply write the hex literal 0x09 directly in your code — Python automatically treats it as the integer 9.

In JavaScript, use parseInt('09', 16) which returns 9. Or use the hex literal 0x09 directly. You can also use Number('0x09') to get 9.

No. 0x09 is a non-printable control character (Horizontal Tab). ASCII printable characters start at 0x20 (space, decimal 32) and go through 0x7E (tilde ~, decimal 126). All values below 0x20 are control characters.

In terms of value, they are the same — both equal 9. The difference is notation: 0x09 explicitly indicates hexadecimal (base 16), while 9 without a prefix is assumed to be decimal (base 10). In programming, using 0x09 makes your intent clear when working with hex values, bit masks, or byte-level data.

Yes, if written as 09 without the 0x prefix in strict mode, it may cause a SyntaxError. This happens because a leading zero signals octal notation in some contexts, and 9 is not a valid octal digit. Always use 0x09 for hexadecimal values to avoid this issue.

0x09 corresponds to Unicode code point U+0009, officially named "CHARACTER TABULATION." It is identical to the ASCII tab character because Unicode's first 128 code points are the same as ASCII. In UTF-8, it is encoded as the single byte 0x09.

0x09 requires 4 bits to represent (binary 1001), but is stored as a full 8-bit byte (00001001) in computer memory. The upper 4 bits are zero-padded. As a single byte, it uses 8 bits of storage.

Hexadecimal is used instead of binary because it is far more compact and human-readable. Each hex digit represents exactly 4 binary bits, so a byte can be written as 2 hex digits instead of 8 binary digits. For example, 0x09 (2 characters) is much easier to read and remember than 00001001 (8 characters). This makes hex ideal for memory addresses, color codes, debugging, and low-level programming.

See Also

Number Conversion