Monu Tools

แปลงฐานตัวเลข

แปลงตัวเลขระหว่างฐาน 2 (ไบนารี) 8 (ออกทัล) 10 (ทศนิยม) และ 16 (เฮกซาเดซิมัล) แก้ไขฟิลด์ใดก็ได้และฟิลด์อื่นจะอัปเดตทันที ค่าขนาดใหญ่แม่นยำโดยไม่มีการปัดเศษ

วิธีใช้ แปลงฐานเลข

  1. 01

    พิมพ์ตัวเลขในช่องใดช่องหนึ่งจากสี่ช่อง

  2. 02

    ฐานอื่นจะอัปเดตทันทีขณะที่คุณพิมพ์

  3. 03

    สลับตัวพิมพ์ใหญ่เฮกซาและคัดลอกค่าใดก็ได้ด้วยคลิกเดียว

What it does

This number base converter switches whole numbers between binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). Every field is editable, so you can type into any base and read the equivalent in the others instantly.

How number bases work

A number base is just how many distinct digits a system uses before it rolls over to the next position. Decimal uses ten (0 to 9), binary uses two (0 and 1), and hexadecimal uses sixteen, adding a to f for the values ten to fifteen, which is why a single hex digit neatly represents four binary bits.

Exact results with big integers

Conversions use arbitrary-precision integers (BigInt), so even very long values stay exact, without the rounding errors that affect ordinary floating-point numbers once they get large.

Why bases matter in low-level work

Bases come up all over low-level work: hexadecimal for colors, bytes and memory addresses, binary for flags and network masks, and octal for Unix file permissions. Reading the same value across bases makes debugging and bit-twiddling much easier.

Input rules and limits

A leading minus sign is supported for negatives, spaces are ignored so you can group digits for readability, and an option shows hexadecimal in upper or lower case.

It converts integers only; fractional base conversion is a separate problem and is intentionally left out so the results stay exact. Everything runs in your browser.

คำถามที่พบบ่อย

รองรับฐานใดบ้าง?

ไบนารี (ฐาน 2) ออกทัล (ฐาน 8) ทศนิยม (ฐาน 10) และเฮกซาเดซิมัล (ฐาน 16) คุณสามารถแก้ไขได้จากทุกฐาน และฐานที่เหลือจะตาม

จัดการตัวเลขขนาดใหญ่มากได้ไหม?

ได้ ใช้จำนวนเต็มความแม่นยำโดยพลการ (BigInt) ดังนั้นแม้ค่าที่ยาวมากก็แปลงได้อย่างแม่นยำโดยไม่มีข้อผิดพลาดการปัดเศษที่ส่งผลกระทบต่อจำนวนทศนิยมปกติ

ป้อนตัวเลขลบได้ไหม?

ได้ รองรับเครื่องหมายลบนำหน้า ช่องว่างจะถูกละเว้น ดังนั้นคุณสามารถจัดกลุ่มหลักเพื่อให้อ่านง่าย

รองรับทศนิยมหรือเศษส่วนไหม?

ไม่ แปลงเฉพาะจำนวนเต็มเท่านั้น การแปลงฐานเศษส่วนเป็นปัญหาแยกและถูกละเว้นโดยตั้งใจเพื่อให้ผลลัพธ์แม่นยำ

ฝังเครื่องมือนี้

เพิ่มเครื่องมือนี้ลงในเว็บไซต์ของคุณเอง คัดลอกสคริปต์ด้านล่าง โดยจะอัปเดตให้เป็นปัจจุบันโดยอัตโนมัติ

<iframe src="https://monu.tools/embed/th/number-base-converter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

เครื่องมือที่เกี่ยวข้อง