Hexadezimalrechner
Konvertiere zwischen Hexadezimal, Dezimal und Binär
Hex Calculator
Convert between decimal and hexadecimal
Enter a decimal integer
Divide by 16 repeatedlyWhat is a Hex Calculator?
A Hex Calculator is a tool for working with hexadecimal numbers (also called hex), which use base 16 instead of base 10. Hexadecimal uses sixteen symbols: 0–9 and A–F, where A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.
Hex is widely used in computing because it's a compact way to represent binary data. Since 1 hex digit equals 4 binary bits, long binary values can be written much shorter in hex. For example: binary 1111 = hex F, and binary 10101100 = hex AC.
This Calculator Supports Multiple Conversions
- Decimal → Hexadecimal -- convert base-10 numbers to base-16
- Decimal → Binary -- convert base-10 numbers to base-2
Hex calculators are useful for converting between hex, decimal, and binary, working with colors in web design (e.g., #FF0000 for red), and understanding memory addresses, machine code, and other low-level computing concepts.
How to Use This Hex Calculator
- Enter a decimal number -- type any integer into the input field (e.g., 255)
- Click "Calculate" -- to convert the number
- Review both outputs -- the result shows the hexadecimal (base 16) and binary (base 2) representations simultaneously
- Try other values -- explore common values like 16, 128, 255, 256, or any decimal you need to convert
Tips:
- Hex values often appear with a prefix like 0x (example: 0xFF). This calculator displays the raw hex digits without a prefix.
- Hex uses only 0–9 and A–F. If you see an error, check for invalid characters.
- Leading zeros (like 00FF) don't change the value, but can be useful when you want a fixed byte length.
Hex Formulas
Hex Place Value (Base 16)
Hex works like decimal place value, but with powers of 16:
value = Σ dᵢ × 16ⁱ (i = 0 to k)
Where each digit dᵢ can be 0–15 (0–9 or A–F)
Example: 1A₁₆ = 1×16¹ + 10×16⁰ = 16 + 10 = 26₁₀
Converting Decimal to Hex
Repeatedly divide by 16 and record remainders:
- Divide the number by 16
- Record the remainder (0–15, using A–F for 10–15)
- Divide the quotient by 16 and repeat until the quotient is 0
- Read the remainders from bottom to top
Hex to Binary Conversion Table
Each hex digit maps directly to a 4-bit binary group:
0
0000
1
0001
2
0010
3
0011
4
0100
5
0101
6
0110
7
0111
8
1000
9
1001
A
1010
B
1011
C
1100
D
1101
E
1110
F
1111
Hex Addition (Concept)
Hex addition follows the same idea as decimal addition, but carries happen at 16 instead of 10. If a digit sum is 16 or more, write the remainder and carry 1 to the next place.
Example Calculations
Example 1: Convert Hex to Decimal
Convert: 1A₁₆ to decimal
Calculation: 1×16 + 10 = 26
Result: 1A₁₆ = 26₁₀
Example 2: Convert Hex to Binary
Convert: 2F₁₆ to binary
Steps:
- 2 = 0010
- F = 1111
Result: 2F₁₆ = 00101111₂
Example 3: Convert Decimal to Hex
Convert: 255₁₀ to hex
Steps:
- 255 ÷ 16 = 15 remainder 15
- 15 in hex = F, remainder 15 = F
Result: 255₁₀ = FF₁₆
Example 4: Hex Addition
Add: A5₁₆ + 1C₁₆
Verify via decimal:
- A5₁₆ = 10×16 + 5 = 165
- 1C₁₆ = 1×16 + 12 = 28
- 165 + 28 = 193
- 193 ÷ 16 = 12 remainder 1 → C1
Result: A5₁₆ + 1C₁₆ = C1₁₆
Frequently Asked Questions
Why is hexadecimal used in computing?
Hex is a compact way to represent binary. Since 1 hex digit equals 4 bits, it's much easier to read and write than long binary strings, especially for memory addresses and machine data.
What do the letters A–F mean in hex?
They represent values 10 through 15: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
What's the difference between hex and binary?
Binary is base 2 (0 and 1). Hex is base 16 (0–9 and A–F). Hex is often used as a shorthand for binary because it compresses 4 bits into 1 character.
What does "0x" mean in front of a number?
"0x" is a common prefix used in programming to indicate a hexadecimal number. For example, 0xFF means FF in hex (255 in decimal).
Why do hex values appear in colors like #FF0000?
In web design, colors are commonly represented as three hex pairs for Red, Green, and Blue (RGB). Each pair ranges from 00 to FF (0 to 255 in decimal). For example, #FF0000 is full red, no green, no blue.
Want to add this hex calculator to your website? Get a custom embed code that matches your site's design and keeps visitors engaged.
Was ist das Hexadezimalsystem?
Das Hexadezimalsystem (Basis 16) verwendet die Ziffern 0–9 und die Buchstaben A–F, wobei A=10, B=11, C=12, D=13, E=14 und F=15. Es ist von Natur aus kompakt — eine einzige Hex-Ziffer repräsentiert genau 4 Binärbits — und eignet sich daher ideal dafür, Binärdaten in einer für Menschen lesbaren Form darzustellen. Du begegnest ihm ständig in der Programmierung, bei Speicheradressen, Maschinencode und überall dort, wo große Binärwerte lesbar bleiben müssen, ohne viel Platz zu beanspruchen.
Dieser Rechner konvertiert sofort zwischen Hex, Dezimal und Binär und führt auch hexadezimale Arithmetik wie Addition und Subtraktion durch. Er ist ein unverzichtbares Werkzeug für Webdesigner, die mit #RRGGBB-Farbcodes arbeiten, für Programmierer, die Speicheradressen oder Registerwerte debuggen, und für alle, die bitweise Operationen durchführen. Ob du einen CPU-Registerdump liest oder die Hintergrundfarbe einer Website auswählst – Hexadezimal ist die Sprache, die du brauchst.
So verwendest du den Hexadezimalrechner
- Gib eine hexadezimale Zahl mit den Ziffern 0–9 und den Buchstaben A–F ein, oder eine Dezimalzahl zur Konvertierung aus der Basis 10.
- Wähle die Konvertierungsrichtung: Hex zu Dezimal, Dezimal zu Hex oder Hex zu Binär.
- Klicke auf Berechnen, um die Konvertierung oder Arithmetik zu verarbeiten.
- Lies alle drei Basisdarstellungen nebeneinander: Hexadezimal, Dezimal und Binär.
Hexadezimale Konvertierungsformeln
Hex zu Dezimal: jede Stelle mit 16^Position multiplizieren
1A3₁₆ = 1×16² + 10×16¹ + 3×16⁰ = 256 + 160 + 3 = 419
Dezimal zu Hex: durch 16 teilen, Reste sammeln
255 ÷ 16 = 15 Rest 15 (F), also 255₁₀ = FF₁₆
Hex-Ziffern: 0-9 = 0-9, A=10, B=11, C=12, D=13, E=14, F=15
Farbcodes: #RRGGBB — je zwei Hex-Ziffern für Rot, Grün, Blau (0-255)Jede Hexadezimalziffer entspricht genau 4 Binärbits (einem sogenannten "Nibble"). Zwei Hex-Ziffern bilden ein Byte und reichen von 00 bis FF — also von 0 bis 255 im Dezimalsystem. Deshalb geht jeder Farbkanal in #RRGGBB von 00 (0) bis FF (255).
Durchgearbeitete Beispiele
FF₁₆ = 255₁₀ — Der maximale Byte-Wert
FF in Hexadezimal ist der größte Wert, der in ein einzelnes Byte (8 Bits) passt. In der RGB-Farbe bedeutet FF maximale Intensität, daher ist #FFFFFF reines Weiß (alle drei Kanäle auf Maximum) und #000000 reines Schwarz (alle Kanäle auf 0).
Einen Hex-Farbcode entschlüsseln: #1A2B3C
Aufgeteilt in drei Paare: R = 1A₁₆ = 26₁₀, G = 2B₁₆ = 43₁₀, B = 3C₁₆ = 60₁₀. Also ist #1A2B3C ein dunkles Blaugrau mit Rot=26, Grün=43, Blau=60. Genau so funktionieren CSS-Farbwähler unter der Haube.
1000₁₀ = 3E8₁₆
Um 1000 in Hex umzuwandeln: 1000 ÷ 16 = 62 Rest 8, dann 62 ÷ 16 = 3 Rest 14 (E), dann 3 ÷ 16 = 0 Rest 3. Die Reste von unten nach oben gelesen: 3E8. Also ist tausend im Dezimalsystem 3E8 im Hexadezimalsystem.