コンバータツール
Enter a decimal number. Choose between unsigned and signed (two's complement) interpretation. Select the bit size to format the output correctly.
Bits:
0
Type:
Unsigned
バイナリ表現:
番号システムについて
十進
10 進法は、0、1、2、3、4、5、6、7、8、9 の 10 個の記号を使用する基数 10 の番号付けシステムです。これは、日常生活で最も一般的に使用される数体系です。
16進法
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.
10進数から16進数への変換テーブル
| Decimal | Hexadecimal | Decimal | Hexadecimal |
|---|---|---|---|
| 0 | 0 | 8 | 8 |
| 1 | 1 | 9 | 9 |
| 2 | 2 | 10 | A |
| 3 | 3 | 11 | B |
| 4 | 4 | 12 | C |
| 5 | 5 | 13 | D |
| 6 | 6 | 14 | E |
| 7 | 7 | 15 | F |
2 の補数
2 の補数は、バイナリ システムで負の数を表すために使用される数学演算です。これは、加算や減算などの算術演算を簡略化するため、コンピューティングで広く使用されています。
正の数を 2 の補数で負の数に変換するには、次のようにします。
- 数値をバイナリに変換します。
- Invert all the bits (change 0 to 1 and 1 to 0).
- 反転の結果に 1 を加算します。
負の 2 の補数を 10 進数に戻すには:
- すべてのビットを反転します。
- 反転の結果に 1 を加算します。
- 結果を 10 進数に変換し、負の符号をプレフィックスとして付けます。
例: 8 ビット 2 の補数
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)