SUM OF PRODUCT & PRODUCT OF SUM
Logic function can be written in a canonical form, where every input is either a true or complemented variable and there are only two levels of gates— one being AND and the other OR — with a possible inversion on the final output.
Two-level representation, and there are two forms, called sum of products and product of sums. A sum-of-products representation is a logical sum (OR) of products (terms using the AND operator) ; while a product of sums is just the opposite.
Example : Sum of Product
Example : Product of Sum
Example : Sum of Product
Example : Product of Sum
E = ((A & B) + (A & C) + (B & C)) & (A & B & C )’
E = (A & B & C’ ) + (A & C & B’ ) + (B & C & A’ ) (SOP)
First equation has three levels of logic.
Second equation is in a sum-of-products form:
- It has two levels of logic and the only inversions are on individual variables.
Elaboration : We can also write E as a product of sums:
E =((A’ + B’ + C) & (A’ + C’ + B) & (B’ + C + A))’
Used De Morgan’s theorems to derive this form.
ARITHMETIC LOGIC UNIT (ALU)
An arithmetic logic unit (ALU) is a digital circuit used to perform arithmetic and logic operations. It represents the fundamental building block of the central processing unit (CPU) of a computer.
ALU – perform arithmetic and logic operation (addition, subtraction and logical operation: AND, OR)
Constructs an ALU from four hardware building blocks (AND and OR gates, inverts, and multiplexors) and illustrates how combinational logic works.
MIPS word is 32 bits wide, so need 32-bit-wide ALU (connect 32 1-bit ALUs ).
MIPS word is 32 bits wide, so need 32-bit-wide ALU (connect 32 1-bit ALUs ).
1 Bit - ALU
- This adder is called a full adder; it is also called a (3,2) adder because it has 3 inputs and 2 outputs. An adder with only the a and b inputs is called a (2,2) adder or half-adder.
- The multiplexor on the right selects a AND b or a OR b, depending on whether the value of operation is 0 or 1. The line that controls the multiplexor is shown in color to distinguish it from the lines containing data.
- An adder must have two inputs for the operands and a single-bit output for the sum.
- There must be a second output to pass on the carry, called CarryOut. Since the CarryOut from the neighbor adder must be included as an input, we need a third input. This input is called CarryIn as shows in above diagram.
- The output functions Carry Out and Sum as logical equations, and these equations can in turn be implemented with logic gates.
- Truth table shows the values of the inputs when CarryOut is a 1.
- Turn this truth table into a logical equation:
- CarryOut = (b & CarryIn) + (a & CarryIn) + (a & b) + (a & b * CarryIn)
Diagram below shows that the hardware within the adder black box for CarryOut consists of three AND gates and one OR gate.
The three AND gates correspond exactly to the three parenthesized terms of the formula above for CarryOut, and the OR gate sums the three terms.
- The sum bit is set when exactly one input is 1 or when all three inputs are 1.The sum results in a complex Boolean equation
Diagram below shows a 1-bit ALU derived by combining the adder with the earlier components. Sometimes designers also want the ALU to perform a few more simple operations, such as generating 0.
The easiest way to add an operation is to expand the multiplexor controlled by the Operation line and, for this example, to connect 0 directly to the new input of that expanded multiplexor.
Post by : Prema Santhini a/p Balasathiah (B031410001)
source 1 : http://web.eecs.utk.edu/
source 2 : Lecture Note Chapter 3