Truth tables: Difference between revisions

From Computer Science Wiki
(Created page with "<center> <blockquote style="padding: 5px; background-color: #FFF8DC; border: solid thin gray;"> File:Exclamation.png This is an '''important concept'''. You should ful...")
 
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<center>
<blockquote style="padding: 5px; background-color: #FFF8DC; border: solid thin gray;">
  [[File:Exclamation.png]] This is an '''important concept'''.  You should fully understand this.
</blockquote>
</center>
[[File:binary.png|frame|right|This is a basic concept in computer science]]
[[File:binary.png|frame|right|This is a basic concept in computer science]]


In computer science, the Boolean data type is a data type, having two values (usually denoted true and false), intended to represent the truth values of logic and Boolean algebra. It is named after George Boole, who first defined an algebraic system of logic in the mid 19th century. The Boolean data type is primarily associated with conditional statements, which allow different actions and change control flow depending on whether a programmer-specified Boolean condition evaluates to true or false. It is a special case of a more general logical data type; logic does not always have to be Boolean.<ref>https://en.wikipedia.org/wiki/Boolean_data_type</ref>
A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, boolean functions, and propositional calculus—to compute the functional values of logical expressions on each of their functional arguments, that is, on each combination of values taken by their logical variables (Enderton, 2001). In particular, truth tables can be used to tell whether a propositional expression is true for all legitimate input values, that is, logically valid.<ref>https://en.wikipedia.org/wiki/Truth_table</ref>
 
 
== Boolean==
This is one of the better videos I've seen on boolean. Content gratefully used with permission :  <ref>http://cs50.tv/2015/fall/#license,psets</ref>
 
 
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/YtDJRYdnEvw" frameborder="0" allowfullscreen></iframe>
</html>
 
== Truth Tables ==
 
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/YtDJRYdnEvw?list=PLCiOXwirraUDIUDRlk21mH1Y_wCpYaMii" frameborder="0" allowfullscreen></iframe>
</html>
 
== Do you understand this topic? ==
 
 


== Do you have an advanced understanding about this topic? ==
To determine the total number of possible permutations of <syntaxhighlight lang="python" inline>n</syntaxhighlight> given inputs  you'll need 2^n input combinations to test.


*[[2.1.11 Define the Boolean operators: AND, OR, NOT, NAND, NOR and XOR. [[Level 1]]
== Do you understand this topic? ==
*[[2.1.12 Construct truth tables using the above operators. [[Level 3]]
*[[2.1.13 Construct a logic diagram using AND, OR, NOT, NAND, NOR and XOR gates. [[Level 3]]


* Define the Boolean operators: AND, OR, NOT, NAND, NOR and XOR.
* Construct truth tables using the above operators.
* Construct a logic diagram using AND, OR, NOT, NAND, NOR and XOR gates.


== Do you have an advanced understanding about this topic? ==


== See Also ==
== See Also ==


* [[Boolean operators]]
* [[Logic diagram]]


== References ==
== References ==

Latest revision as of 08:45, 15 October 2024

This is a basic concept in computer science

A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, boolean functions, and propositional calculus—to compute the functional values of logical expressions on each of their functional arguments, that is, on each combination of values taken by their logical variables (Enderton, 2001). In particular, truth tables can be used to tell whether a propositional expression is true for all legitimate input values, that is, logically valid.[1]

To determine the total number of possible permutations of n given inputs you'll need 2^n input combinations to test.

Do you understand this topic?[edit]

  • Define the Boolean operators: AND, OR, NOT, NAND, NOR and XOR.
  • Construct truth tables using the above operators.
  • Construct a logic diagram using AND, OR, NOT, NAND, NOR and XOR gates.

Do you have an advanced understanding about this topic?[edit]

See Also[edit]

References[edit]