Umguquli we-Binary/ Hex/ Decimal
Iguqula inani phakathi kwe binary, octal, decimal ne hexadecimal, nge table yokuqhekeka.
Iinketho ze projekti
Malunga nale Calculator
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.
Imibuzo ebuza rhoqo
Ndiguqula njani i decimal ukuya kwi hexadecimal?
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.
Kutheni i-hexadecimal isetyenziswa ekubalo?
Inombolo ye hex nganye iimaphu ukuya kwi-bites ezibini ezine, ngoko ke i-hex ilula, indlela efundekayo yokubhala amaxabiso e-byte kunye nedilesi yovimba weefayili - 0xFF yi-byte enye yazo zonke.
Ndingangenisa amanani nge 0x, 0b okanye 0o iziqalelo?
Ewe. I-0x (hex), 0b (ebini) okanye 0o (esibhozo) isiqalelo esiphambili sisuswa ngokuzenzekelayo, ukuze ukwazi ukucofa amaxabiso asuka kwikhowudi. Qinisekisa kuphela ukuba ungeniso lwesiseko okhethayo luhambelana namasuntswana okungena kuwo.
Ubungakanani bebit buthetha ntoni kum?
Le yimali eninzi yexabiso elifunayo. I-decimal 255 yi-8 bits (i-byte enye); i-256 ifuna i-9 bits. Ubude be-bit busetyenziswa ukukhetha iintlobo zedata nokukhangela ukuba ixabiso lilungele i-byte, 16-bit igama okanye 32-bit ubhaliso.
Yintoni i octal esetyenziswa kuyo?
Iqela le octal lidibanisa iibits ezithathu kwaye libonisa kuqala kwi Unix iimvume zefayile (njenge 755 okanye 644) kunye nezinye iindlela ezidlulileyo. Inombolo ye octal nganye iimaphu ezifanelekileyo kwi bits ezibini ezithathu, indlela nganye ye hex inani lamaphu kwisine.
Kutheni ndifumana "inani elingalunganga lesiseko"?
Inani elingeniswe alivunyelwanga kwisiseko esikhethiweyo - umzekelo uphawu F okanye inani 8 kwinani elibini, elivumela kuphela 0 ne 1. Tshintsha isiseko sengeniso ukuze sithelekise ixabiso lakho, okanye ulungise inani elingumqolo.
API — sebenzisa le calculator ukusuka kwikhowudi
Nceda le khadi lemali njengendawo esemva ye-JSON ekhululekileyo - akukho qhosha lifunekayo. Thumela amaxabiso endawo ezantsi njengeparameter yombuzo okanye i-JSON. Nantoni na oyenzayo isebenzisa okungagqibekanga okufanayo eli phepha ligqityiwe ngaphambili; iparameter engaziwayo yi 400, ayikho i zero ekhululekileyo. Funda i-API epheleleyo →
Incopho yesiphelo
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);
Results are estimates for general guidance only, not financial, medical or tax advice.