Nhazi
Kpọgharịa nọmba n'etiti binairi, oktalaị, desimali na heksadesimali.
Nhọrọ ndị ahụ ga-akpụzi mgbe ị na-etipụta.
N'ihe banyere calculator a
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.
Ajụjụ ndị a na-ajụkarị
Olee otú m ga-esi gbanwee ndezi ka ọbụna?
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.
Gịnị bụ hexadecimal a na-eji maka?
Heksadesimalụ (isi 16) na-echekwa bitị binarị anọ n'ime dijit (0-9 mgbe ahụ A-F), ya mere ọ bụ ụzọ dị mfe iji depụta baịtị. Desimalụ nọmba 255 bụ FF n'ime heksa.
Gịnị mere nọmba m ji gosi dashes?
Dijitị ahụ ga-adị mma maka isi mmalite base - dịka ọmụmaatụ 0 na 1 na binaịra, mọọbụ 0-9 na A-F na heksa. Dijitị a na-ezere na-eme ka nsonaazụ ahụ adịghị n'ezipụta.
Gịnị bụ ihe n'ihe?
Ha bụ dijitị 1 maka váùtù 10 ruo 15: A bụ 10, B bụ 11, ruo F bụ 15. Nke a na-enye okpuru 16 ohere ịhazi nọmba ruo 15 n'otu ebe tupu ya achọ ịnabata.
Gịnị mere heksadigiti ọbụla ji dị n'otu na banye digiti anọ?
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.
Ọ bụrụ na ọbụna a na-ejikwa ọnụọgụgụ ndị ahụ?
Ọ na-arụ ọrụ na intị ọnụọgụgụ na ọ bụ n'ụzọ ziri ezi ruo mgbe intị ọnụọgụgụ n'ime mpaghara ebe ahụ echekwara n'ụzọ ziri ezi (n'ihe dịka 9 quadrillion, mọọbụ 2⁵³). N'ebe ahụ, ogologo binary mọọbụ hexadecimal strings nwere ike ịhapụ n'ụzọ ziri ezi na digits ha nke ikpeazụ.
API — jiri kaadị a site na kóòdù
Kpọọ kalkulata a dịka ebe ngwụcha JSON n'efu - enweghị kii achọrọ. Ziga valiu ebe ahụ n'okpuru dịka paramita ajụjụ mọọbụ JSON. Ihe ọbụla ị na-ewepụ na-eji dìfọ́ọ̀ltụ̀ nke a na-edebe ihuakwụkwọ a na ya; parameter a na-amaghị bụ 400, ọ dịghị sẽọ̀rọ̀. Gụọ ngwe ndị ahụ niile →
Ebemkpofuozi
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);
Ihe a na-ahụta bụ n'ihi nlekọta n'ozuzu ya, ọ bụghị nlekọta ego, ọgwụ ma ọ bụ nlekọta ego.