0% found this document useful (0 votes)
6 views19 pages

Boolean Algebra and Arithmetic Basics

The document covers Boolean algebra concepts, including Boolean expressions, De Morgan's laws, Disjunctive Normal Form (DNF), and Conjunction Normal Form (CNF). It also discusses arithmetic operations such as addition, subtraction, multiplication, and division, along with their properties and the order of operations using PEMDAS. Various activities are included to reinforce understanding of these concepts through practical exercises.

Uploaded by

angel
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views19 pages

Boolean Algebra and Arithmetic Basics

The document covers Boolean algebra concepts, including Boolean expressions, De Morgan's laws, Disjunctive Normal Form (DNF), and Conjunction Normal Form (CNF). It also discusses arithmetic operations such as addition, subtraction, multiplication, and division, along with their properties and the order of operations using PEMDAS. Various activities are included to reinforce understanding of these concepts through practical exercises.

Uploaded by

angel
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

SECTION 1: BOOLEAN ALGEBRA

COMPUTER ARCHITECTURE & ORGANISAT


Data Storage and Manipulation
Terms

Boolean Expression Arithmetic Operations


Boolean expression is a way of Arithmetic operations are the
writing a rule or decision using true addition, subtraction, multiplication
or false statements. and division used in computing
mathematical tasks.
BOOLEAN EXPRESSION

Logic Operation Boolean Notation


AND ⋀
OR ⋁
NOT ⇁ or ~

Identity law

This law states that a variable would remain unchanged when it is ANDed with ‘1’ or ORed with ‘0’.

This is what was used in activity 1.8.

Mathematically, we express the circuits as

1. A ⋀ 1 = A x 1 = A

2. B ⋁ 0 = B + 0 = B
Activity 1.8 Identity Law

Work with your peers to play this magic game.

1. Fill the red circles with any binary inputs

2. Your output (yellow circle) from the intermediate gate is the same as the final answer (green circle).

3. Why do you think this is the case? Share your thought with the class.
De Morgan's Law

This law tells us how to change statements involving ANDs and ORs
when we use the word "NOT". There are two main parts to this law:

1. First Law: If you say "NOT (A OR B)", like activity 1.8 (1) it means that both A and B
are false. Rewritten as "NOT A AND NOT B”.

2. Second Law: If you say "NOT (A AND B)," like activity 1.8 (2) it means at least one of
them is false. This can be rewritten as "NOT A OR NOT B."

Activity 1.9 Inter-subject Learning

Work with your peers by applying your knowledge of De Morgan’s law to solve the following:
1. (A + B)’ =

2. (A.B)’ =
Disjunctive Normal Form (DNF)
DNF is a way to write a Boolean expression so that it is easy to understand. It makes use of disjunction (OR);
this means you are combining things with "OR." If any part is true, the whole thing is true.
Example:
1. (A AND B) OR (NOT A AND B) OR (A AND NOT B)
2. (A ⋀ B) ⋁(~A ⋀ B) ⋁(A ⋀ ~B)

Conjunction Normal Form (CNF)


CNF is a way to write a Boolean expression so that it is easy to understand. It makes use of conjunction (AND):
This means you are combining things with "AND." All parts must be true for the whole thing to be true.

Example:
1. (A OR B) AND (NOT A OR B) AND (A OR NOT B)

2. (A ⋁ B) ⋀(~A ⋁ B) ⋀(A ⋁ ~B)

Activity 1.10 Checking your understanding


In less than 100 words, write in your own words the key difference between DNF and CNF.
Activity 1.11 Simplification of Circuits with Boolean Expression
Work with your peers to complete tasks 2, 3 and 4. Use task 1 as an example.

• Gate1: 0 ⴷ1 = 0
• Gate2: ~0 = 1

• Gate3: gate1 result V gate2 result = 0 V 1 = 1


Activity 1.12 Simplification of Circuits using DNF and CNF

1. Work with your peers to simplify the circuit below, using Boolean expression

2. Draw a circuit for Y = B V A


3. Write less than 10 words commenting on task 1 and 2
4. Show your answers to teacher
Arithmetic Operations

1. Addition (+)
Addition is about combining two or more numbers to get their total. For example, if you have 5

cedis and your mother gives you 10 cedis, you will now have 15 cedis in total. Mathematically, this

is represented as 5 + 10 = 15.

Examples:
1. 22 + 3 = 25

2. There are 2 teachers in the staff common room, and 3 more teachers come in. How many

teachers are there in the staff common room now? This gives 2 + 3 = ? in mathematics. The

answer would be 5 teachers are in the staff common room


Arithmetic Operations

1. Addition (+)

Properties to note:

1. The commutative property of addition means that the order in which you add two numbers does not
affect their total. In mathematics, it means a + b = b + a. For example, if you are buying Hausa koko and
koose. Whether you buy the hausa koko first and then koose or buy the koose and then hausa koko, the
total cost is the same. Examples: 22 + 3 = 5 and 3 + 22 = 25. Similarly, 5 + 7 = 7 + 3 both give the
same result as 12.
2. The associative property of addition means that when adding three or more numbers, the way the
numbers are grouped does not change their total. Mathematically, a + (b + c) = (a + b) + c. For example,
you have 30 minutes of study time for Mathematics, 20 minutes for English, and 10 minutes for Computing.
Whether you first add the time for Mathematics and English, then add Computing, or you first add English
and Computing, the total study time is the same. Examples: (30 + 20) + 10 = 30 + (20 + 10) gives 60.

3. The identity property of addition means adding zero to any number gives you the same number. Hence, 0
is the identity for addition. Mathematically, a + 0 = a. For instance, if the school has 100 computers in the
laboratory and no one gives any more computers, the laboratory will still have 100 computers. Thus, 100 +
0 = 100.
2. Subtraction (-)

Subtraction is taking away a number from another. It also means finding the difference between

numbers. For instance, if you have 10 bofrots and you give 3 to your sister, you will have 7 bofrots

left. Mathematically, it means 10 – 3 = 7.


Examples:

1. 2024 – 224 = 1800.

2. Kofi bought a book for 20 cedis. If he had 50 cedis, he would have 30 cedis left. Thus, 50 – 20 = 30.
Properties:
1. The non-commutative means the order in which the numbers are taken away from each other

affects their result. Mathematically, a - b ≠b - a. Example: 22 − 3 does not give the same result

as 3 associative
2. The − 22. means that the way the numbers are grouped changes their total.

Mathematically, (a - b) - c ≠a - (b - c). Example: (30 − 20) − 10 does not give the same result

as 30 − (20 − 10).
3. Multiplication (x)
Multiplication (x) means adding a number to itself a certain number of times. That is performing repeated
addition.
In computing, “*” is used for multiplication and not “x”. Example: If you want to buy 7 projectors but each

projector costs GH¢4,500.00, you need to multiply 7 by GH¢4,500.00 to get the total cost of the seven

Examples:
projectors, GH¢31,500.00. Thus, 7 * GH¢4500.00 = GH¢31,500.00.
1. 5 * 32 = 160.

2. A farmer by name Imoro from Tumu has 200 sacks. Each sack contains 40 bowls of maize. Mr. Imoro
will have 200 * 40 = 8,000 bowls of maize in total.
3. Multiplication (x)

Properties:
1. Commutative: Just like addition, the order in which you multiply two numbers does not affect their

total. Mathematically, a * b = b * a.
2. Associative: Also, when multiplying three or more numbers, the way the numbers are grouped does

not change their total. Mathematically, (a * b) * c = a * (b * c).

3. Identity means multiplying any number by one gives you the same number. Hence, 1 is the identity for

multiplication.

Example: a * 1 = 1 * a = a. Also, 100 * 1 = 1 * 100 = 100.

4. Distributive combines multiplication and addition. Example: a (b + c) = (a *b) + (a * c). Also, if you

want to buy 3 boxes of pens, and each box has both 4 blue pens and 2 black pens. You will need

3*(4+2) = (3*4)+(3*2) = 18.


4. Division (/ or ÷)

Division (/ or ÷): Means splitting (sharing) a number into parts. For instance, if you have 200 cedis

and you want to share it among 5 students, you will have to share (split) 200 into 5 parts. Thus

200/5 gives 40 cedis to each student.

Example:

1. 6/3=2.
2. Uncle Akwasi has 24 oranges and wants to share them equally among his four friends: Alberta,

Barbara, Nhyira and Fafa. Each friend will get 24/4 = 6 oranges.
4. Division (/ or ÷)

Properties:
1. Non-commutative means that the order in which the numbers are divided affects their result.

Mathematically, a/b ≠ b/a (in most cases).

2. Associative means that the way the numbers are grouped before splitting will affect their total.

Mathematically, (a/b)/ c ≠a/(b/c).

3. Identity means any number divided by 1 is that number. Thus a/1=a but not 1/a.

Distributive: a / (b x c) = (a / b) x (a / c)
PEDMAS
PEMDAS is an acronym that helps you remember the order of operations in arithmetic and algebra, to evaluate
expressions consistently and accurately. PEMDAS means P—parentheses, E—exponents, M—multiplication, D—
division, A—addition, and S—subtraction.

Application

To ensure accuracy, evaluate expressions according to the PEMDAS in the following order.

01 02
Parentheses Exponents
Simplify expressions inside parentheses first. Solve powers and roots next.

03 04
Multiplication and Division Addition and Subtraction
Work from left to right, performing both operations as Work from left to right, performing both as they appear.
they appear in the expression.
Example: In solving 4+2*(9+18) ÷3^2−5, using PEMDAS, we solve what is in parentheses first, thus 9 + 18
Now the expression is 4+2*27÷3^2−5. We then move to the exponent, thus, 3^2 = 9. We now have

4+2*27÷9−5. We move to multiplication, 2*27 = 54, forming a new expression as 4+54÷9−5. We

perform division next,

54÷9 = 6.

This forms a new expression as 4 + 6 + 5. We then perform addition and subtraction from left to

right. We now have 4+6 = 10, 10 – 5 = 5. Hence our final answer is 5.


Activity 1.14 Application of PEMDAS
1. James Sortortey is building a farm to keep his
birds as an agricultural science student. He
1. Solve the following expressions in your groups.
needs 8 units of wood for each house and 6
1. 2-18 ÷4^3−9 units of wood for each barn. If he has 3
2. 9+6*((9+18) *(3^2)) ÷4^2−3 houses and 2 barns, how many total units of
wood does he need? Write down the steps
you take to work out your answer.
2. Alberta Eyram Geli has 150 minutes to watch
two videos on how to mould a trailer as a
mechanical engineering student. The first
video is 1 hour and 30 minutes long, and the
second video is 45 minutes long. How much
time does she have left after watching both
movies? Write down the steps you take to
work out your answer
Activity 1.15 Arithmetic Operation in Python
Copy the following Python codes and run to see the output

1. code for addition 4. code for division

a = float(input("Enter your first number: "))b = a = float(input("Enter your first number: "))b =
float(input("Enter your second number: "))sum = a + bprint("Sum: float(input("Enter your second number ≠ 0: "))quotient = a /
", sum) bprint("The answer is: ", quotient)
2. code for subtraction 5. code for exponent

a = float(input("Enter your first number: "))b = a = float(input("Enter your floor number : "))b =
float(input("Enter your second number: "))difference = a - float(input("Enter your exponent number: "))exponent = a **
bprint("Difference: ", difference) bprint("The answer is: ", exponent)
3. code for Multiplication

a = float(input("Enter your first number: "))b =


float(input("Enter your second number: "))multiplication = a *
bprint("The answer is: ", multiplication)

You might also like