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

0 characters

Enter a hexadecimal number (0-9, A-F). The '0x' prefix is optional. Choose between unsigned and signed (two's complement) interpretation.

Bits:

0

Type:

Unsigned

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

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

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

The hexadecimal system is a base-16 numbering system that uses 16 distinct symbols. These symbols are 0-9 to represent values zero to nine, and A-F (or a-f) to represent values ten to fifteen.

ตารางการแปลงเลขฐานสิบหกเป็นทศนิยม

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

ส่วนเสริมของสอง

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

ในการแปลงจํานวนบวกเป็นจํานวนลบในส่วนเสริมของสอง:

  1. แปลงตัวเลขเป็นเลขฐานสอง
  2. Invert all the bits (change 0 to 1 and 1 to 0).
  3. เพิ่ม 1 ให้กับผลลัพธ์ของการผกผัน

ในการแปลงจํานวนส่วนเสริมของสองลบกลับเป็นทศนิยม:

  1. สลับบิตทั้งหมด
  2. เพิ่ม 1 ให้กับผลลัพธ์ของการผกผัน
  3. แปลงผลลัพธ์เป็นทศนิยมและนําหน้าด้วยเครื่องหมายลบ

ตัวอย่าง: 8-bit Two's Complement

Positive Number (5):

0000 0101 (binary)

Negative Number (-5):

1111 1010 (inverted bits of 5)

1111 1011 (add 1 = two's complement representation of -5)

ช่วงสําหรับส่วนเสริมของสอง 8 บิต:

-128 (1000 0000) to 127 (0111 1111)

Related Tools