เวลา/ตัวเลข
ตัวแปลงระบบเลขฐาน
แปลงสองทิศทางระหว่างเลขฐานสอง ฐานแปด ฐานสิบ ฐานสิบหก และฐานที่กำหนดเอง (2-36) — ป้อนตัวเลขในช่องใดก็ได้
Number systems are just different ways of writing the same number. Binary (base 2) is what processors use at the lowest level, hexadecimal (base 16) is a compact way to write binary data in code, and decimal is the everyday human notation.
How to use it
- Enter a number in any field (binary, octal, decimal, hexadecimal, or a custom base 2-36) — every other field updates instantly.
- For a custom base, pick any value from 2 to 36 — handy for less common systems, like base36 used in short identifiers.
- Characters invalid for the selected base (like a "2" in binary) are flagged as an input error.
Common uses
- Converting a hex color or byte value into a decimal number for calculations.
- Checking a bitmask or set of flags written in binary.
- Working with low-level code (network protocols, embedded systems) where values are often given in hex or octal.
Things to keep in mind
In hexadecimal, the letters A-F (or a-f) stand for the values 10-15 — case usually doesn't matter.
For bases above 16, digit symbols keep going further down the alphabet (G, H...) up to Z for base 36.
บทความเกี่ยวกับเครื่องมือนี้: ระบบเลข: เหตุใดจึงมีระบบเลขฐานสอง ฐานแปด และฐานสิบหก
คำถามที่พบบ่อย
ตัวแปลงรองรับระบบเลขฐานใดบ้าง?
เข้าถึงเลขฐานสอง ฐานแปด ฐานสิบ และฐานสิบหกได้อย่างรวดเร็ว รวมถึงฐานใดก็ได้ตั้งแต่ 2 ถึง 36 — ตัวเลขที่มากกว่า 9 จะแสดงด้วยตัวอักษรละติน A-Z
ฉันสามารถแปลงเลขติดลบและจำนวนเต็มขนาดใหญ่มากได้หรือไม่?
ได้ เครื่องหมาย "-" หน้าตัวเลขรองรับในทุกฐาน และไม่มีข้อจำกัด 32/64 บิตตายตัวสำหรับขนาดตัวเลข — การคำนวณใช้ความแม่นยำแบบไม่จำกัด
ข้อมูลถูกส่งไปยังเซิร์ฟเวอร์หรือไม่?
ไม่ การแปลงทั้งหมดเกิดขึ้นทันทีในเบราว์เซอร์ของคุณผ่าน JavaScript ตัวเลขที่คุณป้อนจะไม่ถูกส่งไปที่ใดเลย
การแปลงระบบเลขฐานต่างจาก Base64 อย่างไร?
สิ่งเหล่านี้แตกต่างกันโดยพื้นฐาน: ตัวแปลงระบบเลขฐานแปลงตัวเลขเดียวกันระหว่างระบบตำแหน่ง (BIN/OCT/DEC/HEX) ในขณะที่ Base64 เข้ารหัสข้อมูลไบนารีใด ๆ (ไฟล์ รูปภาพ) เป็นสตริงข้อความสำหรับส่งผ่านช่องทางที่ออกแบบมาสำหรับข้อความ
ทำไมระบบเลขฐานสิบหกจึงใช้ตัวอักษร A-F?
ฐาน 16 ต้องการเลข 16 ตัวที่ไม่ซ้ำกัน แต่เลขอารบิกมีเพียง 10 ตัว (0-9) — ดังนั้นค่า 10-15 จึงใช้ตัวอักษรละตินตัวแรก A-F แทน สำหรับฐานที่มากกว่า 16 (จนถึง 36) การใช้ตัวอักษรจะดำเนินต่อไป