Convertitore binario / esadecimale / decimale
Converti un numero tra binario, ottale, decimale ed esadecimale, con una tabella di ripartizione.
Aggiornamento dei risultati durante la digitazione.
A proposito di questa calcolatrice
A binary, hex and decimal converter shows the same whole number across number bases. Computers ultimately work in binary (base 2), but programmers routinely switch between bases to make values readable: decimal (base 10) for everyday quantities, hexadecimal (base 16) for byte values and memory addresses, and octal (base 8) for things like Unix file permissions. This converter takes a whole number in any of those four bases and shows it in all four at once, along with its bit length. The digits allowed in each base go up to one less than the base — binary uses 0–1, octal 0–7, decimal 0–9 and hex 0–9 then A–F for 10–15 — and the tool rejects digits that are out of range for the base you pick.
As a worked example, the decimal value 255 is FF in hexadecimal, 377 in octal and 11111111 in binary — eight bits all set, i.e. exactly one byte at its maximum. To convert decimal to hex by hand you repeatedly divide by 16 and read the remainders from last to first; the calculator does it instantly and also accepts input prefixed with 0x (hex), 0b (binary) or 0o (octal) and handles negative numbers.
The reason hexadecimal is so common in computing is that each hex digit maps to exactly four binary bits (a nibble), so two hex digits describe one byte with no ambiguity — which is why colour codes like #FF8800, MAC addresses and memory dumps are written in hex. This tool is handy for bit masks, colour values, debugging register contents and any low-level work where you need to see the same number across bases.
Domande frequenti
Come faccio a convertire la virgola in esadecimale?
Repeatedly divide by 16 and read the remainders from last to first, using A–F for 10–15. Decimal 255 is FF in hex and 11111111 in binary.
Perché l'esadecimale viene usato nel calcolo?
Each hex digit maps to exactly four binary bits, so hex is a compact, readable way to write byte values and memory addresses — 0xFF is one byte of all ones.
Posso inserire i numeri con i prefisso 0x, 0b o 0o?
Sì. Un prefisso 0x (hex), 0b (binary) o 0o (ottal) viene rimosso automaticamente, in modo da poter incollare i valori direttamente dal codice. Basta assicurarsi che la base di input selezionata corrisponda alle cifre inserite.
Cosa mi dice la lunghezza della punta?
È quante cifre binarie il valore ha bisogno. Il decimale 255 è 8 bit (un byte); 256 ha bisogno di 9 bit. La lunghezza bit è utile per scegliere i tipi di dati e verificare se un valore si inserisce in un byte, 16-bit parola o 32-bit registro.
Per che cosa si usa ottale?
Ottale raggruppa i bit in tre e si presenta principalmente in permessi di file Unix (come 755 o 644) e alcuni sistemi legacy. Ogni cifra ottale mappa esattamente tre bit binari, il modo in cui ogni cifra esadecimale mappa in quattro.
Perche' ho ricevuto "numero non valido per questa base"?
A digit you entered is not allowed in the selected base — for example the letter F or the digit 8 in a binary number, which only permits 0 and 1. Switch the input base to match your value, or correct the out-of-range digit.
API Hoppenstedt utilizzare questa calcolatrice dal codice
Chiama questa calcolatrice come un endpoint JSON Gratis non è necessaria alcuna chiave. Invia i valori del campo sotto come parametri di query o JSON. Qualsiasi cosa ometterete usa lo stesso valore predefinito di questa pagina; un parametro sconosciuto è un 400, mai uno zero silenzioso. Leggi tutti i documenti API →
Punto finale
GET https://calculator.free/api/v1/binary-hex/
curl
curl "https://calculator.free/api/v1/binary-hex/?value=255&base=10"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/binary-hex/?" + new URLSearchParams({
"value": "255",
"base": "10"
}));
const data = await r.json();
console.log(data.results);
I risultati sono stime solo per gli orientamenti generali, non per i consigli finanziari, medici o fiscali.