Boolean Logic
Boolean Logic
Computer CD & DVD players IPod Cell phone HDTV Digital cameras
Sound is an analog signal. On a CD, digital sound is encoded as 44.1 kHz, 16 bit audio.
The original wave is 'sliced' 44,100 times a second - and an average amplitude level is applied to each sample. 16 bit means that a total of 65,536 different values can be assigned, or quantized to each sample.
George Boole
All math functions can be determined using these 3 primary Boolean logic operators: AND, OR, and NOT.
AND narrows your search, OR broadens your search, and NOT is used to exclude concepts.
What information have you searched for on the Web? Do a Google Search for car radios.
fruit OR vegetables
And NOT How has the group changed depending on the logical operator used.
Search Statement
stress OR anxiety
1127
51
687
Nesting
When more than one element is in parentheses, the sequence is left to right. This is called "nesting."
(foxes OR rabbits) AND pest control foxes OR rabbits AND pest control (animal pests OR pest animals) NOT rabbits
Parentheses should be used to group terms joined by OR when there is any other operator in the search.
The order of operations is: AND, NOT, OR, XOR Parentheses are used to override priority. Expressions in parentheses are processed first. Parentheses are used to organize the sequence and groups of concepts.
You have a buzzer in your car that sounds when your keys are in the ignition and the door is open. You have a fire alarm installed in your house. This alarm will sound if it senses heat or smoke. There is an election coming up. People are allowed to vote if they are a citizen and they are 18. To complete an assignment the students must do a presentation or write an essay.
The true-false nature of Boolean logic makes it compatible with binary logic used in digital computers. Electronic circuits can produce Boolean logic operations. Circuits are called gates.
NOT AND OR
NOT gate
The simplest possible gate is called an "inverter," or a NOT gate. One bit as input produces its opposite as output. The symbol for a NOT gate in circuit diagrams is shown below. The logic table for the NOT gate shows input and output.
A 0 1
Q 1 0
AND gate
The AND gate has the following symbol and logic table. Two or more input bits produce one output bit. Both inputs must be true (1) for the output to be true. Otherwise the output is false (0).
A
0 0 1 1
B
0 1 0 1
Q
0 0 0 1
OR gate
The OR gate has the following symbol and logic table. Two or more input bits produce one output bit. Either inputs must be true (1) for the output to be true.
0
0 1 1
0
1 0 1
0
1 1 1
http://www.play-hookey.com/digital/basic_gates.html
Combine gates.
Gates can be combined. The output of one gate can become the input of another. Try to determine the logic table for this circuit.
Not
0 1 1
A 0 0
B 0 1
Q 1 1
1
1
0
1
1
0
0 1 1
1 0 1
0 0 1
The most sophisticated computer can be made with NAND gates from Radio Shack. Need millions of them.
0
+1 01
1
+0 01
1
+1 10
A 0 0 1 1
B 0 1 0 1
Q 0 1 1 0
CO 0 0 0 1
To construct a full adder circuit, we'll need to gang these simple circuits together. The carry value will become an input for the subsequent Now have three inputs and two outputs. Since we'll have both an input carry and an output carry, we'll designate them as CIN and COUT.
A full adder must be allocated for each bit to be added simultaneously. To add two 4-bit numbers to produce a 4-bit sum (with a possible carry), you would need four full adders with carry lines cascaded.
By extension, two binary numbers of any size may be added in this manner. http://www.play-hookey.com/digital/adder.html
NOT gate
AND gate
OR gate
http://educ.queensu.ca/~compsci/resources/BoolLogic /assocdistrib.html
http://hyperphysics.phyastr.gsu.edu/Hbase/electronic/digcktcon.html#c1
Binary numbers.
Exclusive gates
Exclusively OR gate are true if either input is true but not both.
A 0 0 1 1
B 0 1 0 1
Q 0 1 1 0
A 0 0 1 1
B 0 1 0 1
Q 1 0 0 1