Pretvornik brojeva
Pretvori brojeve između binarnih, oktalnih, decimalnih i heksadecimalnih.
Rezultati ažuriranja dok kucate.
O ovom kalkulatoru
A number base converter rewrites an integer from one positional base to another — binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). It reads your value in the source base, works out its plain decimal value, and re-expresses that value in the target base.
Each base uses a fixed set of digits: 0–1 for binary, 0–7 for octal, 0–9 for decimal and 0–9 then A–F for hexadecimal, where A–F stand for 10–15. Because 16 is 2⁴, each hex digit maps to exactly four binary digits, which is why programmers use hex as shorthand for raw bytes.
Worked example: the decimal number 255 is 11111111 in binary and FF in hexadecimal, since 255 = 15×16 + 15. The converter also reports the intermediate decimal value so you can check the working. A results table shows the same number in all four bases at once, and an invalid digit for the chosen source base is flagged rather than silently miscounted.
Česta pitanja
Kako da pretvorim decimalni broj u binarni?
Repeatedly divide by 2 and read the remainders from bottom to top. For example 10 in decimal is 1010 in binary, and 255 is 11111111.
Za što se koristi heksadecimal?
Heksadecimalno (osnova 16) pakira četiri binarna binarna bita u jednu cifru (0–9 zatim A–F), tako da je to kompaktan način pisanja bajtova. Decimalni broj 255 je FF u heksadikemiji.
Zašto moj broj pokazuje ploču?
Cifre moraju biti valjane za izvornu osnovu — primjerice samo 0 i 1 u binarnoj, odnosno 0–9 i A–F u heksadecili. Nevažeća cifra čini rezultat nedefiniranim.
Što znače slova od A do F u heksadecimalnoj?
One su jedna cifra za vrijednosti 10 do 15: A je 10, B je 11, do F što je 15. To omogućava bazu 16 mjeriti brojeve do 15 na jedno mjesto prije nego što mora nositi.
Zašto svaka hex cifra jednaka četiri binarne cifre?
Because 16 equals 2 to the fourth power, every hexadecimal digit covers exactly four bits. So the byte 11111111 groups into 1111 1111, which is FF — this number base converter does that grouping for you.
Može li ovaj konverter nositi vrlo velike brojeve?
It works on whole numbers and is accurate up to the range integers are stored exactly (about 9 quadrillion, or 2⁵³). Beyond that, extremely long binary or hexadecimal strings may lose precision in their last digits.
API – koristi ovaj kalkulator iz koda
Nazovi ovaj kalkulator kao slobodan JSON ishod — nije potreban ključ. Pošaljite vrijednosti polja ispod kao parametre upita ili JSON. Sve što opustite koristi istu uobičajenu stranicu je napunjena; nepoznati parametar je 400, nikada tiha nula. Pročitajte cijeli API dokumenata →
Krajnji točki
GET https://calculator.free/api/v1/number-base/
curl
curl "https://calculator.free/api/v1/number-base/?amount=255&from=10&to=2"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/number-base/?" + new URLSearchParams({
"amount": "255",
"from": "10",
"to": "2"
}));
const data = await r.json();
console.log(data.results);
Rezultati su procjene za opće smjernice samo za financijske, medicinske ili porezne savjete.