Ka whakarerekētia te tahuri ā-rua / tahuri-rua / ira

Ka tahuri tētahi tau i waenganui i te ā-rua, te tapawhā, te ira me te tekauira, me tētahi tātaitanga whakaroa.

Ko te ira —
Rārua —
Hekitoru —
Wharua —
Tauwaenga bit —

Ka whakahōutia ngā hua i te wā e tātuhi ana.

Did this calculator give you the right answer?

Mo tēnei tātaitai

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.

Ko nga pātai e pā ana

He pēhea te tahuri i te ira ki te ira tekauira?

Ka whakawehe anō mā te 16 me te whakaako i ngā toenga mai i te whakamutunga ki te tuatahi, mā te whakamahi i te A–F mō te 10–15. Ko te ira 255 ko te FF i roto i te whakawhāiti me te 11 i roto i te ā-rua.

He aha te whakamahinga o te tekauira i roto i te rorohiko?

Ka whakamahere ia mati tekauira ki ngā kōwae ā-rua, nō reira ko te tekauira he ara tata, he āhua mārama ki te tuhi i ngā uara paepae me ngā āhua o te pūmahara — 0xFF tētahi paepae o ngā mea katoa.

Ka taea e au te tāuru i ngā tau me ngā tohutūtū 0x, 0b, 0o rānei?

He. He whakawātea tōtika tētahi 0x (hex), 0b (rua), 0o rānei (whā) o te tohutohu, kia taea ai e koe te tāpiri i ngā uara mai i te waehere. Mā te mātaki i te pūtake tāuru e kōwhiria ana e koe e ōrite ana ki ngā mati e tāuru ana e koe.

He aha te roanga iti e kī ana ki a au?

Ko te maha o ngā mati ā-rua e hiahiatia ana e te uara. Ko te ira 255 he 8 ngā kōwae (kotahi kotahi); e hiahiatia ana e te 256 he 9 ngā kōwae. He whai painga te roanga kōwae ki te kōwhiri i ngā momo raraunga me te whakamātau mēnā ka ōrite te uara ki tētahi kōwae, ki tētahi kupu 16-kotahi, ki tētahi pūkete 32-kotahi rānei.

He aha te whakamahinga o te tapawhā?

Ko ngā rōpū tapawhā he wae i roto i ngā wae e toru, ā, ko te nuinga o te wā e puta ana i roto i ngā whakaaetanga faila Unix (pēnei i te 755, 644 rānei) me ētahi pūnaha tūturu. Ka whakarārangi ia mati tapawhā ki ngā wae tatoro e toru, i te āhua o ia mati tapawhā ki te whā.

He aha te take i whiwhi ai au i te "tau kāore i te tika mō tēnei pūtake"?

Kāore e whakaaetia tētahi mati i tāpoitia e koe i roto i te pūtake i kōwhiria — hei tauira, te tuhipoka F, te mati 8 rānei i roto i tētahi tau ā-rua, e whakaaetia ana anake te 0 me te 1. Ka huri te pūtake tāuru kia ōrite ki tōna uara, kia tika rānei te mati i waho o te awhe.

❤️ Love Calculator.Free? Whakawehe

𝕏  X Facebook Reddit
API — whakamahi tēnei tātaitai mai i te waehere

E kī ana tēnei tātaitai hei wāhi mutunga kore JSON - kāore he kī e hiahiatia ana. Ka tukuna ngā uara āpure i raro nei hei tohutoro pātai, JSON rānei. Anything you omit uses the same default this page is pre-filled with; an unknown parameter is a 400, never a silent zero. Ka pānui te papatono API katoa →

Whakamutunga

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);

Ko ngā hua he whakataunga mō te tohutohu ahuwhānui anake, ehara i te tohutohu moni, rongoā, tāke rānei.