コンバータツール
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
バイナリ表現:
16進数表現:
番号システムについて
十進
10 進法は、0、1、2、3、4、5、6、7、8、9 の 10 個の記号を使用する基数 10 の番号付けシステムです。これは、日常生活で最も一般的に使用される数体系です。
オクタルシステム
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).
10進数から8進数への変換テーブル
| 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 の補数を 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)