DM Project 1
DM Project 1
DISCRETE MATH
TOPICS
MEMBERS:
DEL ROSARIO, Charize Mae
MACLANG, Rhoanne
MARASIGAN, King Gabriel
MAGALING, Jesnie
MARCELINO, Jeramie
GALANG, Angela
ORTULA, Angela Mae
PALERO, Aldrin
TIBON, Jasper Maico
TOLENTINO, John Hydrix
TABLE OF CONTENT
PRELIMS: FINALS:
EXAMPLES: EXAMPLES:
A = RAIN B = PAIN C = SANE A = “RAIN” B = “PAIN” C = “SANE”
EXAMPLES: EXAMPLES:
X = “LOVE” Y = “LIFE” Z = “NOW” X = “LOVE” Y = “LIFE” Z = “NOW”
1. X ^ Y = OVIF 1. X ^ Y = OV
2. Y ^ X = IFOV 2. Y ^ X = IF
3. X ^ Z = LVENW 3. X ^ Z = LVE
4. Y ^ Z = LIFENOW 4. Y ^ Z = LIFE
5. Z ^ X = NWLVE 5. Z ^ X = NW
LESSON 2: HEXADECIMAL AND NUMBER SYSTEM
HEXADECIMAL IS A NUMBERING SYSTEM WITH BASE 16. IT CAN BE USED TO REPRESENT LARGE
NUMBERS WITH FEWER DIGITS. IN THIS SYSTEM THERE ARE 16 SYMBOLS OR POSSIBLE DIGIT
VALUES FROM 0 TO 9, FOLLOWED BY SIX ALPHABETIC CHARACTERS -- A, B, C, D, E AND F.
Example:
SUBTRACTION IN HEXADECIMAL:
In Subtraction of Hexadecimal every time a low value is borrowed from the next number
next to him, the one who borrowed will have an extra 16 from his original value.
Example:
SUBTRACTION IN HEXADECIMAL EXAMPLE:
3.
4.
NUMBER SYSTEM TYPES OF NUMBER SYSTEM
A SYSTEM FOR REPRESENTING
NUMBERS IS REFERRED TO AS A BINARY
NUMBER SYSTEM. IT ALSO DEFINES A BINARY NUMBER SYSTEM IS ONE
A SET OF VALUES TO REPRESENT A THAT UTILIZES 2 BASES. IT IMPLIES
QUANTITY AND IS ALSO KNOWN AS THAT THERE ARE ONLY TWO
THE SYSTEM OF NUMERATION. THE DISTINCT, ITS NUMBER SYSTEM IS
MOST WIDELY USED DIGITS AMONG MADE UP OF SYMBOLS. THE BINARY
THEM ARE 0 AND 1, WHICH ARE NUMBERS THAT ARE CREATED IN
USED TO REPRESENT BINARY SYSTEMS CONSIST OF 0 OR 1.
NUMBERS.
DECIMAL
THERE ARE FOUR DIFFERENT THE SYSTEM OF NUMBERS THAT
TYPES OF A NUMBER SYSTEM, IT WE USE IS KNOWN AS TEN AS THE
INCLUDES BINARY, DECIMAL, BASE NUMBER IN THE DECIMAL
OCTAL AND SYSTEM. SINCE WE UTILIZE A BASE
HEXADECIMAL. SO THEREFORE OF 10, THERE ARE TEN POSSIBLE
EACH SYSTEM HAS FOUR NUMBER SYMBOLS.
BASES.
OCTAL HEXADECIMAL
CHARACTERISTICS OF THE OCTAL CHARACTERISTICS OF THE HEX NUMBER
NUMBER SYSTEM ARE AS FOLLOWS − SYSTEM ARE AS FOLLOWS − IT IS ALSO
ALSO REFERRED TO AS THE BASE-8 REFERRED TO AS THE BASE-16 NUMBER
NUMBER SYSTEM. WIDELY USED IN A SYSTEM. IT IS USED IN SYSTEMS OF
COMPUTING SYSTEM. COMPUTATION AND MEMORY
REPRESENTATION.
Examples of Number System Conversion
BINARY TO
DECIMAL
In this lesson, we will further look at the different types of basic logic gates with
their truth table and understand what each one is designed for...
Types of Basic Gates
OR Gate
In an OR gate, the output of an OR gate attains state 1 if
one or more inputs attain state 1.
AND Gate
In the AND gate, the output of an AND gate attains state 1
if and only if all the inputs are in state 1.
NOT Gate
In a NOT gate, the output of a NOT gate attains state 1 if
and only if the input does not attain state 1.
Exclusive-OR gate
(XOR Gate)
In an XOR gate,
the output of a
two-input XOR Example:
gate attains state 1 1. Using three AND
if one adds only gate if all of the input
input and attains is equal to 1 then the
state 1. output is 1 else if one
of the input is equal
to false then the
output is 0.
2. Using three AND gate two BUFFER
gate and NOT gate if all input is equal
to 1 then two BUFFER gate and one
3. Using 2 AND gate 1 OR gate and 1
AND gate the output is 1 else if one of
NOT gate If all the input is equal to 1
the input is equal to 0 then the two
then the output of OR gate is 1 and the
BUFFER gate and one AND gate the
output of NOT gate is 0.
output is 0 and the output of NOT gate
is 1.
4. Using ANDGate and XOR GateIf all
the input is equal to 1 then the output 5. Using 4 AND Gate and NOT Gate. If
of AND Gate is 1 and the output of XOR all the input is equal to true then the
Gate is 0 because the input of XOR output of all AND Gate is On and the
Gate is the same true value that is output of Not Gate is Off. Therefore if
why the output is 0. the input of NOT gate is equal to false
then the Output of Not gate is On.
Lesson 5:
Boolean expressions are the expressions that evaluate a
condition and result in a Boolean value i.e true or false.
Variables
A is a variable that represents a Boolean value. It can be either true or
false. Variables in Boolean algebra are typically denoted by letters, such
as A, B, C, and so on. They serve as placeholders for Boolean values or
logical propositions. These variables can be combined with logical
operators (AND, OR, NOT) to construct logical expressions and perform
logical operations. For instance, the expression A AND B represents a
Boolean expression where A and B are variables combined with the
logical AND operator. It evaluates to true only if both A and B are true.
Variables form the foundation of Boolean algebra, allowing us to work
with and reason about logical values and propositions.
Complement
Let's consider a variable A. The complement of A, denoted as A',
represents the negation or opposite of the value of A.
If A is true (1), then the complement of A, A', is false (0).
If A is false (0), then the complement of A, A', is true (1).
So, the complement of A (A') is the opposite of its original value.
For example, if A = 1, then A' = 0. And if A = 0, then A' = 1.
The complement operator (' or overline) in Boolean algebra
allows us to represent the logical negation or inversion of
variables, enabling more complex logical expressions and
operations.
LITERAL
Let's consider two variables, A and B. A literal is either a variable or its
complement. So, in this case, the literals would be A and B.
Examples of literals:
1. A: A is a literal representing the variable A.
2. B': B' is a literal representing the complement of the variable B.
In the context of Boolean algebra, literals serve as the building blocks for
constructing logical expressions. They can be combined using logical
operators (AND, OR, NOT) to form more complex expressions. For instance,
the expression A' + B represents a Boolean expression that consists of two
literals, A' and B, combined with the OR operator (+). It means "not A OR B."
Literals play a fundamental role in Boolean algebra, allowing us to
represent variables and their complements, which are essential for
constructing logical expressions and performing logical operations.
EXAMPLES:
1. 2. 3. 4. 5.
K̅ .M.N̅ = 0 x.y.z̄ = 1 K.M̅ .N = 0 X̅ .Y̅ .Z=0 A̅ +B̅ +C̅ =1
K̅ =1 x=1 K=0 X̅ =1 A̅ =0
M=0 y=1 M̅ =1 Y̅ =1 B̅ =0
N̅ =1 z̄=0 N=0 Z=0 C̅ =0
Lesson 6: Boolean Algebra
Boolean algebra, a discrete mathematics branch of algebra, focuses on manipulating and evaluating mathematical
operations and statements using logical values. George Boole, a mathematician and logician, invented it in the
mid-1800s. Boolean algebra is the cornerstone of digital logic and is widely used in computer science, electrical
engineering, and other professions.
Values in Boolean algebra can only be true or false, which are commonly represented as 1 and 0, respectively.
These are referred to as Boolean values or Boolean variables. Boolean algebra's fundamental operations are
conjunction (AND), disjunction (OR), and negation (NOT).
In Boolean algebra, terminology like Variable, Complement, and Literal are utilized. A variable is a logical amount
represented by a symbol. Any one variable may have a value of 1 or 0. The complement of a variable is its inverse. A
bar above a variable (overbar) indicates this. As an example, consider the complement of A is the variable. If A
equals 1, then A equals 0. If A is equal to 0, then A is equal to 1. The Complement of the variable A is interpreted as
"not A" or "A bar." The complement of an is denoted with a prime sign rather than an overbar. variable; for
example, B' denotes B's complement. A Literal expression is a variable or the complement of a variable.
The Laws of Boolean Commutative Laws
Algebra The commutative law of addition for two
variables is written as A+B = B+A This law
The basic rules of Boolean algebra
states that the order in which the variables
are the same as in ordinary algebra:
are ORed makes no difference. Remember,
the commutative laws for addition
in Boolean algebra as applied to logic
and multiplication, the associative
circuits, addition and the OR operation are
laws for addition and multiplication, the same. The commutative law of
and the distributive law. multiplication for two variables is A.B = B.A
Commutative Laws for two This law states that the order in which the
variables, the commutative law of variables are ANDed makes no difference.
addition is stated as A+B = B+A. This Examples:
law asserts that the order in which 1: A + B = B + A
the variables are ORed makes no 2: X . Y = Y . X
effect. Remember that addition and 3: P + Q = Q + P
the OR operation are the same in
4: M . N = N . M
Boolean algebra as applied to logic
5: C + D = D + C
circuits.
Associative Laws:
For three variables, the associative law of addition is expressed as
follows: A + (B + C) = (A + B) + C This law asserts that when ORing more
than two variables, the result is the same regardless of how the
variables are grouped. Use of the associative law of addition. For three
variables, the associative law of multiplication is expressed as follows:
A(BC) = (AB)C This law asserts that it makes no difference in whatever
order the variables are grouped when ANDing more than two variables.
Examples:
1. (A + B) + C = A + (B + C)
2: (D . E) . F = D . (E . F)
3: (P + Q) + R = P + (Q + R)
4: (X . Y) . Z = X . (Y . Z)
5: (M + N) + O = M + (N + O)
Distributive Law:
The distributive law is written for three variables as follows:
A(B + C) = AB + AC
This law states that ORing two or more variables and then ANDing the result with a
single variable is equivalent to ANDing the single variable with each of the two or
more variables and then ORing the products. The distributive law also expresses the
process of factoring in which the common variable A is factored out of the product
terms, for example, AB + AC = A(B + C).
Examples:
1: A . (B + C) = (A . B) + (A . C)
2: X + (Y . Z) = (X + Y) . (X + Z)
3: P . (Q + R) = (P . Q) + (P . R)
4: M + (N . O) = (M + N) . (M + O)
5: C . (D + E) = (C . D) + (C . E)
Absorptive Law
The absorptive law in Boolean algebra pertains to the simplification of logical
expressions by eliminating redundant terms.
1. Absorption of the OR operator (+): A + (A . B) simplifies to just A. This means that
when we perform the OR operation between a variable A and the logical AND
operation between A and another variable B, the term A . B can be absorbed or
eliminated.
2. Absorption of the AND operator (.): A . (A + B) simplifies to just A. This means that
when we perform the AND operation between a variable A and the logical OR
operation between A and another variable B, the term A + B can be absorbed or
eliminated.
Examples:
1: (A + (A . B)) = A
2: ((X . Y) + X) = X
3: ((P + Q) . P) = P
4: ((M . N) + O) . (M + O) = M + O
5: ((C + D) . E) + E = E
The Annulment law
The Annulment law, also known as the Zero Annihilation law, states the effect of
logical operations involving zero or complemented zero values.
The Idempotent law is a property in Boolean algebra that describes the behavior of
logical operations when applied multiple times to the same variable or expression. It
states that applying an operation twice does not change the result.
The Idempotent law is useful for simplifying Boolean expressions by identifying and
eliminating redundant terms.
Examples:
1: A + A = A
2: B + B = B
3: C . C = C
4: D . D = D
e 5: E + E = E
Complement law
The Complement law in Boolean algebra states the relationship between a variable and its
complement (negation). It specifies that the logical complement of a variable and its
negation always add up to the universal value, which is usually represented as 1.
1. Complement law for the OR operator (+): A + A' = 1 This means that when you perform
the OR operation between a variable A and its complement A', the result is always 1
(true).
2. Complement law for the AND operator (.): A . A' = 0
This means that when you perform the AND operation between a variable A and its
complement A', the result is always 0 (false).
The Complement law helps in simplifying Boolean expressions and understanding the
relationship between variables and their complements.
Examples:
1: A + A' = 1
2: B + B' = 1
3: C . C' = 0
4: D . D' = 0
5: E + E' = 1
The two matrices must have the same size, i.e. the rows must match
the size, and the column must match in size. Here’s an example: a
matrix with 3 rows and columns can be added to another matrix with
3 rows and 5 columns, but it could not be added to a matrix with 3
rows and 4 columns because the columns do not match.
Subtraction
To subtract two matrices: subtract the numbers in the matching
positions:
Multiplication
To multiply two matrices: multiply it by a single number (the value 2 in this
case):
These are the calculations:
2x4=8 2x0=0
2x1=2 2x-9=-18
Here is another way of multiplying the matrices called “Dot
Product”
∨
DISJUNCTION ( )
BICONDITION (↔)
Example 3:
Example 5:
Most used social media of 50 selected students in LCUP
1. Facebook - 20 (Upper left) =P(A) 20/50 = 0.4%
2. Instagram - 20 (Upper right) =P(B) 20/50 = 0.4%
3. Twitter - 5 (Bottom) =P(C) 20/50 = 0.4%
4. Facebook-Instagram 20 (In-between) =P(A&B) 40/50 = 0.8 %
5. Instagram-Twitter - 3 (In-between) =P(B&C) 25/50 = 0.5 %
References:
Lesson 1 - Logic Sets
https://www.cl.cam.ac.uk/teaching/1213/DiscMathII/Ch2.pdf
https://math.mit.edu/~apm/cha.pdf
Lesson 8 – Matrices
https://www.mathsisfun.com/algebra/matrix-introduction.html
https://matrix.reshish.com/