180 likes | 346 Views
Boolean Logic. By: Arthur Brooks February 25, 2003 Think, Speak, and Write Computer Science. Overview. What is Boolean Logic and how does it work? The components/terminology that make up Boolean logic. How does it effects our everyday lives?. Origin/Definition.
E N D
Boolean Logic By: Arthur Brooks February 25, 2003 Think, Speak, and Write Computer Science
Overview • What is Boolean Logic and how does it work? • The components/terminology that make up Boolean logic. • How does it effects our everyday lives?
Origin/Definition • Developed by English mathematician and logistician George Boole in the 1840’s . The term “Boolean” refers to a system of logical thoughts. • In computer operations, its used to describe electro- magnetically charged memory locations or circuit states that can either be 1or 0 (either true or false).
Simple Gates • There are three basic gates used in Boolean logic: • The NOT Gate(“inverter”) - where the gate has 1 input and 1 output that produces the opposite of the input. • This diagram shows how A != Q. If you were to input say 1, than the output would be 0 as a result of the not operator. A Q 0 1 1 0 Continued--
Simple Gates Continued- • The AND gate performs a logical “and” operation on two inputs. • The idea is if the 2 inputs are true than the output will be true, but if 1 or both inputs are not true than the output will be false. • On this diagram, if A is 1 AND B is 1, than Q will be 1, but if A is 0 AND B is 1 than Q will be 0 and so on so forth. • A B Q 0 0 0 0 1 0 1 0 0 1 1 1
Simple Gates Continued- • The next gate is the OR gate. The theory is if the first input of a variable is true OR the second input is true as well, than the output will be true also. • The diagram shows for example if A is 1 OR B is 1, than Q will be 1 as well. • A B Q 0 0 0 0 1 1 1 0 1 1 1 1
More Gates • The NOR/NAND gates • They’re basically combinations of the and and or gates with a not gate. The diagrams show how the two work: A B Q The NOR gate: 0 0 1 0 1 0 1 0 0 1 1 0 The NAND gate: A B Q 0 0 1 0 1 1 1 0 1 1 1 0
More Gates Continued- • The XOR and XNOR gates( the “exclusive or” and “exclusive nor” gates) are the final two gates discussed. • In the XOR gate, the idea is if either A OR B are true, but Not both, than Q will be true. The XNOR gate is the exact opposite. The XOR gate: The XNOR gate: A B Q A B Q 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 1
Simple Adders • Simple adders basically deals with creating circuits with binary addition using gates/operators. • Single-bit adder- used when there’s a need to add single bits together to get an answer. • For example, the following are four logical sums: 0+0=0 0+1=1 1+0=1 1+1=10 For these equations you can form this logic table: A B Q CO => (Carry-out) 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1
Simple Adders Continued- • If you wanted to add two 8-bit bytes together, you would have to modularize the problem into reusable components, therefore creating only one component: a full binary adder. Full binary adder logic table CI A B Q CO 0 0 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1
Simple Adders Continued- • A BlackBox is basically used to simplify a design and make it easier to draw say a 4- bit full adder.
Flip Flops and Memory • Deals with the process of saving memory • Able to create memory with Boolean gates. • Feedback is the concept that memory relies on. • When the output of a gate is fed back into the input. • The diagram shows the simplest possible feedback circuit using two inverters as shown:
Flip Flops and Memory continued- • An illegal state is when two inputs go to 0 which has no value in the memory sense. • When both inputs are switched from 0 to 1 simultaneously, then the circuit remembers what was previously presented on the inputs. • A conditioning logic is usually added as a result of a an illegal state on the input side of the gate to prevent any more illegal states. • When There are 2 inputs, say D and E, if E is equal to 1, then the output will follow D, But if E changes to 0, then Q will remember whatever was last seen on D. A circuit that behaves likes this is referred to as a Flip Flop. • The diagram shows this flip-flop and how it works: continued-
Flip-Flops and Memory con-tinued • A very common form of flip-flop is the J-K flip-flop. • It’s usually represented in a black box like the dia- • Gram here:
Implementing Gates • Able to implement Boolean circuits of subtraction, multiplication, division, etc. • Relays- the easiest way to understand the physical implementation of Boolean Logic. (the old way to implement) • Transistors etched onto silicon chips- Where transistors are incredibly fast and small and consume very little power compared to relays. • Difference Between Relays and Transistors- Relays are incredibly more easy to understand, and they can implement Boolean Logic very simply.
Implementing Gates Continued- • Shows inverter(NOT gate) being implemented with a 6 volt battery. Shows how when you define a binary 1 to be 6 volts and a binary 0 to be 0 volts(which will be the ground). If you apply 0 volts to A, then the output will be 6 volts, yet if you apply 6 volts to A, then the output will be 0 volts .
Implementing Gates Continued- • Shows an AND gate being implemented. • Showing that if you apply 6 volts to A AND B, the output Q will have 6 volts. Otherwise, the output will be 0 volts. • The OR gate is even simpler, just hook the two wires A and B together to get 6 volts.
How Boolean Logic Effects us • We use Boolean Logic basically everyday and all the time to make decisions and how to think of a logical explanation for certain things. • In Computers, Boolean Logic is used within everything that a computer does such as a check book, games, spell-check, and anything else you can think of. • It is a great tool to have and to use,and It will always be apart of our daily lives. THE END