轉換器工具
Enter a decimal number. Choose between unsigned and signed (two's complement) interpretation. The bit size affects how negative numbers are represented.
Bits:
0
Type:
Unsigned
二進位表示:
十六進位表示:
關於 Number Systems
十進位系統
十進位系統是一種以 10 為基數的編號系統,它使用十個不同的符號:0、1、2、3、4、5、6、7、8 和 9。它是日常生活中最常用的數字系統。
Octal 系統
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).
十進位到八進位轉換表
| Decimal | Octal | Decimal | Octal |
|---|---|---|---|
| 0 | 0 | 8 | 10 |
| 1 | 1 | 9 | 11 |
| 2 | 2 | 10 | 12 |
| 3 | 3 | 11 | 13 |
| 4 | 4 | 12 | 14 |
| 5 | 5 | 13 | 15 |
| 6 | 6 | 14 | 16 |
| 7 | 7 | 15 | 17 |
2 的補碼
2 的補碼是一種數學運算,用於在二進位系統中表示負數。它被廣泛用於計算,因為它簡化了加法和減法等算術運算。
要將正數轉換為 2 補碼中的負數:
- 將數位轉換為二進位。
- Invert all the bits (change 0 to 1 and 1 to 0).
- 將1添加到反轉的結果中。
要將負 2 的補碼數轉換回十進位:
- 反轉所有位。
- 將1添加到反轉的結果中。
- 將結果轉換為 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)