Number and Conversion Techniques เทคนิคการแปลงเลขฐาน

Convert between denary, binary, and hexadecimal แปลงระหว่างฐานสิบ ฐานสอง และฐานสิบหก

You can convert between denary, binary, and hexadecimal by hand using two ideas: place values (multiply each digit by its column value, then add) and repeated division by the target base (then read the remainders). Python int(…, base), bin(), and hex() give the same answers — use them only to check your work.

เราแปลงระหว่างฐานสิบ ฐานสอง และฐานสิบหกด้วยมือได้ด้วยแนวคิดหลัก 2 อย่าง คือ ค่าประจำหลัก (คูณเลขแต่ละหลักด้วยค่าประจำหลัก แล้วบวกกัน) และ การหารซ้ำด้วยฐานปลายทาง (แล้วอ่านเศษ) ส่วน Python int(…, base), bin() และ hex() ให้คำตอบเดียวกัน ใช้เพียงเพื่อตรวจคำตอบ

Handy conversion ideas แนวคิดที่ใช้บ่อย

  • Any base → base 10: multiply each digit by its place value (\(b^{N}\)) and add. ฐานใด ๆ → ฐาน 10: คูณเลขแต่ละหลักด้วยค่าประจำหลัก (\(b^{N}\)) แล้วบวกกัน
  • Base 10 → base 2: divide by 2 repeatedly, read remainders bottom‑to‑top. ฐาน 10 → ฐาน 2: หารด้วย 2 ซ้ำ ๆ อ่านเศษจากล่างขึ้นบน
  • Base 10 → base 16: divide by 16 repeatedly, read remainders bottom‑to‑top (10–15 → A–F). ฐาน 10 → ฐาน 16: หารด้วย 16 ซ้ำ ๆ อ่านเศษจากล่างขึ้นบน (เศษ 10–15 เขียนเป็น A–F)
  • Base 16 → base 2: replace each hex digit with its 4‑bit group. ฐาน 16 → ฐาน 2: แทนแต่ละหลักฐานสิบหกด้วยเลขฐานสอง 4 บิต
  • Base 2 → base 16: group bits into 4s from the right, pad with leading zeros, convert each group to one hex digit. ฐาน 2 → ฐาน 16: แบ่งบิตเป็นกลุ่มละ 4 จากขวา เติมศูนย์นำหน้าให้ครบ แล้วแปลงแต่ละกลุ่มเป็นเลขฐานสิบหก 1 หลัก

Converting any base to base 10 การแปลงเลขฐานใด ๆ เป็นฐาน 10

  • Step 1: multiply each digit by its place value (\(d \times b^{N}\)). Step 1: นำค่าของเลขโดดคูณด้วยค่าประจำหลัก (\(d \times b^{N}\))
  • Step 2: add the results of every column. Step 2: หาผลรวมของทุกหลัก

Example 1: binary 1111 1111 ตัวอย่าง 1 เลขฐาน 2 คือ 1111 1111

Place (N) หลัก (N) 7 6 5 4 3 2 1 0 Total (base 10) รวม (เลขฐาน 10)
Step 1 \(1 \times 2^{7}\) \(1 \times 2^{6}\) \(1 \times 2^{5}\) \(1 \times 2^{4}\) \(1 \times 2^{3}\) \(1 \times 2^{2}\) \(1 \times 2^{1}\) \(1 \times 2^{0}\) 255
Step 2 128 64 32 16 8 4 2 1 255

Example 2: hexadecimal FF ตัวอย่าง 2 เลขฐาน 16 คือ FF

Place (N) หลัก (N) 7 6 5 4 3 2 1 0 Total (base 10) รวม (เลขฐาน 10)
Step 1 - - - - - - \(15 \times 16^{1}\) \(15 \times 16^{0}\) 255
Step 2 - - - - - - 240 15 255

Converting base 10 to base 2 การแปลงเลขฐาน 10 เป็นฐาน 2

  • Method: take the base‑10 number, divide by 2 repeatedly, and record the quotient and remainder each time. Stop when the quotient is 0, then read the remainders from bottom to top. วิธีการ คือเอาตัวเลขฐาน 10 ตั้ง แล้วหารด้วย 2 ซ้ำ ๆ บันทึกผลหารและเศษไว้ทุกครั้ง ทำจนผลหารเป็น 0 แล้วอ่านเศษจากล่างขึ้นบน

Example: convert 101 (base 10) ตัวอย่าง กำหนดให้เลข 101 เป็นเลขฐาน 10

Denary เลขฐานสิบ ÷ 2 quotient ผลหาร Remainder เศษ
101501
50250
25121
1260
630
311
101

Reading the remainders bottom‑to‑top gives 1100101; padding to 8 bits: 0110 0101. อ่านเศษจากล่างขึ้นบนได้ 1100101 เติมศูนย์นำหน้าให้ครบ 8 บิต ได้ 0110 0101

Check by converting 0110 0101 back to base 10: ทดสอบแปลงเลขฐาน 2 0110 0101 กลับเป็นเลขฐาน 10:

Place (N) หลัก (N) 7 6 5 4 3 2 1 0 Total (base 10) รวม (เลขฐาน 10)
Step 1 \(0 \times 2^{7}\) \(1 \times 2^{6}\) \(1 \times 2^{5}\) \(0 \times 2^{4}\) \(0 \times 2^{3}\) \(1 \times 2^{2}\) \(0 \times 2^{1}\) \(1 \times 2^{0}\) 101
Step 2 0 64 32 0 0 4 0 1 101

Converting base 10 to base 16 การแปลงเลขฐาน 10 เป็นฐาน 16

  • Method: same as base 10 → base 2, but divide by 16 each time and read the remainders bottom‑to‑top. A remainder of 10–15 is written as A–F. วิธีการ เหมือนการแปลงฐาน 10 → ฐาน 2 แต่หารด้วย 16 ทุกครั้ง แล้วอ่านเศษจากล่างขึ้นบน เศษที่มีค่า 10–15 เขียนเป็น A–F

Example: convert 101 (base 10) ตัวอย่าง กำหนดให้เลข 101 เป็นเลขฐาน 10

Denary เลขฐานสิบ ÷ 16 quotient ผลหาร Remainder เศษ
10165
606

Reading the remainders bottom‑to‑top gives 6, 5 → 65 in base 16. อ่านเศษจากล่างขึ้นบนได้ 6, 5 → เลขฐาน 16 คือ 65

Check by converting 65 (base 16) back to base 10: ทดสอบแปลงเลขฐาน 16 65 กลับเป็นเลขฐาน 10:

Place (N) หลัก (N) 7 6 5 4 3 2 1 0 Total (base 10) รวม (เลขฐาน 10)
Step 1 - - - - - - \(6 \times 16^{1}\) \(5 \times 16^{0}\) 101
Step 2 - - - - - - 96 5 101

Converting base 16 to base 2 การแปลงเลขฐาน 16 เป็นฐาน 2

  • Method: split the number into single digits and replace each hex digit with exactly 4 bits (from the table below). Join the groups in order. วิธีการ คือแยกตัวเลขออกเป็นทีละ 1 หลัก แล้วแทนแต่ละหลักฐานสิบหกด้วยเลขฐานสอง 4 บิตเสมอ (ตามตารางด้านล่าง) จากนั้นนำแต่ละกลุ่มมาเรียงต่อกัน
Base 16 ฐาน 16 Base 2 ฐาน 2 Base 16 ฐาน 16 Base 2 ฐาน 2
0000081000
1000191001
20010A1010
30011B1011
40100C1100
50101D1101
60110E1110
70111F1111

Example: hexadecimal 65 → 6 is 0110, 5 is 0101 → 0110 0101. ตัวอย่าง เลขฐาน 16 คือ 65 → 6 คือ 0110, 5 คือ 0101 → 0110 0101

Check by converting 0110 0101 back to base 10: ทดสอบแปลงเลขฐาน 2 0110 0101 กลับเป็นเลขฐาน 10:

Place (N) หลัก (N) 7 6 5 4 3 2 1 0 Total (base 10) รวม (เลขฐาน 10)
Step 1 \(0 \times 2^{7}\) \(1 \times 2^{6}\) \(1 \times 2^{5}\) \(0 \times 2^{4}\) \(0 \times 2^{3}\) \(1 \times 2^{2}\) \(0 \times 2^{1}\) \(1 \times 2^{0}\) 101
Step 2 0 64 32 0 0 4 0 1 101

Converting base 2 to base 16 การแปลงเลขฐาน 2 เป็นฐาน 16

  • Method: group the bits into 4s starting from the right. If the left‑most group has fewer than 4 bits, pad it with leading zeros. Convert each 4‑bit group to one hex digit (use the 4‑bit table above). วิธีการ คือแบ่งเลขฐาน 2 ออกเป็นกลุ่มละ 4 บิต โดยเริ่มนับจากขวาสุด ถ้ากลุ่มซ้ายสุดไม่ครบ 4 บิต ให้เติมศูนย์นำหน้าจนครบ แล้วแปลงแต่ละกลุ่ม 4 บิตเป็นเลขฐานสิบหก 1 หลัก (ใช้ตาราง 4 บิตด้านบน)

Example 1: 0110 0101 → 0110 is 6, 0101 is 5 → 65 in base 16. ตัวอย่าง 1 0110 0101 → 0110 คือ 6, 0101 คือ 5 → เลขฐาน 16 คือ 65

Example 2 (with padding): 110101 → split from the right 11 | 0101 → pad the left group 0011 | 0101 → 3, 5 → 35 in base 16. ตัวอย่าง 2 (มีการเติมศูนย์) 110101 → แบ่งจากขวา 11 | 0101 → เติมศูนย์กลุ่มซ้าย 0011 | 0101 → 3, 5 → เลขฐาน 16 คือ 35

Check by converting 65 (base 16) back to base 10 — it matches 0110 0101 from Example 1: ทดสอบแปลงเลขฐาน 16 65 กลับเป็นเลขฐาน 10 — ตรงกับ 0110 0101 ในตัวอย่าง 1:

Place (N) หลัก (N) 7 6 5 4 3 2 1 0 Total (base 10) รวม (เลขฐาน 10)
Step 1 - - - - - - \(6 \times 16^{1}\) \(5 \times 16^{0}\) 101
Step 2 - - - - - - 96 5 101

Check your work with Python ตรวจคำตอบด้วย Python

The by‑hand methods above are the point of this lesson. These optional demos just confirm the same answers with int(…, base), bin(), and hex().

วิธีทำด้วยมือด้านบนคือหัวใจของบทนี้ ตัวอย่างด้านล่างเป็นทางเลือกไว้ยืนยันคำตอบเดียวกันด้วย int(…, base), bin() และ hex()

1 Binary → denary with int(…, 2) 1 ฐานสอง → ฐานสิบ ด้วย int(…, 2)

int("111001", 2) parses a binary digit string as base-2 and returns denary. For a smaller check, expand 1101 by place values: 8+4+0+1.

int("111001", 2) อ่านสตริงฐานสองเป็น base-2 แล้วคืนค่าฐานสิบ ตรวจด้วยเลขเล็ก 1101 โดยกระจายค่าประจำหลัก: 8+4+0+1

[1]
[output]
57
13
13

2 Denary → binary with bin() 2 ฐานสิบ → ฐานสอง ด้วย bin()

By hand you repeatedly divide by 2 and read remainders from bottom to top. bin(135) does the conversion and returns a string prefixed with 0b.

แบบมือคือหารด้วย 2 ซ้ำแล้วอ่านเศษจากล่างขึ้นบน bin(135) แปลงให้และคืนสตริงที่ขึ้นต้นด้วย 0b

[2]
[output]
0b10000111
135

3 Hex ↔ binary / denary 3 ฐานสิบหก ↔ ฐานสอง / ฐานสิบ

int("3C", 16) and hex(60) move between hex and denary. Conceptually, 3C is two 4-bit groups: 0011 and 1100 → 00111100.

int("3C", 16) และ hex(60) แปลงระหว่างฐานสิบหกกับฐานสิบ ตามแนวคิด 3C คือสองกลุ่ม 4 บิต: 0011 และ 1100 → 00111100

[3]
[output]
60
0x3c
60
True

Note: Run uses a JavaScript simulator, not real Python. For real Python, try Google Colab. หมายเหตุ: ปุ่ม Run จำลองด้วย JavaScript ไม่ใช่ Python จริง หากต้องการ Python จริง ลองใช้ Google Colab

References References / แหล่งอ้างอิง

Sources used for conversion techniques:

แหล่งที่ใช้ประกอบเนื้อหาเทคนิคการแปลงเลข:

  1. Number base conversion — Wikipedia — Binary number (conversion) / Hexadecimal (conversion) (place-value sums, repeated division, and 4-bit digit groups) (ผลรวมค่าประจำหลัก การหารซ้ำ และกลุ่ม 4 บิต)
  2. Python int / bin / hex — Built-in Functions — int / bin / hex (used in the check-your-work demos) (ใช้ในตัวอย่าง Run สำหรับตรวจคำตอบ)

End-of-lesson quizแบบฝึกหัดท้ายบท

ตอบแล้ว 0 / 10

ข้อ 1

1 / 10

How do you convert binary to denary with the sum-of-place-values method?การแปลงเลขฐานสองเป็นฐานสิบด้วยวิธีผลรวมของค่าประจำหลัก ทำอย่างไร?

เฉลย / Answerซ่อนเฉลย / Hide

เฉลย / Answer: (A) Multiply each digit by its place value (2^N), then add all the resultsคูณเลขแต่ละหลักด้วยค่าประจำหลัก (2^N) แล้วบวกผลทั้งหมด

คำอธิบายแต่ละตัวเลือก / Explanation for each choice

  • (A) Multiply each digit by its place value (2^N), then add all the resultsคูณเลขแต่ละหลักด้วยค่าประจำหลัก (2^N) แล้วบวกผลทั้งหมด
    Correct! Step 1 multiply by the place value, Step 2 add every column.ถูกต้อง! Step 1 คูณด้วยค่าประจำหลัก Step 2 บวกทุกหลัก
  • (B) Divide the binary number by 2 repeatedly and read the remaindersหารเลขฐานสองด้วย 2 ซ้ำ ๆ แล้วอ่านเศษ
    Wrong: repeated division is for converting denary to another base.ผิด: การหารซ้ำใช้ตอนแปลงจากฐานสิบไปฐานอื่น
  • (C) Count how many bits are 1นับจำนวนบิตที่เป็น 1
    Wrong: each 1-bit must be weighted by its place value.ผิด: แต่ละบิต 1 ต้องคูณด้วยค่าประจำหลักของตำแหน่งนั้น
  • (D) Group the bits into 4s and use a tableจับกลุ่มบิตละ 4 แล้วเปิดตาราง
    Wrong: 4-bit grouping converts to hexadecimal.ผิด: การจับกลุ่ม 4 บิตใช้แปลงเป็นฐานสิบหก

ข้อ 2

2 / 10

What is binary 1111 1111 in denary?เลขฐานสอง 1111 1111 มีค่าเท่ากับเท่าใดในฐานสิบ?

เฉลย / Answerซ่อนเฉลย / Hide

เฉลย / Answer: (C) 255255

คำอธิบายแต่ละตัวเลือก / Explanation for each choice

  • (A) 127127
    Wrong: 127 is 0111 1111 in binary.ผิด: 127 คือ 0111 1111₂
  • (B) 256256
    Wrong: 256 is 1 0000 0000 (needs 9 bits).ผิด: 256 คือ 1 0000 0000₂ (ใช้ 9 บิต)
  • (C) 255255
    Correct! 128+64+32+16+8+4+2+1 = 255.ถูกต้อง! 128+64+32+16+8+4+2+1 = 255
  • (D) 511511
    Wrong: 511 is 1 1111 1111 in binary.ผิด: 511 คือ 1 1111 1111₂

ข้อ 3

3 / 10

What is binary 0110 0101 in denary?เลขฐานสอง 0110 0101 มีค่าเท่ากับเท่าใดในฐานสิบ?

เฉลย / Answerซ่อนเฉลย / Hide

เฉลย / Answer: (B) 101101

คำอธิบายแต่ละตัวเลือก / Explanation for each choice

  • (A) 9797
    Wrong: that misses the 2^2 column (value 4).ผิด: ลืมบวกหลัก 2^2 ที่มีค่า 4
  • (B) 101101
    Correct! 64+32+4+1 = 101.ถูกต้อง! 64+32+4+1 = 101
  • (C) 150150
    Wrong: that reverses the bit order (1010 0110).ผิด: นั่นคือการอ่านบิตกลับด้าน (1010 0110₂)
  • (D) 202202
    Wrong: that is double the correct value.ผิด: นั่นเป็นสองเท่าของคำตอบที่ถูก

ข้อ 4

4 / 10

When converting denary to binary by dividing by 2 repeatedly, how do you read the remainders?เมื่อแปลงฐานสิบเป็นฐานสองด้วยการหารด้วย 2 ต่อเนื่อง ต้องอ่านเศษอย่างไร?

เฉลย / Answerซ่อนเฉลย / Hide

เฉลย / Answer: (D) Bottom to topจากล่างขึ้นบน

คำอธิบายแต่ละตัวเลือก / Explanation for each choice

  • (A) Top to bottomจากบนลงล่าง
    Wrong: that gives the bits in reverse.ผิด: จะได้บิตกลับด้าน
  • (B) Only the remainders that equal 1อ่านเฉพาะเศษที่เป็น 1
    Wrong: keep every remainder, including the 0s.ผิด: ต้องเก็บเศษทุกตัว รวมทั้ง 0
  • (C) Read the quotients instead of the remaindersอ่านผลหารแทนเศษ
    Wrong: the answer's bits are the remainders, not the quotients.ผิด: บิตของคำตอบคือเศษ ไม่ใช่ผลหาร
  • (D) Bottom to topจากล่างขึ้นบน
    Correct! The last remainder is the most significant bit.ถูกต้อง! เศษตัวสุดท้ายคือบิตซ้ายสุด

ข้อ 5

5 / 10

Which is denary 101 written as an 8-bit binary number?เลขฐานสิบ 101 เขียนเป็นเลขฐานสอง 8 บิต ได้ตรงกับข้อใด?

เฉลย / Answerซ่อนเฉลย / Hide

เฉลย / Answer: (C) 0110 01010110 0101

คำอธิบายแต่ละตัวเลือก / Explanation for each choice

  • (A) 0110 10100110 1010
    Wrong: that is 106.ผิด: นั่นคือ 106
  • (B) 0100 01010100 0101
    Wrong: that is 69.ผิด: นั่นคือ 69
  • (C) 0110 01010110 0101
    Correct! 101 = 64+32+4+1.ถูกต้อง! 101 = 64+32+4+1
  • (D) 0110 01100110 0110
    Wrong: that is 102 (the 2^0 bit should be 1).ผิด: นั่นคือ 102 (หลัก 2^0 ควรเป็น 1)

ข้อ 6

6 / 10

When converting hexadecimal to binary, how many bits should each hex digit be paired with?การแปลงเลขฐาน 16 เป็นฐาน 2 แต่ละหลักในฐาน 16 ควรจับคู่เป็นกี่บิต?

เฉลย / Answerซ่อนเฉลย / Hide

เฉลย / Answer: (B) 4 bits4 บิต

คำอธิบายแต่ละตัวเลือก / Explanation for each choice

  • (A) 2 bits2 บิต
    Wrong: 2 bits only cover 0–3.ผิด: 2 บิตแทนได้แค่ค่า 0–3
  • (B) 4 bits4 บิต
    Correct! One hex digit (0–15) is exactly 4 bits.ถูกต้อง! 1 หลักฐานสิบหก (0–15) เท่ากับ 4 บิตพอดี
  • (C) 8 bits8 บิต
    Wrong: 8 bits is one byte, i.e. two hex digits.ผิด: 8 บิตคือ 1 ไบต์ เท่ากับ 2 หลักฐานสิบหก
  • (D) It depends on the digit's valueขึ้นกับค่าของหลักนั้น
    Wrong: always 4 bits, padded with leading zeros when needed.ผิด: ใช้ 4 บิตเสมอ เติมศูนย์นำหน้าถ้าจำเป็น

ข้อ 7

7 / 10

Which is hexadecimal 65 converted to binary?เลขฐานสิบหก 65 แปลงเป็นเลขฐานสองได้ตรงกับข้อใด?

เฉลย / Answerซ่อนเฉลย / Hide

เฉลย / Answer: (A) 0110 01010110 0101

คำอธิบายแต่ละตัวเลือก / Explanation for each choice

  • (A) 0110 01010110 0101
    Correct! 6 = 0110 and 5 = 0101.ถูกต้อง! 6 = 0110 และ 5 = 0101
  • (B) 0101 01100101 0110
    Wrong: the two digits are swapped.ผิด: สลับลำดับสองหลัก
  • (C) 0110 01100110 0110
    Wrong: digit 5 is 0101, not 0110.ผิด: หลัก 5 ต้องเป็น 0101 ไม่ใช่ 0110
  • (D) 1000 00011000 0001
    Wrong: that is 129 (0x81).ผิด: นั่นคือค่า 129 (81₁₆)

ข้อ 8

8 / 10

What is hexadecimal 65 in denary?เลขฐานสิบหก 65 มีค่าเท่ากับเท่าใดในฐานสิบ?

เฉลย / Answerซ่อนเฉลย / Hide

เฉลย / Answer: (D) 101101

คำอธิบายแต่ละตัวเลือก / Explanation for each choice

  • (A) 6565
    Wrong: that reads it as base 10; use the 16s place values.ผิด: นั่นเป็นการอ่านแบบฐานสิบ ต้องใช้ค่าประจำหลัก 16
  • (B) 1111
    Wrong: 6+5 = 11 just adds the digits and ignores place values.ผิด: 6+5 = 11 เป็นการบวกหลักเฉย ๆ ไม่ใช้ค่าประจำหลัก
  • (C) 160160
    Wrong: that weights both digits by 16.ผิด: นั่นคือ 6×16 + 5×16 คิดค่าประจำหลักผิด
  • (D) 101101
    Correct! 6×16 + 5×1 = 96 + 5 = 101.ถูกต้อง! 6×16 + 5×1 = 96 + 5 = 101

ข้อ 9

9 / 10

Convert denary 101 to hexadecimal by dividing by 16 (101 ÷ 16 = 6 remainder 5). What is the result?แปลงเลขฐานสิบ 101 เป็นเลขฐานสิบหกด้วยการหารด้วย 16 (101 ÷ 16 = 6 เศษ 5) ได้ผลลัพธ์ใด?

เฉลย / Answerซ่อนเฉลย / Hide

เฉลย / Answer: (C) 6565

คำอธิบายแต่ละตัวเลือก / Explanation for each choice

  • (A) 5656
    Wrong: the quotient and remainder are swapped.ผิด: สลับผลหารกับเศษ
  • (B) 6.56.5
    Wrong: a base has no decimal point; use the quotient and remainder.ผิด: เลขฐานไม่มีจุดทศนิยม ใช้ผลหารและเศษ
  • (C) 6565
    Correct! Quotient 6 then remainder 5 gives 65 in hex.ถูกต้อง! ผลหาร 6 แล้วตามด้วยเศษ 5 ได้ 65₁₆
  • (D) A5A5
    Wrong: the remainder is 5, not 10 (A).ผิด: เศษคือ 5 ไม่ใช่ 10 (A)

ข้อ 10

10 / 10

To convert binary to hexadecimal, into what group size do you split the bits, and from which side do you start?การแปลงเลขฐานสองเป็นฐานสิบหก ต้องแบ่งบิตเป็นกลุ่มละเท่าใด และเริ่มจากด้านใด?

เฉลย / Answerซ่อนเฉลย / Hide

เฉลย / Answer: (A) Groups of 4 bits, starting from the right, padding the left-most group with leading zerosกลุ่มละ 4 บิต เริ่มจากขวาสุด แล้วเติมศูนย์นำหน้ากลุ่มซ้ายสุด

คำอธิบายแต่ละตัวเลือก / Explanation for each choice

  • (A) Groups of 4 bits, starting from the right, padding the left-most group with leading zerosกลุ่มละ 4 บิต เริ่มจากขวาสุด แล้วเติมศูนย์นำหน้ากลุ่มซ้ายสุด
    Correct! 4 bits equal one hex digit.ถูกต้อง! 4 บิตเท่ากับ 1 หลักฐานสิบหก
  • (B) Groups of 4 bits, starting from the leftกลุ่มละ 4 บิต เริ่มจากซ้ายสุด
    Wrong: start from the right, or the grouping shifts.ผิด: ต้องเริ่มจากขวา ไม่งั้นการจับกลุ่มจะเลื่อน
  • (C) Groups of 3 bits, starting from the rightกลุ่มละ 3 บิต เริ่มจากขวาสุด
    Wrong: 3-bit groups are for octal.ผิด: กลุ่ม 3 บิตใช้กับฐานแปด (octal)
  • (D) Groups of 8 bits, starting from the rightกลุ่มละ 8 บิต เริ่มจากขวาสุด
    Wrong: 8 bits gives 0–255, not a single hex digit.ผิด: 8 บิตให้ค่า 0–255 ไม่ใช่ 1 หลักฐานสิบหก