From e8a1e2f01972b755654b533c90936ff7bc93c3aa Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Mon, 2 Sep 2024 13:35:02 +0300 Subject: [PATCH] Add documentation for truth table generator --- .gitignore | 1 + .../doc}/img/screenshot, 1.png | Bin .../doc}/img/screenshot, 2.png | Bin .../doc}/img/screenshot, 3.png | Bin Math/Truth table calculator/doc/index.org | 49 ++++++++++++++++++ .../truth.bas} | 0 6 files changed, 50 insertions(+) rename Math/{Logic solver => Truth table calculator/doc}/img/screenshot, 1.png (100%) rename Math/{Logic solver => Truth table calculator/doc}/img/screenshot, 2.png (100%) rename Math/{Logic solver => Truth table calculator/doc}/img/screenshot, 3.png (100%) create mode 100644 Math/Truth table calculator/doc/index.org rename Math/{Logic solver/logic.bas => Truth table calculator/truth.bas} (100%) diff --git a/.gitignore b/.gitignore index 9cc5c0d..dfbf8f0 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /QB45 /index.html /Graphics/3D/3D Synthezier/doc/index.html +/Math/Truth table calculator/doc/index.html diff --git a/Math/Logic solver/img/screenshot, 1.png b/Math/Truth table calculator/doc/img/screenshot, 1.png similarity index 100% rename from Math/Logic solver/img/screenshot, 1.png rename to Math/Truth table calculator/doc/img/screenshot, 1.png diff --git a/Math/Logic solver/img/screenshot, 2.png b/Math/Truth table calculator/doc/img/screenshot, 2.png similarity index 100% rename from Math/Logic solver/img/screenshot, 2.png rename to Math/Truth table calculator/doc/img/screenshot, 2.png diff --git a/Math/Logic solver/img/screenshot, 3.png b/Math/Truth table calculator/doc/img/screenshot, 3.png similarity index 100% rename from Math/Logic solver/img/screenshot, 3.png rename to Math/Truth table calculator/doc/img/screenshot, 3.png diff --git a/Math/Truth table calculator/doc/index.org b/Math/Truth table calculator/doc/index.org new file mode 100644 index 0000000..d912db2 --- /dev/null +++ b/Math/Truth table calculator/doc/index.org @@ -0,0 +1,49 @@ +#+SETUPFILE: ~/.emacs.d/org-styles/html/darksun.theme +#+TITLE: Truth table calculator +#+LANGUAGE: en +#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry} +#+LATEX_HEADER: \usepackage{parskip} +#+LATEX_HEADER: \usepackage[none]{hyphenat} + +#+OPTIONS: H:20 num:20 +#+OPTIONS: author:nil + +- See also: https://en.wikipedia.org/wiki/Truth_table + +A truth table is a mathematical table used to determine the output of a logic function +based on all possible combinations of inputs. Each row represents a possible state of +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. + +Example for AND (A AND B): + +| A | B | A AND B | +|---+---+---------| +| T | T | T | +| T | F | F | +| F | T | F | + +* Implemented logical operations +** Equivalent ( ⇔ , 1 ) +- True if both inputs are the same. +- False if the inputs are different. + +** Implies ( ⇒ , 2 ) +- True if the first input implies the second. +- False if the first is true and the second is false. + +** OR ( ∨ , 3 ) +- True if at least one input is true. +- False if both inputs are false. + +** AND ( ∧ , 4 ) +- True if both inputs are true. +- False otherwise. + +** NOT ( ¬ , 5 ) +- Inverts the value of the input. +- True becomes false, and false becomes true. diff --git a/Math/Logic solver/logic.bas b/Math/Truth table calculator/truth.bas similarity index 100% rename from Math/Logic solver/logic.bas rename to Math/Truth table calculator/truth.bas -- 2.20.1