---
title: 組合論理回路
url: https://doc.liz6.com/ja/hardware/05-digital-circuits/02-combinational-logic-circuits
locale: ja
area: hardware
tags:
- hardware
- digital-circuits
date: 2026-06-30
modified: 2026-07-16
description: '組合論理回路 組合論理とは 組合論理 — 出力は現在の入力のみによって決まり、記憶機能を持ちません。 組合論理: 出力は現在の入力のみによって決まる 入力 組合論理 純粋なゲート回路 · フィードバックなし 出力 时序論理との違い: クロックがなく、状態を保持しない。 --- 一般的な組合論理回路 マルプレックス回路 …'
---

# 組合論理回路

## 組合論理とは

**組合論理** — 出力は現在の入力のみによって決まり、記憶機能を持ちません。

<svg viewBox="0 0 720 210" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="組合論理ブロック図: 入力は組合論理を介して直接出力され、フィードバックや記憶はない">
  <defs><marker id="cmb1-ah" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <rect width="720" height="210" fill="#ffffff"/>
  <text x="360" y="28" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">組合論理: 出力は現在の入力のみによって決まる</text>
  <rect x="50" y="80" width="110" height="50" rx="8" fill="#e2e8f0"/>
  <text x="105" y="110" text-anchor="middle" font-size="13" font-weight="700" fill="#334155">入力</text>
  <line x1="160" y1="105" x2="245" y2="105" stroke="#475569" stroke-width="1.8" marker-end="url(#cmb1-ah)"/>
  <rect x="250" y="70" width="220" height="70" rx="8" fill="#4f46e5"/>
  <text x="360" y="100" text-anchor="middle" font-size="13" font-weight="700" fill="#ffffff">組合論理</text>
  <text x="360" y="120" text-anchor="middle" font-size="11" fill="#e0e7ff">純粋なゲート回路 · フィードバックなし</text>
  <line x1="470" y1="105" x2="555" y2="105" stroke="#475569" stroke-width="1.8" marker-end="url(#cmb1-ah)"/>
  <rect x="560" y="80" width="110" height="50" rx="8" fill="#e2e8f0"/>
  <text x="615" y="110" text-anchor="middle" font-size="13" font-weight="700" fill="#334155">出力</text>
  <rect x="60" y="158" width="600" height="38" rx="8" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="76" y="182" font-size="12.5" fill="#3730a3">时序論理との違い: クロックがなく、状態を保持しない。</text>
</svg>

---

## 一般的な組合論理回路

### マルプレックス回路 (MUX)
<svg viewBox="0 0 720 300" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="2入力1出力マルチプレクサのブロック図: AとBはデータ入力、Sは選択線。Sに応じてAまたはBがYに出力される">
  <defs><marker id="mux1-ah" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <rect width="720" height="300" fill="#ffffff"/>
  <text x="360" y="28" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">2入力1出力 MUX: 選択線 S によって A または B を出力 Y にルーティング</text>
  <rect x="60" y="86" width="70" height="28" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="95" y="105" text-anchor="middle" font-size="12" font-weight="700" fill="#3730a3">A</text>
  <line x1="130" y1="100" x2="248" y2="112" stroke="#475569" stroke-width="1.6" marker-end="url(#mux1-ah)"/>
  <rect x="60" y="126" width="70" height="28" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="95" y="145" text-anchor="middle" font-size="12" font-weight="700" fill="#3730a3">B</text>
  <line x1="130" y1="140" x2="248" y2="130" stroke="#475569" stroke-width="1.6" marker-end="url(#mux1-ah)"/>
  <rect x="60" y="166" width="70" height="28" rx="6" fill="#e2e8f0"/>
  <text x="95" y="185" text-anchor="middle" font-size="12" font-weight="700" fill="#334155">S</text>
  <line x1="130" y1="180" x2="248" y2="150" stroke="#475569" stroke-width="1.6" marker-end="url(#mux1-ah)"/>
  <text x="95" y="212" text-anchor="middle" font-size="10" fill="#64748b">選択線</text>
  <rect x="250" y="80" width="180" height="90" rx="8" fill="#4f46e5"/>
  <text x="340" y="130" text-anchor="middle" font-size="14" font-weight="700" fill="#ffffff">2入力1出力 MUX</text>
  <line x1="430" y1="125" x2="465" y2="125" stroke="#475569" stroke-width="1.8" marker-end="url(#mux1-ah)"/>
  <rect x="470" y="105" width="100" height="40" rx="6" fill="#ccfbf1"/>
  <text x="520" y="130" text-anchor="middle" font-size="13" font-weight="700" fill="#115e59">Y</text>
  <text x="60" y="230" font-size="12" fill="#334155">Y = S ? B : A (S=0 で A を選択, S=1 で B を選択) — Y = Ā·S + B·S</text>
  <rect x="60" y="248" width="600" height="36" rx="8" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="76" y="271" font-size="12.5" fill="#3730a3">用途: シグナルルーティング、並列→直列変換、論理関数の実装</text>
</svg>

### デコーダ (Decoder)
```
n ビット入力 → 2ⁿ ビット出力 (一度に1ビットのみが1になる)

  2→4 デコーダ:
    A1 A0 | Y0 Y1 Y2 Y3
     0  0 |  1  0  0  0
     0  1 |  0  1  0  0
     1  0 |  0  0  1  0
     1  1 |  0  0  0  1

用途: アドレスデコーディング (チップセレクト信号)、7セグメントディスプレイ駆動
代表的なチップ: 74HC138 (3→8), 74HC154 (4→16)
```

### エンコーダ (Encoder)
```
デコーダの逆操作: 2ⁿ ビット入力 → n ビット出力

優先エンコーダ: 複数の入力が同時に有効な場合、最も優先度の高いエンコーディングを出力
代表的なチップ: 74HC148 (8→3 優先エンコーダ)
```

### 加算器

#### ハーフアッダー (Half Adder)
<svg viewBox="0 0 720 240" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="ハーフアッダーのブロック図: 入力AとBを加算し、和Sと桁上げCを出力">
  <defs><marker id="ha1-ah" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <rect width="720" height="240" fill="#ffffff"/>
  <text x="360" y="28" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">ハーフアッダー(HA): 2ビットの加算、和と桁上げを出力</text>
  <rect x="60" y="86" width="70" height="28" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="95" y="105" text-anchor="middle" font-size="12" font-weight="700" fill="#3730a3">A</text>
  <line x1="130" y1="100" x2="248" y2="100" stroke="#475569" stroke-width="1.6" marker-end="url(#ha1-ah)"/>
  <rect x="60" y="126" width="70" height="28" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="95" y="145" text-anchor="middle" font-size="12" font-weight="700" fill="#3730a3">B</text>
  <line x1="130" y1="140" x2="248" y2="140" stroke="#475569" stroke-width="1.6" marker-end="url(#ha1-ah)"/>
  <rect x="250" y="75" width="180" height="80" rx="8" fill="#4f46e5"/>
  <text x="340" y="112" text-anchor="middle" font-size="14" font-weight="700" fill="#ffffff">ハーフアッダー</text>
  <text x="340" y="130" text-anchor="middle" font-size="11" fill="#e0e7ff">HA</text>
  <line x1="430" y1="100" x2="465" y2="100" stroke="#475569" stroke-width="1.6" marker-end="url(#ha1-ah)"/>
  <rect x="470" y="85" width="190" height="30" rx="6" fill="#f0fdfa" stroke="#99f6e4"/>
  <text x="565" y="105" text-anchor="middle" font-size="12" font-weight="700" fill="#115e59">S = A⊕B(和)</text>
  <line x1="430" y1="140" x2="465" y2="140" stroke="#475569" stroke-width="1.6" marker-end="url(#ha1-ah)"/>
  <rect x="470" y="126" width="190" height="30" rx="6" fill="#f0fdfa" stroke="#99f6e4"/>
  <text x="565" y="146" text-anchor="middle" font-size="12" font-weight="700" fill="#115e59">C = A·B(桁上げ)</text>
  <rect x="60" y="185" width="600" height="36" rx="8" fill="#ffedd5"/>
  <text x="76" y="208" font-size="12.5" fill="#9a3412">桁上げ入力がなく、最下位ビットの加算のみ可能</text>
</svg>

#### フルアッダー (Full Adder)
<svg viewBox="0 0 720 280" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="フルアッダーのブロック図: 入力A、B、Cin、出力は和Sと桁上げCout。カスケード接続して多ビット加算器を構成可能">
  <defs><marker id="fa1-ah" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <rect width="720" height="280" fill="#ffffff"/>
  <text x="360" y="28" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">フルアッダー(FA): 桁上げ入力 Cin を追加し、カスケード接続可能</text>
  <rect x="60" y="80" width="70" height="28" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="95" y="99" text-anchor="middle" font-size="12" font-weight="700" fill="#3730a3">A</text>
  <line x1="130" y1="94" x2="248" y2="105" stroke="#475569" stroke-width="1.6" marker-end="url(#fa1-ah)"/>
  <rect x="60" y="120" width="70" height="28" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="95" y="139" text-anchor="middle" font-size="12" font-weight="700" fill="#3730a3">B</text>
  <line x1="130" y1="134" x2="248" y2="130" stroke="#475569" stroke-width="1.6" marker-end="url(#fa1-ah)"/>
  <rect x="60" y="160" width="70" height="28" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="95" y="179" text-anchor="middle" font-size="12" font-weight="700" fill="#3730a3">Cin</text>
  <line x1="130" y1="174" x2="248" y2="155" stroke="#475569" stroke-width="1.6" marker-end="url(#fa1-ah)"/>
  <rect x="250" y="70" width="180" height="120" rx="8" fill="#4f46e5"/>
  <text x="340" y="122" text-anchor="middle" font-size="14" font-weight="700" fill="#ffffff">フルアッダー</text>
  <text x="340" y="142" text-anchor="middle" font-size="11" fill="#e0e7ff">FA</text>
  <line x1="430" y1="100" x2="465" y2="100" stroke="#475569" stroke-width="1.6" marker-end="url(#fa1-ah)"/>
  <rect x="470" y="85" width="190" height="30" rx="6" fill="#f0fdfa" stroke="#99f6e4"/>
  <text x="565" y="105" text-anchor="middle" font-size="11" font-weight="700" fill="#115e59">S = A⊕B⊕Cin(和)</text>
  <line x1="430" y1="160" x2="465" y2="160" stroke="#475569" stroke-width="1.6" marker-end="url(#fa1-ah)"/>
  <rect x="470" y="145" width="190" height="30" rx="6" fill="#f0fdfa" stroke="#99f6e4"/>
  <text x="565" y="165" text-anchor="middle" font-size="10.5" font-weight="700" fill="#115e59">Cout=A·B+(A⊕B)·Cin</text>
  <rect x="60" y="205" width="600" height="55" rx="8" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="76" y="227" font-size="12.5" fill="#3730a3">Cout = A·B + (A⊕B)·Cin —— 1の数が多数なら桁上げする。</text>
  <text x="76" y="246" font-size="12.5" fill="#3730a3">n個のフルアッダーをカスケード接続 = nビット加算器。</text>
</svg>

#### リップルキャリー vs キャリーロクアヘッド
```
リップルキャリー (Ripple Carry):
  桁上げが段々伝播 → 遅延が大きい (n×t_fa)
  単純で面積が小さい

キャリーロクアヘッド (Carry Lookahead):
  すべての桁上げを並列計算 → 遅延が小さい (O(log n))
  複雑度が高く、面積が大きい

代表的なチップ: 74HC283 (4ビット キャリーロクアヘッド加算器)
```

### コンパレータ
<svg viewBox="0 0 720 300" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="コンパレータのブロック図: 入力A、B、出力はA>B、A=B、A<Bの3つの比較結果">
  <defs><marker id="cmp1-ah" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <rect width="720" height="300" fill="#ffffff"/>
  <text x="360" y="28" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">コンパレータ: ビットごとの比較を行い、3つの大小関係を出力</text>
  <rect x="60" y="95" width="70" height="28" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="95" y="114" text-anchor="middle" font-size="12" font-weight="700" fill="#3730a3">A</text>
  <line x1="130" y1="109" x2="248" y2="115" stroke="#475569" stroke-width="1.6" marker-end="url(#cmp1-ah)"/>
  <rect x="60" y="165" width="70" height="28" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="95" y="184" text-anchor="middle" font-size="12" font-weight="700" fill="#3730a3">B</text>
  <line x1="130" y1="179" x2="248" y2="165" stroke="#475569" stroke-width="1.6" marker-end="url(#cmp1-ah)"/>
  <rect x="250" y="75" width="180" height="130" rx="8" fill="#4f46e5"/>
  <text x="340" y="145" text-anchor="middle" font-size="14" font-weight="700" fill="#ffffff">コンパレータ</text>
  <line x1="430" y1="98" x2="465" y2="98" stroke="#475569" stroke-width="1.6" marker-end="url(#cmp1-ah)"/>
  <rect x="470" y="85" width="120" height="26" rx="6" fill="#f0fdfa" stroke="#99f6e4"/>
  <text x="530" y="103" text-anchor="middle" font-size="12" font-weight="700" fill="#115e59">A &gt; B</text>
  <line x1="430" y1="140" x2="465" y2="140" stroke="#475569" stroke-width="1.6" marker-end="url(#cmp1-ah)"/>
  <rect x="470" y="127" width="120" height="26" rx="6" fill="#f0fdfa" stroke="#99f6e4"/>
  <text x="530" y="145" text-anchor="middle" font-size="12" font-weight="700" fill="#115e59">A = B</text>
  <line x1="430" y1="182" x2="465" y2="182" stroke="#475569" stroke-width="1.6" marker-end="url(#cmp1-ah)"/>
  <rect x="470" y="169" width="120" height="26" rx="6" fill="#f0fdfa" stroke="#99f6e4"/>
  <text x="530" y="187" text-anchor="middle" font-size="12" font-weight="700" fill="#115e59">A &lt; B</text>
  <rect x="60" y="225" width="600" height="50" rx="8" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="76" y="246" font-size="12.5" fill="#3730a3">上位ビットから下位ビットへ順に比較する。</text>
  <text x="76" y="264" font-size="12.5" fill="#3730a3">代表的なチップ: 74HC85 (4ビット コンパレータ)。</text>
</svg>

---

## プログラマブル論理

### 基本的な考え方
```
ゲート回路を組むのではなく、プログラム可能なデバイスで任意の論理を実現する

PAL/GAL: 与える配列はプログラム可能 + 或る配列は固定
CPLD: 複数のPALブロック + プログラマブルな相互接続
FPGA: ルックアップテーブル (LUT) + フリップフロップ + プログラマブルな相互接続
```

### FPGA の LUT
```
2ⁿ 入力の LUT は、任意の n 入力論理関数を実現可能

3-LUT: 8個のSRAMセルで真理値表を保存 + 3段のMUXツリー
→ 任意の3入力ブール関数!

代表的なチップ: 6-LUT (Xilinx), 4-LUT + 加算器 (Intel ALM)
```

---

## 时序の問題

### 伝播遅延 (tpd)
```
入力が出力に安定して反映されるまでに必要な時間

複数のゲートが直列の場合: 総遅延 = 各ゲートの遅延の和
クリティカルパス: 遅延が最も長いパス → 回路の最大動作周波数を決定する
```

### 競争とハザード
```
複数のパスで遅延が異なる場合 → 出力にグリッチが発生する可能性がある

検出: カルノー図において、隣接する主項の間でカバーされていない部分がある
解決策: 冗長項を追加するか、出力でクロック同期する (レジスタで1サイクル遅延させる)
```

---

## 一般的な応用

| 回路 | 機能 | チップ |
|------|------|------|
| 3ステートバッファ | バス接続の制御 | 74HC125/126 |
| バストランシーバ | 双方向データ伝送 | 74HC245 |
| ラッチ | レベルトリガーによる保持 | 74HC373/573 |
| シフトレジスタ | 直列/並列変換 | 74HC595 |

---
*キーワード: 組合論理, MUX, デコーダ, 加算器, コンパレータ, FPGA, LUT, グリッチ, クリティカルパス*
