Decimal to Fraction Calculator

Decimal to Hexadecimal Converter — Free Online

Enter a decimal fraction below to instantly convert it to its hexadecimal representation with a detailed step-by-step breakdown.

Visual Representation

Base-10 → Base-{base} digits
Enter a number…
Value as proportion of 1
0%

How to Convert Decimal Fractions to Hexadecimal

To convert a decimal number with a fractional part to hexadecimal, you split the number into its integer and fractional parts and convert them separately.

Steps

  1. Separate the number into the integer part and the fractional part.
  2. Convert the integer part to hex by repeatedly dividing by 16 and recording the remainders (0-9, A-F).
  3. Convert the fractional part to hex by repeatedly multiplying by 16 and recording the integer part of the result.
  4. Combine the two hex parts with a decimal point.

Example

Example: Convert Decimal 254 to Hexadecimal 1) 254 ÷ 16 = 15 with a remainder of 14 (E) 2) 15 ÷ 16 = 0 with a remainder of 15 (F) 3) Read remainders bottom to top: FE Result: 254 = 0xFE

Common Conversions

Decimal Hexadecimal
0.06250.1
0.1250.2
0.250.4
0.50.8
0.750.C

Frequently Asked Questions

Common questions about hexadecimal system, base-16, color codes, programming uses

01 What is the hexadecimal system?

Hexadecimal, or base-16, is a numbering system that uses 16 symbols: 0-9 and A-F. It is commonly used in computing as a human-friendly way to represent binary values.

02 Why is base-16 so common in programming?

Since 16 is a power of 2, each hexadecimal digit perfectly represents 4 binary bits (a nibble). This makes it much more compact and easier to read than long strings of 1s and 0s.

03 How are hexadecimal numbers used in web colors?

Web colors are defined using 6-digit hex codes (e.g., #FFFFFF for white). These represent the Red, Green, and Blue (RGB) values, with 2 hex digits (00 to FF) for each color channel.

04 What do the letters A through F represent in hexadecimal?

In base-16, the digits 0-9 represent their standard decimal values, while A represents 10, B is 11, C is 12, D is 13, E is 14, and F is 15.

05 How do you convert a decimal fraction to hex?

To convert the fractional part, you repeatedly multiply by 16 and record the integer portion of each result, converting 10-15 to A-F as necessary.

|