ข้อความเป็นฐานแปด

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

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

0 characters

Enter text to convert to octal. Choose between UTF-8 (supports all characters) and ASCII (only 128 characters). Spaces between octal values can be added or removed.

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

Character รหัส UTF-8 ค่าอแปดฐาน

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

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

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

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 octal (base-8) representation.
  3. หรือแยกค่าฐานแปดแต่ละค่าด้วยช่องว่างเพื่อให้อ่านง่าย

ตัวอย่าง: แปลง "Hi" เป็นฐานแปด

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

H → 72

i → 105

ขั้นตอนที่ 2: แปลงค่าตัวเลขแต่ละค่าเป็นฐานแปด:

72 → 110 (in octal)

105 → 151 (in octal)

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

110 151

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

  • 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