이진 / 육진 / 소수 변환기
2진법, 8진법, 십진법 및 십육진법 사이의 숫자를 분해 테이블로 변환합니다.
입력하는 동안 결과가 업데이트됩니다.
이 계산기에 대해
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.
자주 묻는 질문
십진법을 십육진법으로 변환하는 방법은 무엇입니까?
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.
왜 컴퓨터에서 16진법을 사용합니까?
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.
접두사 0x, 0b 또는 0o가 있는 숫자를 입력할 수 있습니까?
0x(16진수), 0b(이진수) 또는 0o(8진수) 접두사가 자동으로 제거되므로 코드에서 바로 값을 붙여넣을 수 있습니다. 입력 기준을 입력하는 숫자와 일치하도록 선택하십시오.
비트 길이는 무엇을 말해주는가?
값이 필요로 하는 이진 숫자의 수입니다. 십진법 255는 8비트 (1바이트)이고, 256은 9비트가 필요합니다. 비트 길이는 데이터 형식을 선택하고 값이 바이트, 16비트 단어 또는 32비트 레지스터에 맞는지 확인하는 데 유용합니다.
옥탈은 무엇을 위해 사용되나요?
옥타블은 3개의 비트로 그룹화되어 유닉스 파일 권한(755 또는 644)과 일부 레거시 시스템에서 주로 나타납니다. 각 옥타블 자리는 정확히 3개의 이진 비트로 매핑되며, 각 16진수 자리는 4개로 매핑됩니다.
왜 "이 기지에 대한 잘못된 번호"가 나타나나요?
입력한 숫자가 선택한 기본값에서 허용되지 않습니다. 예를 들어 0과 1만 허용하는 글자 F 또는 이진 숫자의 숫자 8입니다. 입력 기본값을 값과 일치하도록 전환하거나 범위 밖의 숫자를 수정하십시오.
API — 코드에서 이 계산기를 사용
이 계산기를 무료 JSON 엔드포인트로 호출하세요. 키가 필요하지 않습니다. 아래 필드 값을 쿼리 매개 변수 또는 JSON으로 보내십시오. 누락된 모든 값은 이 페이지에서 미리 채워진 기본값을 사용합니다. 알 수 없는 매개변수는 400이며, 절대 0이 아닙니다. 전체 API 문서 읽기 →
끝점
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);
결과는 재정, 의료 또는 세금 조언이 아닌 일반적인 지침을위한 추정치입니다.