Unit 3: Digital Systems and Logic Design — Long Questions
9th Class Computer Science · Unit 3: Digital Systems and Logic Design
Digital systems are the backbone of today's electronics and computing. They manipulate digital information in the form of binary digits, which are either 0 or 1 and are used in calculation devices such as calculators and computer, among others.
1. Analog signals
Analog signals are signals that changes with time smoothly and continuously over time. They can have any value within given range. Examples include voice signal (speaking), body's temperature and radio-wave signals.
2. Digital signals
Digital signals are the signals which have only two values that are in the form '0' and '1 these are utilized in digital electronics and computing systems. Analog to digital converter (ADC) and digital to analog converting (DAC) are important operations in today's technological developments, enabling the transmission and control of signals.
Analog Signal
Continuous, Infinite possible values, Example: Sound waves
Digital Signal: Discrete, Finite (0 or 1), Example: Binary data in computers
Analog to digital (ADC) ADC is the conversion of analog signals into digital signals, which are discrete and can be easily processed by computerized devices like computers and smart phone.
Digital to Analog Conversion (DAC): DAC is the conversion whereby analog signals are converted to digital signals, making it possible for human to perceive the information, for instance through speakers, as depicted in figures.
Analog to digital and Vice Versa (H.Q Picture is available on Pg# 235)
Boolean algebra is a branch of mathematics relate to logic and symbolic computation, using two values namely True and False. It is an essential branch of digital circuits since it is the basis for the analysis and design of circuits.
Boolean Functions and Expressions
Binary values are used to describe the relationship between variables in the Boolean function and Boolean expressions. The expressions are built using AND, OR, and other logic operations and can in several ways be reduced to optimize digital circuits.
Binary Variable sand Logic Operations
Binary variables that can have only have two values, 0 and 1. Logic operations are basic operations implemented in Boolean algebra for processing of these binary variables. The primary logic operations AND, OR and NOT.
1. AND Operation
AND is the basic logical operator which is used in Boolean algebra. It requires two binary inputs which will give a single binary output The symbolic used for the AND operation. The output of the AND operation is "1" only when both inputs are "1". Otherwise, the result is "0".
Example
A = 1 (True)
B = 0 (False)
The AND operation for these variables can be written mathematically as:
P = A.B
In this example: A = 1, B = 0
Therefore, then, the result P of the AND operation is 0 (false).
Truth Table
A | B | A AND B
0 | 0 | 0
0 | 1 | 0
1 | 0 | 0
1 | 1 | 1
2. OR Operation
The OR operation is another basic logical operation in Boolean algebra. To be specific this is also a function tables two binary variables as input produces a single binary output. According to table,
Boolean functions are algebraic statements that describe the relationship between variables and logical operations. These functions are particularly important for digital logic design and are employed in formation of various digital circuits, which are the basis of current computers, mobile phone and even simple calculator.
Understanding Boolean Function
A Boolean function is a function which has a one or more binary inputs and produces a single binary output. The inputs and outputs can only have two values: False (represented by 0) and true (represented by 1). The construction of Boolean function is done by employing the basic logical operations such as AND, OR and NOT, which connect the inputs to generate the correct output.
Example 1
Simple Boolean Function
Consider a Boolean function with two inputs, A and B. We can construct a function F that represents the AND operation:
F(A, B) = A.B
Input
A → | F(A,B) = A.B | → Output
B →
Simple Boolean Function
The diagram shown above demonstrates a basic digital circuit, which is an AND gate. The box symbolizes the AND function F(A, B). This box has two inputs A and B. If both A and B are 1, the output will be 1. In any other case, the output will be 0. The truth table for this function is as follows:-
A | B | F(A, B)
0 | 0 | 0
0 | 1 | 0
1 | 0 | 0
1 | 1 | 1
Example 2
Now, let us construct a more complex Boolean function with three inputs, A, B and C.
F(A, B, C) = A.B + Ā . C
This function uses AND, OR and NOT at the same time. The truth table for this function is as follows:
Explanation
• The parameters A, B and C are included in the following example as the input columns.
• The results of AND operation between two variable A and B are presented in the column A.B.
• The column A standing for the NOT operation of A.
• Every value in the column A . C displays the result of AND operation between the values in the fifth column and the third column.
• The final column F(A, B, C) shows the output of the Boolean function (A.B) + ( Ā .C)
Logic gates are physical devices in electronic circuits that perform Boolean operations. Each type of logic gate corresponds to a basic Boolean operation. Example of the logic gates are:
AND Gate Implements the AND function. It outputs true only when both inputs are True (1)
AND Gate
A → | | → A.B
B → | AND | Output
Imagine a simple electronic circuit with an AND gate. If you press two switches (both must be ON), a light bulb will turn on.
• Switch 1: ON (True)
• Switch 2: ON (True)
• Light bulb: ON (True) because both is switches are ON.
• If either switch is OFF, the light bulb will be OFF.
OR Gate Implements the OR function. It outputs true when at least one input is true.
OR Gate
A → | | → A+B
B → | OR | Output
NOT Gate Implements the NOT function. It outputs the opposite of the input. See Figure.
NOT Gate
A → | | → Ā
| NOT |
NAND Gate This gate is achieved when an AND gate is combined with a NOT gate. It generates true when at least one of the inputs in false. In other words, it is inverse of the AND gate, as presented in figure.
NAND Gate
A → | | → Out
B → | NAND |
Example
Imagine a safety system where an alarm should go on if either one of two sensors detects an issue.
• Sensor 1: No issue (False)
• Sensor 2: Issue detected (True)
• Alarm: ON (True) because one sensor detects an issue.
XOR Gate The XOR (Exclusive OR) gate outputs true only when exactly one of the inputs is true. It differs from the OR gate in that it does not output true when both inputs are true. It is shown in Figure.
XOR Gate
A → | | → Out
B → | XOR |
Example
Imagine a scenario where you can either play video games or do homework, but not both at the same time.
• Play video games: Yes (True)
• Do homework: No (False)
• Allowed?: Yes (True) because only one activity is being done.
Simplification of Boolean function is a particularly important process in designing an efficient digital circuit. Such simplified functions required fewer gates making them compact in size, energy efficient and faster than the complicated ones. Simplification means applying of some Boolean algebra rules to make the functions less complicated.
1. Identity Laws: A + 0 = A, A. 1 = A
2. Null Laws: A + 1 = 1, A.0 = 0
3. Idempotent Laws: A + A = A, A.A = A
4. Complement Laws: A + Ā = 1, A. Ā = 0
5. Commutative Laws: A + B = B+A, A.B = B.A
6. Associative Laws: (A+B) + C = A+(B+C), (A.B).C = A. (B.C)
7. Distributive Laws: A. (B+C) = (A.B)+ (A.C), A+ (B.C)=(A+B). (A+C)
8. Absorption Laws: A+(A.B) = A, A.(A+B) = A
9. DeMorgan's Theorems: A + B = Ā.B̄, A.B = Ā + B̄
10. Double Negation Law: Ā = A
Simplification Examples
Example 1
Simplify the expression A+ Ā . B
Solution
A+ Ā .B = (A+ Ā ) . (A+B) (Distributive Law)
= 1.(A+B) (Complement Law)
= A + B (Identify Law)
Example 2
Simplify the expression Ā.B + Ā . B
Solution
Ā.B + Ā . B = Ā + B̄ + Ā . B (De Morgan's Theorem)
= (Ā + B̄ ) (Since Ā is already present in Ā . B , we can use absorption law.
= Ā + B̄
Example 3
Simplify the expression (A+B) . (A+B̄ )
Solution
(A+B) . (A+B̄ ) = A. (A+B̄ )+B.(A+B̄ ) (Distributive Law)
= A+A. B̄ +B. B̄ (Absorption Law)
= A+A . B̄ (Identity Law)
= A.(1+B) (Distributive Law)
= A.1 (Null Law)
= A (Identify Law)
Example 4
Simplify the expression Ā + B̄ . (A+B̄ )
Solution
Ā + B̄ . (A+B̄ ) = (A. B̄ ).(A+B̄ ) (De Morgan's Theorem)
= A. B̄ .A+A. B̄ . B̄ (Distributive Law)
= A. B̄ +A.B̄ (Idempotent Law)
= A. B̄ (Identity Law)
Digital logic an essential aspect for the functioning of several modern electric systems, such as computers, smart phones, and other digital gadgets. Digital logic optimize in many ways in order to create and enhance circuits meant to perform various tasks. Two important applications of digital logic are the design of adder circuits and the use of Karnaugh maps for function simplification.
Half-adder and Full-adder Circuits
Adder circuits are widely used in the digital circuits to perform arithmetic calculations. There are two general forms of adder circuits known as half-adders and full adders.
1. Half-adder Circuits
A half adder is a basic circuitry unit that performs addition of two single-bit binary digits. It has two inputs, usually denoted as A and B, and two outputs: the sum (S) and the carry (C).
Truth Table for Half-adder
A | B | Sum (S) | Carry(C)
0 | 0 | 0 | 0
0 | 1 | 1 | 0
1 | 0 | 1 | 0
1 | 1 | 0 | 1
Boolean Expressions for Half-adder
S = A ⊕ B
C = A.B
In this case the symbol ⊕ represents the XOR operation. The sum output is high when only one of the inputs is high, while the carry output is high when both inputs are high.
Boolean Expressions
Sum = A⊕B
A → | | → SUM
B → | Half Adder Circuits |
A → | | → Carry
B →
Half Adder Circuits
2. Full-adder Circuits
A full-adder is a more complex circuit that adds three single-bit binary numbers. Two bits that belong to sum and a carry bit from a previous addition. It has three inputs, denoted as A, B, and
Cin (carry input), and two outputs: called the sum (S) and the carry (Cout) with both being integer values.
A | B | Cin | Sum (S) | Carry (Cout)
0 | 0 | 0 | 0 | 0
0 | 0 | 1 | 1 | 0
0 | 1 | 0 | 1 | 0
0 | 1 | 1 | 0 | 1
1 | 0 | 0 | 1 | 0
1 | 0 | 1 | 0 | 1
1 | 1 | 0 | 0 | 1
1 | 1 | 1 | 1 | 1
Boolean Expressions
Sum = A⊕B⊕Cin
Carry = (A.B) + (Cin.(A⊕B))
A → | | → SUM
B → | Half Adder Circuits | → SUM
Cin →
A → | | → Carry
B →
Cin
Half Adder Circuits
The sum output is high if the number of high inputs is odd whereas the carry output is high if the number of high inputs is at least 2.
A Karnaugh map (K-map) is a graphical representation which can be used to solve Boolean algebra expressions and minimize a logic function where algebraic computations are not employed. It is a technique in which the truth value of Boolean function is plotted to enable the identification of patterns and to perform term combining for simplification.
Minterm | Variable Combination | Minterm Expression
m0 | A = 0, B = 0, C = 0 | ABC
m1 | A = 0, B = 0, C = 1 | AB C
m2 | A = 0, B = 1, C = 0 | A B C
m3 | A = 0, B = 1, C = 1 | Ā BC
m4 | A = 1, B = 0, C = 0 | A BC
m5 | A = 1, B = 0, C = 1 | Ā B C
m6 | A = 1, B = 1, C = 0 | AB C
m7 | A = 1, B = 1, C = 1 | ABC
Minterms foe A,B and C.
A K-map is a matrix where each square is a cell, which corresponds to a positioned combination. These cells are filed with '1' or '0' in reference to the truth table of the Boolean function. The size of the K-map depends on the number of variables:
• 2 Variables: 2×2 grid
• 2 Variables: 2×4 grid
• 4 Variables: 4×4 grid
• 5 Variables: 4×8 grid (less common for manual simplification)
Every cell in the K-map represent a minterm, and the cells in each row of the K-map differ by only one bit at any particular position, following the gray code sequence.