Chapter 2: Number System and Boolean Algebra
1's and 2's Complement
1's Complement: Reciprocal of 1s to 0s and 0s to 1s is its 1's
complement. For eg, 1's Complement of (1011)2 is (0100)2
2's Complement:
Adding 1 to the 1's complement of a given binary number is its 2's
complement. For eg, if (1010)2 is a given number then, its 1's
complement is (0101)2 and 2's complement is (0101)2 +(1)2 = (0110)2

Boolean Logic
Boolean Algebra is algebra of logic, which deals with the study of
binary variables and logical operation. As every data are represented
in terms binary values, we need to manipulate those values by using
some certain rules and expression which we can do through Boolean
algebra. It is most common and basic method to analysis and design
logic circuit. It was introduced by an English mathematician George
Boole. In Boolean algebra the variables can have only one of the two
possible value 0 and1 (False or True). Every modern digital computers
understand either this two values.
Boolean algebra:
It is algebra of logic which could accept either of the possible two
values 0 and 1 and generate a result through logical relationship and
operation.
Boolean variable: Those entities which has either or 0
and 1 and denote some specific operation ore known as boolean
variable. Simply, it is an entity in Boolean algebra which has only
either of the two possible values. This variable are denoted by A, B,
P, Q, X, Y, Z….
Boolean function (logic functions): Boolean function is
an expression formed by binary variables, binary operators such as
AND, OR, NOT, parentheses, and equal sign for a given set of value
this boolean function gives the 0 or 1 as a result.
Questions and Answers
1. What is Boolean Algebra?
Boolean Algebra is a branch of algebra that deals with binary variables and logic operations. It is used in digital logic design and computer science for circuit simplifications and logical expressions.
It is based on three basic operations:
- AND (⋅): Outputs true if both inputs are true.
- OR (+): Outputs true if at least one input is true.
- NOT (¬): Inverts the input value.
Boolean Algebra follows a set of rules and theorems to simplify logical expressions.
2. What are the basic laws of Boolean Algebra?
Boolean Algebra follows several fundamental laws:
- Commutative Law: A + B = B + A and A ⋅ B = B ⋅ A
- Associative Law: (A + B) + C = A + (B + C) and (A ⋅ B) ⋅ C = A ⋅ (B ⋅ C)
- Distributive Law: A ⋅ (B + C) = (A ⋅ B) + (A ⋅ C)
- Identity Law: A + 0 = A and A ⋅ 1 = A
- Complement Law: A + A' = 1 and A ⋅ A' = 0
- Idempotent Law: A + A = A and A ⋅ A = A
These laws are used to simplify Boolean expressions for logic circuit design.
3. What are De Morgan’s Theorems?
De Morgan’s Theorems are important rules used to simplify Boolean expressions:
- First Theorem: ¬(A ⋅ B) = ¬A + ¬B
- Second Theorem: ¬(A + B) = ¬A ⋅ ¬B
These theorems help in converting AND operations to OR operations and vice versa, simplifying logic circuit implementation.
4. Explain the use of Karnaugh Map (K-Map) in Boolean Algebra.
Karnaugh Map (K-Map) is a visual method used to simplify Boolean expressions. It organizes truth table values into a grid where adjacent cells differ by a single variable.
Steps to simplify using K-Map:
- Draw a K-Map based on the number of variables (2, 3, or 4 variables).
- Fill in the K-Map with truth table values.
- Group adjacent 1s in powers of 2 (1, 2, 4, 8, etc.).
- Write the simplified Boolean expression.
K-Maps reduce complex expressions, making circuit design more efficient.
5. What is a logic gate? Explain different types of logic gates.
A logic gate is an electronic circuit that performs Boolean operations. The basic types of logic gates include:
- AND Gate: Outputs 1 if both inputs are 1.
- OR Gate: Outputs 1 if at least one input is 1.
- NOT Gate: Inverts the input (1 becomes 0, and 0 becomes 1).
- NAND Gate: Combination of AND and NOT (inverted AND output).
- NOR Gate: Combination of OR and NOT (inverted OR output).
- XOR Gate: Outputs 1 if inputs are different.
- XNOR Gate: Outputs 1 if inputs are the same.
Logic gates are used to build digital circuits in computing and electronics.