基数変換 計算ツール
2進・8進・10進・16進・ビットシフト
Required Parameters
Waiting for input data...
Quick Answer
Hex maps to binary: each hex digit = 4 bits. FF = 11111111 = 255. Common values: 0xFF = 255, 0xFFFF = 65535, 0xFFFFFFFF = 4.29 billion. Convert binary to decimal by summing powers of 2. Two's complement: invert bits and add 1 for negative numbers.
進数変換 計算ツール
2進・8進・10進・16進の間で数値を変換します。組み込みプログラミングやディジタル設計に便利です。
進数の種類
- 2進(Binary) — 基数 2。ディジタル論理で使用
- 8進(Octal) — 基数 8。Unix のパーミッションなど
- 10進(Decimal) — 基数 10。人間が読みやすい表記
- 16進(Hexadecimal) — 基数 16。メモリアドレスや色コードなど
Design Notes
Number base conversion is fundamental for embedded programming, memory addressing, register configuration, and protocol analysis. Hex is the standard for displaying binary data because it aligns perfectly with 4-bit nibble boundaries.
Common Mistakes
- 1
Mixing up 0x (hex prefix) with 0 (decimal) — 0x10 = 16, not 10.
- 2
Forgetting two's complement for signed integers — 0xFF is 255 unsigned but -1 signed (8-bit).
- 3
Using octal (0o prefix) accidentally in JavaScript by adding a leading zero to what should be a decimal number.
Knowledge Base
16進数のFFは?
FF = 10進で255 = 2進で11111111。8ビットバイトの最大値。16進1桁 = 4ビット。
2進→10進の変換方法は?
右から各桁が2の累乗:2⁰=1, 2¹=2, 2²=4... 例:10110 = 16+4+2 = 22。
なぜプログラマーは16進を使う?
16進は2進に完全に対応(1桁=4ビット)。メモリアドレス、カラーコード、レジスタ値の表示に最適。
2の補数とは?
負数の表現:全ビット反転して+1。8ビットで-1 = 0xFF。範囲:-128〜+127。
ビットシフトの仕組みは?
左にN = 2^N倍。右にN = 2^Nで割る。CPUの高速演算の基礎。