コンバータツール
0 bits
Enter a binary number (spaces are allowed for readability). Choose between unsigned and signed (two's complement) interpretation.
Bits:
0
Type:
Unsigned
このツールについて
バイナリから 10 進数へのコンバーターは、2 進数を 10 進数に変換するツールです。各 2 進数は、符号なし数として解釈されるか、2 の補数表現を使用した符号付き数として解釈されます。
仕組み
- The input binary string is validated to ensure it contains only 0s and 1s (spaces are allowed for readability).
- The user can choose between unsigned and signed (two's complement) interpretation.
- For unsigned interpretation, each bit's value is calculated based on its position (2^position) and summed up.
- For signed interpretation (two's complement), if the leftmost bit is 1, the number is negative. The two's complement conversion is applied to determine the magnitude.
- 結果の 10 進数が表示されます。
一般的な用途
- コンピュータサイエンス教育:コンピューターで2進数が10進数として解釈される方法を理解する。
- デジタルエレクトロニクス:ハードウェアからのバイナリ信号を人間が読める 10 進数に変換する。
- Programming:ファイルまたはネットワークソケットから読み取られたバイナリデータを10進数として解釈します。
- データ分析:バイナリ エンコードされたデータを 10 進数形式に変換して分析します。
- Cryptography:バイナリでエンコードされたキーまたは値を 10 進数に変換して、暗号化計算を行います。
バイナリシステムの基本
バイナリシステムでは、0 と 1 の 2 桁のみを使用して数値を表します。2進数の各桁はビットと呼ばれます。2進数は、負の数の2の補数など、さまざまな方法を使用して正の数と負の数の両方を表すために使用できます。
バイナリから 10 進数への変換の例
| Binary | 符号なし10進数 | Signed Decimal (Two's Complement) |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0101 | 5 | 5 |
| 1000 | 8 | -8 |
| 1111 | 15 | -1 |
| 11111111 | 255 | -1 |