Docsity

Logic Expressions and Combinatorial Circuits: Understanding Boolean Algebra, Study notes of Computer Architecture and Organization

Partial preview of the text

Download Logic Expressions and Combinatorial Circuits: Understanding Boolean Algebra and more Study notes Computer Architecture and Organization in PDF only on Docsity!

LOGIC EXPRESSION

Jeffrey L. Bucatcat Jr. Retchel Liguid

Introduction

 To define what a combinatorial circuit does, we can use a logic expression or an expression for short. Such an expression uses the two constants 0 and 1,variables such as x, y, and z (sometimes with suffixes) as names of inputs and outputs, and the operators + (which stands for or), * (which stands for and, and is usually replaced as usual with juxtaposition), and a horizontal bar (which stands for not). As usual, multiplication is considered to have a higher priority than addition. Parentheses are used to modify the priority.

Power of Logic Expressions

 A valid question is: can logic expressions describe all possible combinatorial circuits?. The answer is yes and here is why:  You can trivially convert the truth table for an arbitrary circuit into an expression. The expression will be in the form of a sum of products of variables and there inverses. Each row with output value of 1 of the truth table corresponds to one term in the sum. In such a term, a variable having a 1 in the truth table will be uninverted, and a variable having a 0 in the truth table will be inverted. x y z | f


0 0 0 | 0 0 0 1 | 0 0 1 0 | 1 0 1 1 | 0 1 0 0 | 1 1 0 1 | 0 1 1 0 | 0 1 1 1 | 1 Example: The corresponding expression is:

Laws of Logic expression

There are three fundamental laws of Boolean algebra and these are:  Commutative Law - it states that changing the order of numbers does not affect the result. In other words, if you add two numbers, it doesn't matter in which order you add them. A + B = B + A A * B = B * A  Associative Law - states that when you're adding three or more numbers, the way you group them doesn't affect the result. You can change the grouping without changing the sum. (A + B) + C = A + (B + C) (A * B) * C = A * (B * C)  Distributive Law - states that when you have a number outside of parentheses that is being multiplied by a sum (or added to a product), you can distribute (or distribute and combine) the operation to each term inside the parentheses. A * (B + C) = A * B + A * C A * B + A * C = A * (B + C)  Derivation of other rules If we combine the NOT, OR, and AND rules with the commutative, associative , and distributive laws, we can derive other rules for boolean algebra.

Example:

Prove A + A * B = A + B The mathematical "F- 0 - I-L" principle, based on the distributive law, works in Boolean algebra too. Foil is a memory aid referring to the multiplication pattern for multiplying quadratic equations. It stands for: F - AND the first terms from each OR expression O - AND the outside terms (the first term from the first OR expression and the last term from the last OR expression) I - AND the inside terms (the last term from the first OR expression and the first term from the last OR expression) L - AND the last terms from each OR expression

Example: