Professional Documents
Culture Documents
Week 4 - BOOLEAN ALGEBRA AND LOGIC GATES 1
Week 4 - BOOLEAN ALGEBRA AND LOGIC GATES 1
Week 4 - BOOLEAN ALGEBRA AND LOGIC GATES 1
a. c.
b. d.
Key to correction:
1. b. True OR False
2. a. AND
3. c. True
4. a. Each could be made of AND, OR and NOT gates.
5. a.
At the end of the lesson you are expected to:
➢Explain the basis of logic;
➢Understand and perform various binary operations
such as addition (OR), multiplication (AND), and
negation (NOT) ;
➢Apply Boolean properties;
➢Develop logical truth table based on Boolean
equations.
What is a logic?
✓ It came from the Greek word logos, which can
be translated as "opinion", "expectation",
"reason", or "argument".
✓ Logic in science
--- is concerned with the evaluation of arguments,
namely with deciding whether they are correct or
not, as well as being consistent, complete and
sound.
✓ Logic in research-
-- implies that the research is guided by the rules
of logical reasoning and the logical process of
induction and deduction.
✓ Logic in math-
-- the logic statements can involve words, and
symbols together or just symbols.
What is a Boolean Algebra?
❑Boolean algebra is a mathematical system for the
manipulation of variables that can have one of two
values.
• In formal logic, these values are “true” and “false.”
• In digital systems, these values are “on” and “off,” 1 and 0, or
“high” and “low.”
❑Boolean expressions are created by performing
operations on Boolean variables.
• Common Boolean operators include AND, OR, and NOT and etc.
What is Logic Gates?
❑Are the basic building blocks of any digital
system.
❑The relationship between the input and
the output is based on a certain logic.
❑Logic gates are named as AND gate, OR
gate, NOT gate.
(NAND, XOR, NOR Gates)
Not Gate is a horizontal bar X or X’
above the number/variable
0=1
1=0
Or Gate is a plus/addition X+Y
0+0 = 0
0+1 = 1
1+0 = 1
1+1 = 1
And is multiplication
0*0 = 0 X•Y XY
0*1 = 0
1*0 = 0
1*1 = 1
Boolean Algebra, Logic Gates (AND, OR, Not) & Truth Table
❑ AND X•Y XY
▪ When both the inputs are high,
then the output is high,
otherwise the output is low.
❑ OR X+Y
▪ If any of the input is high , then
the output is high.
❑ NOT X X’
▪ The output is inversely
proportional to the input.
Universal Gates (the
NAND and NOR gates)
Neg-AND
1. 2. 3. 4.
7.
8.
9.
Write the Boolean expression for each of these logic
gates, showing how the output (Q) algebraically relates
to the inputs (A and B):
1. 2. 3.
4. 5. 6.
8.
7.
9.
Remember
❖Gates can have multiple inputs and more than one output.
✓A second output can be provided for the complement of the
operation.
Number of possible input =
What is the significance or
importance of “LOGIC” in
our lives?
1. Which gate only has an output of 1 if both inputs are 1?
A. OR B. NAND C. NOR D. AND
2. Which gate has an output of 1 if one but not both inputs is
1?
A. OR B. XOR C. NOT D. AND
3. Which gate has an output of 1 unless both inputs are 1?
A. NAND B. AND C. XOR D. NOR
4. Logic gates must have two inputs and one output?
A. True B. False
5. XOR gate can be made from?
A. All NAND gates B. All NOR gates C. Both A and D D. AND, OR and NOT gates
6. If both inputs are 1 in an OR gate the output will be 0?
A. True B. False
7. XOR gates can be made from?
A. All NAND Gates C. AND, OR, and NOT Gates
B. All NOT gates D. Both A and C
8. Which gate gives outputs which are opposite to the outputs given by a NAND
gate?
A. AND Gate B. NOR Gate C. OR Gate D. XOR Gate
9. In boolean algebra, which operation does putting a bar above a letter
represent?
A. AND Gate B. NOT Gate C. OR Gate D. None of the above
10. Which gate will have the output 1 if both inputs are 0?
A. NOR Gate B. OR Gate C. XOR Gate D. NAND Gate
“We can accomplish self-discovery,
expansion of consciousness, and self
renewal. Therefore, when we faced our
daily routine, difficult problem or situation
and issues to resolve, logic and reasoning
are important to remember and be applied
for the best or most desired results.”
1. Which gate only has an output of 1 if both inputs are 1?
A. OR B. NAND C. NOR D. AND
2. Which gate has an output of 1 if one but not both inputs is
1?
A. OR B. XOR C. NOT D. AND
3. Which gate has an output of 1 unless both inputs are 1?
A. NAND B. AND C. XOR D. NOR
4. Logic gates must have two inputs and one output?
A. True B. False
5. XOR gates can be made from?
A. All NAND gates B. All NOR gates C. BOTH A and D D. AND, OR and NOT gates
6. If both inputs are 1 in an OR gate the output will be 0?
A. True B. False
7. XOR gate can be made from?
A. All NAND Gates C. AND, OR, and NOT Gates
B. All NOT gates D. Both A and C
8. Which gate gives outputs which are opposite to the outputs given by a NAND
gate?
A. AND Gate B. NOR Gate C. OR Gate D. XOR Gate
9. In boolean algebra, which operation does putting a bar above a letter
represent?
A. AND Gate B. NOT Gate C. OR Gate D. None of the above
10. Which gate will have the output 1 if both inputs are 0?
A. NOR Gate B. OR Gate C. XOR Gate D. NAND Gate
SUMMARY 4.
2.
1.
3.
6.
5.
7.
8. 9.
Needs Improvement Fair Good Excellent Total Points
(4 pts.) (6 pts.) (8 pts.) (10 pts.)
Innovative Design (10 Too simple with Quite unique and Structure is standard with Structure and programming were
pts.) unnecessary creative with fewer necessary manipulators and unexpected.
manipulators that makes manipulators. sensors.
the bot unstable.
Locomotion and Difficulty to do task, Goes with a defined Do its task very well which Robot has a desired and well-
Navigation (10 points) inaccurate or direction according to its allows sensors to work well. defined task with consistency.
inconsistent. task.
Programming (20 points) Programming is Programming is Programming is organized Programming is logically organized
inefficient and somewhat organized and and the robot do what is and very efficient.
disorganized. do some of the task expected.
which is/are expected
about the Bot.
Structural The robot’s structural Robot structure is Robot’s base is stable. Robot’s assembly is reliable and
(25 points) foundation is weak. Easily somewhat stable and Showed planned ideas from durable. The Bot was designed
falls apart. show’s team’s design the team. very well with uniqueness and
ideas. creativity.
Teamwork Little knowledge of There was evidence of The knowledge of structure, The team completely understand
(35 points) teamwork. teamwork in the design, assembly, design and what’s going on about the robot’s
Programming, structure programming and programming was directed by task, programming, design and its
and design of the Bot structure. the team members. structure.
was done only by few The team also showed the
members. (2 or 3) underlying science and technology
of their robot.