From 14ac75ae38ac0c6c294224e9f0d7bb5d4273f9e9 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Tue, 3 Sep 2024 20:00:39 +0300 Subject: [PATCH] Improve documentation for truth table generator --- Math/Truth table calculator/doc/index.org | 85 +++++++++++++++++------ 1 file changed, 64 insertions(+), 21 deletions(-) diff --git a/Math/Truth table calculator/doc/index.org b/Math/Truth table calculator/doc/index.org index d912db2..58783bd 100644 --- a/Math/Truth table calculator/doc/index.org +++ b/Math/Truth table calculator/doc/index.org @@ -15,35 +15,78 @@ based on all possible combinations of inputs. Each row represents a possible sta the input variables, with the corresponding output value. Truth tables are crucial in designing and understanding digital circuits, Boolean algebra, and logical expressions. -Basic components: -- Inputs: Represent the variables (e.g., A, B). -- Outputs: Results based on the logical operation of the inputs. +* Implemented logical operations -Example for AND (A AND B): +** Equivalent ( ⇔ , 1 ) -| A | B | A AND B | -|---+---+---------| -| T | T | T | -| T | F | F | -| F | T | F | +The equivalent operation, also known as logical biconditional, is true if and only if +both inputs are the same. In other words, it asserts that both propositions are +either both true or both false. It is often represented by the symbol *⇔*. -* Implemented logical operations -** Equivalent ( ⇔ , 1 ) -- True if both inputs are the same. -- False if the inputs are different. +Truth Table: + +| A | B | A ⇔ B | +|---+---+-------| +| T | T | T | +| T | F | F | +| F | T | F | +| F | F | T | ** Implies ( ⇒ , 2 ) -- True if the first input implies the second. -- False if the first is true and the second is false. + +An implication asserts that if the first proposition is true, the +second must be true as well. If the first is false, the implication +holds regardless of the second proposition's value. + +Truth table: + +| A | B | A ⇒ B | +|---+---+-------| +| T | T | T | +| T | F | F | +| F | T | T | +| F | F | T | + ** OR ( ∨ , 3 ) -- True if at least one input is true. -- False if both inputs are false. + +The OR operation, also known as logical disjunction, is true if at +least one of the inputs is true. It asserts that if either proposition +is true, the entire expression is true. + +Truth table: + +| A | B | A ∨ B | +|---+---+-------| +| T | T | T | +| T | F | T | +| F | T | T | +| F | F | F | ** AND ( ∧ , 4 ) -- True if both inputs are true. -- False otherwise. + +The AND operation, also known as logical conjunction, is true if and +only if both inputs are true. + +Truth table: + +| A | B | A ∧ B | +|---+---+-------| +| T | T | T | +| T | F | F | +| F | T | F | +| F | F | F | + ** NOT ( ¬ , 5 ) -- Inverts the value of the input. -- True becomes false, and false becomes true. + +The NOT operation, also known as logical negation, inverts the value +of the input. If the input is true, the output is false, and vice +versa. + +Truth Table: + +| A | ¬A | +|---+----| +| T | F | +| F | T | -- 2.20.1