# 진리표 생성기

> Truth table of a Boolean expression in up to 6 variables, with the canonical sum of products, product of sums, minterms and maxterms.

직접 계산할 수 있는 페이지: https://www.calcopenly.com/ko/math/truth-table-generator
분야: 수학 계산기

A truth table lists the value of a Boolean expression for every combination of its inputs: 2ⁿ rows for n variables, so 8 rows for A, B and C. Each row where the expression is 1 is a minterm, and the OR of those minterms is the canonical sum of products; each row where it is 0 is a maxterm, and the AND of the maxterms is the canonical product of sums. Both describe the same function.

Digital logic and computer science students use it to check circuit designs, simplify conditions and verify logic laws. The default, (A and B) or not C, is true in 5 of 8 rows, minterms 0, 2, 4, 6 and 7, and false in rows 1, 3 and 5.

Up to 6 variables (64 rows) are accepted. Precedence runs not, and/nand, xor, or/nor, implies (grouped from the right), then iff; symbols such as !, &, | and ^ also work. An expression true in every row is a tautology, and one false in every row is a contradiction.

## 입력

- **Boolean expression**: Operators: not (! ~ ¬ or a trailing '), and (& ·), nand, xor (^ ⊕), or (| +), nor, implies (->), iff (<->). Constants 0 and 1.

## 결과

- Canonical sum of products — 주요 결과
- Canonical product of sums
- Minterms (rows that are 1)
- Maxterms (rows that are 0)
- Rows that are true
- Classification

## 공식

$$
\begin{aligned} F &= \sum_{F(m)=1} m \quad \text{(sum of minterms)} \\[4pt] &= \prod_{F(M)=0} M \quad \text{(product of maxterms)} \end{aligned}
$$

## 계산 예제

### A and B

- Boolean expression: A and B
- **Canonical sum of products: A·B**
- **Minterms (rows that are 1): Σm(3)**
- **Rows that are true: 1**
- **Classification: Contingent**
- 검증 출처: Python itertools.product over (A, B): only A=1, B=1 is true

### A xor B

- Boolean expression: A xor B
- **Canonical sum of products: A'·B + A·B'**
- **Minterms (rows that are 1): Σm(1, 2)**
- **Canonical product of sums: (A + B)·(A' + B')**
- 검증 출처: Python itertools.product with a != b

### A implies B

- Boolean expression: A -> B
- **Minterms (rows that are 1): Σm(0, 1, 3)**
- **Maxterms (rows that are 0): ΠM(2)**
- **Canonical product of sums: (A' + B)**
- 검증 출처: Python itertools.product with (not a) or b

### Tautology: A or not A (edge case)

- Boolean expression: A or not A
- **Classification: Tautology**
- **Canonical product of sums: 1**
- **Rows that are true: 2**
- 검증 출처: Law of excluded middle; Python check over A in (0, 1)

### (A and B) or not C

- Boolean expression: (A and B) or not C
- **Minterms (rows that are 1): Σm(0, 2, 4, 6, 7)**
- **Maxterms (rows that are 0): ΠM(1, 3, 5)**
- **Rows that are true: 5**
- 검증 출처: Python itertools.product over (A, B, C) with (a and b) or not c

### nand binds tighter than nor

- Boolean expression: A nand B nor C
- **Minterms (rows that are 1): Σm(6)**
- **Canonical sum of products: A·B·C'**
- 검증 출처: Python: not ((not (a and b)) or c) over itertools.product

## 자주 묻는 질문

### How do you make a truth table?

List every combination of the inputs by counting in binary: 2 variables give 4 rows, 3 give 8, and 6 give 64. Then evaluate the expression in each row, working from the innermost operation outward. For (A and B) or not C, the row A = 1, B = 1, C = 1 gives (1 and 1) or 0 = 1, while A = 0, B = 0, C = 1 gives 0 or 0 = 0.

### What are minterms and maxterms?

A minterm is an AND of every variable, each plain or negated, that is 1 in exactly one row; a maxterm is an OR of every variable that is 0 in exactly one row. Row numbers index them: for A, B and C, minterm 6 is A·B·C′ and maxterm 1 is (A + B + C′). A function is the OR of its minterms and, equally, the AND of its maxterms.

### What is the difference between sum of products and product of sums?

A sum of products (SOP) ORs together AND terms, one for each row where the function is 1; a product of sums (POS) ANDs together OR terms, one for each row where it is 0. A xor B is A′·B + A·B′ as a sum of products and (A + B)·(A′ + B′) as a product of sums. Both are complete; the shorter one is whichever has fewer rows to cover.

### What is a tautology in logic?

An expression that is true in every row of its truth table, whatever the inputs. A or not A, the law of excluded middle, is the simplest; (A → B) or (B → A) is another. The opposite, false in every row, is a contradiction, such as A and not A, and anything true in some rows but not others is called contingent.

### When is A implies B true?

A → B is false only when A is true and B is false; in the other three rows it is true. Its truth table therefore has minterms 0, 1 and 3 and a single maxterm, 2, and it is equivalent to not A or B and to its contrapositive, not B → not A. A chain such as A → B → C groups from the right, as A → (B → C).

### “진리표 생성기”의 정확도는 어느 정도인가요?

정확도는 입력값과 계산 방법의 가정에 따라 달라집니다. 십진 연산은 유효숫자 50자리를 사용하지만, 추정값·수치해석 방법·원본 데이터의 정밀도는 더 낮을 수 있습니다. 표시값을 반올림해도 이러한 한계는 사라지지 않습니다. 독립적인 출처의 풀이와 대조한 계산 예시: 8. 예를 들어 “A and B”은 Python itertools.product over (A, B): only A=1, B=1 is true와 대조해 확인합니다.

### 이 계산 방법의 출처는 무엇인가요?

Wolfram MathWorld — Truth Table; Wikipedia — Canonical normal form (minterms and maxterms).

## 출처

- [Wolfram MathWorld — Truth Table](https://mathworld.wolfram.com/TruthTable.html)
- [Wikipedia — Canonical normal form (minterms and maxterms)](https://en.wikipedia.org/wiki/Canonical_normal_form)
