轉換器工具

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

二進位表示:

關於 Number Systems

十六進位系統

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

2 的補碼

2 的補碼是一種數學運算,用於在二進位系統中表示負數。它被廣泛用於計算,因為它簡化了加法和減法等算術運算。

要將正數轉換為 2 補碼中的負數:

  1. 將數位轉換為二進位。
  2. Invert all the bits (change 0 to 1 and 1 to 0).
  3. 將1添加到反轉的結果中。

要將負 2 的補碼數轉換回十進位:

  1. 反轉所有位。
  2. 將1添加到反轉的結果中。
  3. 將結果轉換為 decimal 並在其前面加上負號。

示例:8 位 2's 補碼

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 位 2 補碼的範圍:

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

Related Tools