Boolean operators: Difference between revisions

From Computer Science Wiki
(15 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]]


Line 10: Line 4:




== Boolean==  
== Boolean operators ==  
 
[http://www.neuroproductions.be/logic-lab/ This website has an interactive tool to help you understand logic gates]
 
{| class="wikitable" border="1"
|-
! Boolean operator
! Definition
! Example
|-
| AND
| The result is TRUE ( 1 ) if both inputs are TRUE  ( 1 ).
|-
| OR
| The result is TRUE ( 1 ) if either input is TRUE  ( 1 )
|-
| NOT
| Also named an inverter. Inverts the result so TRUE ( 1 ) becomes FALSE ( 0 ) and FALSE ( 0 ) becomes TRUE  ( 1 ).
|-
| NAND
|  is a logic gate which produces an output which is false only if all its inputs are true; thus its output is complement to that of an AND gate 
|-
| NOR
| a Boolean operator which gives the value one if and only if all operands have a value of zero and otherwise has a value of zero.
|-
| XOR
| Also named a "Exclusive OR". The result is TRUE ( 1 ) if either input is TRUE  ( 1 ) but not if both inputs are TRUE  ( 1 ).
|-
 
|}
 
 
 
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>
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>


Line 17: Line 43:
<iframe width="560" height="315" src="https://www.youtube.com/embed/M058skV1iL0" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/M058skV1iL0" frameborder="0" allowfullscreen></iframe>
</html>
</html>
== A helpful android app ==
This app is a good tool to practice your boolean logic! Thank you to Max N. for the suggestion!
https://play.google.com/store/apps/details?id=com.Suborbital.CircuitScramble&hl=en


== Truth Tables ==
== Truth Tables ==


<html>
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/YtDJRYdnEvw?list=PLCiOXwirraUDIUDRlk21mH1Y_wCpYaMii" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/-7VHO_ZHV14" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</html>
</html>


== Do you understand this topic? ==
== Boolean Logic and Logic Gates ==
From crash course computer science comes this EXCELLENT video teaching us about boolean logic and logic gates<ref>https://www.youtube.com/watch?v=gI-qXk7XojA</ref>


<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/gI-qXk7XojA" frameborder="0" allowfullscreen></iframe>
</html>


== Standards ==


== Do you have an advanced understanding about this topic? ==
* Define the Boolean operators: AND, OR, NOT, NAND, NOR and XOR.
 
* Construct truth tables using the above operators.
== See Also ==
* Construct a logic diagram using AND, OR, NOT, NAND, NOR and XOR gates.
 


== References ==
== References ==

Revision as of 15:12, 22 October 2019

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.[1]


Boolean operators[edit]

This website has an interactive tool to help you understand logic gates

Boolean operator Definition Example
AND The result is TRUE ( 1 ) if both inputs are TRUE ( 1 ).
OR The result is TRUE ( 1 ) if either input is TRUE ( 1 )
NOT Also named an inverter. Inverts the result so TRUE ( 1 ) becomes FALSE ( 0 ) and FALSE ( 0 ) becomes TRUE ( 1 ).
NAND is a logic gate which produces an output which is false only if all its inputs are true; thus its output is complement to that of an AND gate
NOR a Boolean operator which gives the value one if and only if all operands have a value of zero and otherwise has a value of zero.
XOR Also named a "Exclusive OR". The result is TRUE ( 1 ) if either input is TRUE ( 1 ) but not if both inputs are TRUE ( 1 ).


This is one of the better videos I've seen on boolean. Content gratefully used with permission : [2]


A helpful android app[edit]

This app is a good tool to practice your boolean logic! Thank you to Max N. for the suggestion!

https://play.google.com/store/apps/details?id=com.Suborbital.CircuitScramble&hl=en

Truth Tables[edit]

Boolean Logic and Logic Gates[edit]

From crash course computer science comes this EXCELLENT video teaching us about boolean logic and logic gates[3]

Standards[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.

References[edit]