Hex ถึง Octal

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

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

0 characters

Enter a hexadecimal number (0-9, A-F). The '0x' prefix is optional. The conversion will automatically handle both positive and negative numbers.

การเป็นตัวแทนไบนารี:

การแสดงทศนิยม:

เกี่ยวกับระบบตัวเลข

ระบบเลขฐานสิบหก

ระบบเลขฐานสิบหกหรือเรียกสั้นๆ ว่าฐานสิบหกเป็นระบบตัวเลขฐาน 16 ที่ใช้ตัวเลข 0-9 และตัวอักษร AF เพื่อแสดงค่า 10-15 เลขฐานสิบหกมักใช้ในการคํานวณและอุปกรณ์อิเล็กทรอนิกส์ดิจิทัล เนื่องจากเป็นตัวแทนของค่ารหัสไบนารีที่เป็นมิตรกับมนุษย์มากขึ้น

ระบบแปดเหลี่ยม

The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Octal numerals can be made from binary numerals by grouping consecutive binary digits into groups of three (starting from the right).

ตารางการแปลงเลขฐานสิบหกเป็นฐานแปด

Hexadecimal Octal Hexadecimal Octal
0 0 8 10
1 1 9 11
2 2 A 12
3 3 B 13
4 4 C 14
5 5 D 15
6 6 E 16
7 7 F 17

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

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

  1. แปลงเลขฐานสิบหกแต่ละหลักเป็นไบนารี 4 บิตที่เทียบเท่า
  2. Group the resulting binary digits into sets of three (starting from the right), and convert each group to its octal equivalent.

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

ขั้นตอนที่ 1: แปลงหลักฐานสิบหกแต่ละหลักเป็นไบนารี 4 บิต:

1 → 0001

A → 1010

รวม: 0001 1010

Step 2: Group binary digits into sets of three (from right):

000 110 100

ขั้นตอนที่ 3: แปลงแต่ละกลุ่ม 3 บิตเป็นฐานแปด:

000 → 0

110 → 6

100 → 4

Result:

064 (leading zeros can be omitted: 64)

Related Tools