ข้อความเป็นฐานสิบหก

แปลงข้อความเป็นการแสดงเลขฐานสิบหกได้อย่างง่ายดาย

เครื่องมือแปลง

0 characters

Enter text to convert to hexadecimal. Choose between UTF-8 (supports all characters) and ASCII (only 128 characters). Options to add spaces between hex values and use uppercase letters are available.

ตารางการแปลง:

Character รหัส UTF-8 Hex Value

เกี่ยวกับการแปลงข้อความเป็นเลขฐานสิบหก

การเข้ารหัสข้อความ

อักขระข้อความจะแสดงด้วยตัวเลขในคอมพิวเตอร์ ระบบการเข้ารหัสที่แตกต่างกันใช้ตัวเลขที่แตกต่างกันสําหรับอักขระ:

ASCII

The ASCII (American Standard Code for Information Interchange) encoding uses 7 bits to represent 128 characters, including English letters (both uppercase and lowercase), digits, and common punctuation symbols. Each ASCII character can be represented by a unique number between 0 and 127.

UTF-8

UTF-8 เป็นการเข้ารหัสอักขระที่มีความยาวตัวแปรซึ่งสามารถแสดงอักขระทุกตัวในมาตรฐาน Unicode ใช้ 1 ถึง 4 ไบต์ต่ออักขระ UTF-8 เข้ากันได้กับ ASCII แบบย้อนหลัง ซึ่งหมายความว่าอักขระ UTF-8 128 ตัวแรกจะเหมือนกับ ASCII

กระบวนการแปลง

การแปลงข้อความเป็นเลขฐานสิบหกเกี่ยวข้องกับขั้นตอนต่อไปนี้:

  1. Determine the numerical value of each character using the chosen encoding (ASCII or UTF-8).
  2. Convert each numerical value to its hexadecimal (base-16) representation.
  3. หรือแยกค่าเลขฐานสิบหกแต่ละค่าด้วยช่องว่างเพื่อให้อ่านง่าย
  4. หรือแปลงตัวอักษรเลขฐานสิบหกทั้งหมดเป็นตัวพิมพ์ใหญ่

ตัวอย่าง: แปลง "Hi" เป็นเลขฐานสิบหก

Step 1: Convert each character to its numerical value (ASCII):

H → 72

i → 105

ขั้นตอนที่ 2: แปลงค่าตัวเลขแต่ละค่าเป็นเลขฐานสิบหก:

72 → 48 (in hexadecimal)

105 → 69 (in hexadecimal)

Step 3: Combine the hexadecimal values (with spaces):

48 69

หมายเหตุการใช้งาน

  • When using ASCII encoding, any character outside the 7-bit ASCII range (128-255) will be converted to a question mark (?).
  • การเข้ารหัส UTF-8 รองรับอักขระ Unicode ทั้งหมด รวมถึงสัญลักษณ์พิเศษ อิโมจิ และอักขระจากภาษาที่ไม่ใช่ภาษาอังกฤษ
  • อักขระ UTF-8 แต่ละตัวอาจแสดงด้วยค่าเลขฐานสิบหกหลายค่าหากใช้มากกว่าหนึ่งไบต์
  • ค่าเลขฐานสิบหกมักใช้ในการคํานวณสําหรับที่อยู่หน่วยความจํารหัสสีและการแสดงข้อมูลไบนารี

Related Tools