2.1 Digital Logic
1. Number Systems, Logic Levels, Logic Gates, Boolean Algebra
Number Systems
Binary System: A number system that uses only two digits,
0
and1
. It is the foundation of digital electronics.Decimal System: The standard number system used in everyday life, consisting of digits
0-9
.Octal System: A base-8 number system using digits
0-7
. It is often used in computing as a shorthand for binary numbers.Hexadecimal System: A base-16 number system using digits
0-9
and lettersA-F
(representing values 10-15). It is commonly used in programming to represent binary data more compactly.
Logic Levels
High (1): Represents a logic high or "true" state, typically corresponding to a voltage near the supply voltage (e.g., 5V).
Low (0): Represents a logic low or "false" state, typically corresponding to a ground or low voltage (e.g., 0V).
Logic Gates
Logic gates are the basic building blocks of digital circuits. They perform logical operations on one or more binary inputs to produce a binary output.
AND Gate: Output is
1
only if both inputs are1
.OR Gate: Output is
1
if at least one input is1
.NOT Gate (Inverter): Output is the inverse of the input. If input is
1
, output is0
, and vice versa.NAND Gate: Output is the inverse of the AND gate. Output is
1
except when both inputs are1
.NOR Gate: Output is the inverse of the OR gate. Output is
1
only when both inputs are0
.XOR Gate: Output is
1
if the inputs are different.XNOR Gate: Output is
1
if the inputs are the same.
Boolean Algebra
Boolean Variables: These variables represent two possible states,
0
and1
.Basic Operations:
AND:
A * B
orA AND B
OR:
A + B
orA OR B
NOT:
¬A
orNOT A
Boolean Laws:
Commutative:
A + B = B + A
,A * B = B * A
Associative:
(A + B) + C = A + (B + C)
,(A * B) * C = A * (B * C)
Distributive:
A * (B + C) = (A * B) + (A * C)
Identity:
A + 0 = A
,A * 1 = A
Null:
A + 1 = 1
,A * 0 = 0
Complement:
A + ¬A = 1
,A * ¬A = 0
2. Sum-of-Products and Product-of-Sums Methods
Sum-of-Products (SOP)
Definition: SOP is a Boolean expression where several product terms (AND operations) are summed (OR operations).
Example: The Boolean expression
A * B + C
is in SOP form. The termsA * B
andC
are the product terms, and they are summed with the OR operator.Application: SOP is often used in designing digital circuits with AND and OR gates.
Product-of-Sums (POS)
Definition: POS is a Boolean expression where several sum terms (OR operations) are multiplied (AND operations).
Example: The Boolean expression
(A + B) * (C + D)
is in POS form. The terms(A + B)
and(C + D)
are sum terms, and they are multiplied with the AND operator.Application: POS is used in digital circuit design when the expression needs to be implemented with NAND gates.
3. Truth Tables and Karnaugh Maps
Truth Tables
A truth table is a tabular representation of all possible input combinations and their corresponding outputs for a Boolean function or logic circuit.
Steps to Create a Truth Table:
List all possible input combinations.
Determine the output for each combination based on the Boolean expression or circuit.
Present the results in a table format.
Example for a 2-input AND gate:
0
0
0
0
1
0
1
0
0
1
1
1
Karnaugh Maps (K-map)
A Karnaugh map is a graphical representation used to simplify Boolean expressions. It helps identify patterns in the truth table to minimize the Boolean expression.
Steps to Use K-map:
Construct a K-map grid with cells representing all possible input combinations.
Place the output values from the truth table into the corresponding cells.
Group adjacent cells with
1
s in powers of two (1, 2, 4, 8, etc.).Write the simplified Boolean expression based on the grouped cells.
Example for a 2-variable K-map:
0
0
1
1
1
1
The simplified Boolean expression for this K-map is: A + B.
Conclusion
Understanding number systems, logic levels, gates, and Boolean algebra is fundamental to digital electronics. Sum-of-Products (SOP) and Product-of-Sums (POS) methods simplify logic expressions for circuit design. Truth tables outline all input-output possibilities, while Karnaugh maps minimize Boolean expressions, optimizing circuit efficiency. These concepts enable the design of reliable and efficient digital systems.
Last updated