Digital LogicUnit 17 min read
Digital Logic Basics: Systems, Boolean Algebra & Binary Operations
Unit 1 of Digital Logic introduces foundational concepts of digital systems, binary number systems, Boolean algebra, and logic operations essential for designing circuits and algorithms. This note covers definitions, operations, laws, and real-world applications with visual aids and problem-solving techniques.
TAKEAWAYS:
- Understand the binary number system (base-2) and its operations (addition, subtraction, multiplication, division) as the backbone of digital systems.
- Master Boolean algebra laws (commutative, associative, distributive, De Morgan’s) and their verification via truth tables.
- Differentiate between digital and analog systems, and recognize why digital systems dominate modern computing.
- Apply Boolean expressions to simplify logic circuits using algebraic rules and Karnaugh Maps (introduced here conceptually).
- See how Boolean logic powers real-world systems like eSewa’s transaction validation (AND/OR gates for security checks) and Khalti’s payment routing (decision-making logic).
- Learn to convert between decimal, binary, octal, and hexadecimal for practical use in programming and hardware design.
1. Digital vs. Analog Systems
Digital systems represent data as discrete values (0s and 1s), while analog systems use continuous signals (e.g., voltage levels). Digital systems are preferred because they are:
- Noise-resistant (less affected by interference).
- Easier to store/process (binary format).
- Scalable (can be miniaturized, e.g., chips).
mindmap
root((Digital Systems))
Features
Discrete Values "0s and 1s"
Noise Immunity "Resistant to interference"
Scalability "Miniaturization (chips)"
Advantages
Reliability "Less error-prone"
Storage "Easy to encode/decode"
Processing "Faster computations"
Examples
Computers "Binary logic"
Smartphones "Digital signals"
eSewa "Online transactions (binary data)"2. Binary Number System
Binary is the language of computers, using only two digits (0 and 1). Key operations:
Binary Addition
Example: Add 1011₂ (11₁₀) + 0101₂ (5₁₀).
1011
+ 0101
-------
10000₂ (16₁₀)
Binary Subtraction (2’s Complement Method)
Used in CPUs for efficient subtraction.
Example: Subtract 0101₂ (5) from 1011₂ (11).
- Find 2’s complement of
0101→1011(invert bits +1). - Add to
1011: 1011 (11)
- 1011 (2’s complement of 5)
10110₂ → Discard overflow bit → 0110₂ (6₁₀). Correct!
3. Boolean Algebra Fundamentals
Boolean algebra deals with binary variables (0/1) and operations: AND (·), OR (+), NOT (′).
Basic Laws
| Law | Expression | Truth Table Verification |
|---|---|---|
| Commutative | A + B = B + A | Swap inputs, output unchanged. |
| Associative | (A + B) + C = A + (B + C) | Grouping doesn’t affect result. |
| Distributive | A·(B + C) = A·B + A·C | AND over OR distributes like real numbers. |
| Identity | A + 0 = A, A·1 = A | 0/1 act as additive/multiplicative identities. |
| Complement | A + A′ = 1, A·A′ = 0 | A and its complement cover all cases. |
| De Morgan’s | (A + B)′ = A′·B′ | NOT of OR = AND of NOTs. |
Verification of De Morgan’s Law:
Boolean Expressions
- Sum of Products (SOP):
F = AB + BC + CD(OR of AND terms). - Product of Sums (POS):
F = (A+B)(B+C)(C+D)(AND of OR terms).
Example: Convert F = AB + B̄C to POS.
- Start with SOP:
F = AB + B̄C. - Apply distributive law to cover all variables:
F = (A + B̄)(A + C)(B + C).
4. Real-World Applications
Example 1: eSewa Transaction Validation (AND/OR Logic)
When you pay via eSewa:
- AND Gate: Both correct PIN AND sufficient balance must be true for the transaction to proceed.
- OR Gate: If fingerprint verification OR OTP confirmation succeeds, the system grants access.
Example 2: Khalti Payment Routing (Multiplexer Logic)
Khalti routes payments based on:
- Bank selection (input
S1,S2). - Transaction type (input
I0,I1). A 4-to-1 MUX (covered in Unit 2) selects the correct bank’s server to process the payment.
Example 3: NTC Traffic Light Control (Sequential Logic)
Traffic lights use state machines (covered in Unit 5) to cycle through:
- Green → Yellow → Red → Green (timed transitions).
- Boolean logic ensures no two conflicting lights (e.g.,
Green_A = Red_B).
5. Problem-Solving with Boolean Algebra
Worked Example: Simplify xy + x'z + yz to minimize literals.
- Factor
yzfrom the last term:xy + x'z + yz = xy + x'z + z(y). - Apply distributive law:
= xy + z(x' + y). - Simplify
(x' + y)using complement law:= xy + z(1) = xy + z(sincex' + ycovers all cases whenz=1).
Verification via Truth Table:
Result: xy + z is equivalent and simpler.
6. Karnaugh Maps (Preview)
While fully covered in Unit 8, K-maps are introduced here for simplification. For F(A,B,C,D) = Σ(0,3,5,7,9,10,12,15) with don’t-cares d(2,4,6,8):
- Plot the 4-variable K-map (16 cells).
- Group 8s, 4s, and 2s to cover all 1s and don’t-cares.
- Simplified expression:
F = B + C + AD.
Exam Tip
- Memorize the 16 Boolean laws but focus on commutative, associative, distributive, and De Morgan’s—they appear in 60% of problems.
- Practice truth tables for verification. Examiners often ask to "verify a law using a truth table."
- Simplify expressions algebraically before jumping to K-maps (Unit 8). Start with factoring and complement laws.
- Real-world ties score extra marks:
- Relate AND/OR gates to eSewa/Khalti security checks.
- Link binary addition to CPU arithmetic operations.
- For circuit diagrams, always:
- Label inputs/outputs clearly.
- Use standard gate symbols (e.g.,
→|for AND,/-for OR). - Show power (
Vcc) and ground (GND) connections.
Common Pitfalls:
- Forgetting to include don’t-cares in K-map grouping (even though this unit is a preview).
- Misapplying De Morgan’s Law (e.g.,
(A+B)′ = A′B′vs.(AB)′ = A′ + B′). - Overcomplicating simplifications—always check if further reduction is possible.
Based on the TU BITM syllabus for Digital Logic (IT233), unit 1.
Discussion
Loading…