1.1 LOGIC DESIGN
◦
Digital electronics operate with only two voltage
levels
high voltage and a low voltage
◦
Computer used binary system (0,1)
◦
Combinational logic block contains no memory
◦
logic block with n inputs, there are 2n
entries (possibility) in the truth table
TRUTH TABLE
A
truth table shows how a logic circuit's output responds to various combinations
of the inputs, using logic 1 for true and logic 0 for false. All permutations
of the inputs are listed on the left, and the output of the circuit is listed
on the right. The desired output can be achieved by a combination of logic gates. A truth table for two inputs is shown, but it can be extended to any
number of inputs. The input columns are usually constructed in the order of
binary counting with a number of bits equal to the number of inputs.
Binary
Functions of Two Variables
The following table gives a list of the common logic functions and their
equivalent Boolean notation.
Logic
Function
|
Boolean
Notation
|
AND
|
A.B
|
OR
|
A+B
|
NOT
|
A
|
NAND
|
A.B
|
NOR
|
A+B
|
EX-OR
|
(A.B) + (A.B) or
A⊕B
|
EX-NOR
|
(A.B) +
or A ⊕ B
|
Example:
·
input AND Gate
The output Q is true if both input A, AND input B are both true, (Q = A and B).
· input OR (Inclusive OR) Gate
The output Q is true if either input A, OR input B is true, (Q = A or
B).
Boolean algebra
v
Another approach to express the logic function with
logic equations
v
OR operator is written as +, as in A + B
◦ 0 +1 = 1
------- 1 + 0 = 1
v
AND operator is written as & , as in A &
B
◦ 0 & 1 = 0
-------1 & 0 = 0
v
NOT (inversion) operator is written as –
or’ , as in A’
◦ 0’=1 ------
1’= 0
Boolean Algebra Law
1.
Identity law: A + 0 = A and A & 1 = A.
2.
Zero and
One laws: A + 1 = 1 and A & 0 = 0.
3.
Inverse
laws: A + A’ = 1 and A & A’ =
1.
4.
Commutative
laws: A + B = B + A and A
& B = B & A.
5.
Associative
laws: A + (B + C) = (A + B)
+ C and A & (B & C) = (A & B)
& C.
6.
Distributive
laws: A & (B + C) = (A
& B) + (A & C) and
A + (B & C) = (A + B) & (A + C).
Gates
} Logic gates
Logic gates process signals which represent true or false.
Normally the positive supply voltage +Vs represents true and 0V represents
false. Other terms which are used for the true and false states are shown in
the table on the right. It is best to be familiar with them all.
Gates are identified by their function: NOT, AND, NAND, OR, NOR, EX-OR and EX-NOR. Capital letters are normally used to make it clear that the term
refers to a logic gate.
Note that logic gates are not always required
because simple logic functions can be performed with switches or diodes:
- Switches
in series (AND
function)
- Switches
in parallel (OR function)
- Combining
IC outputs with diodes (OR
function)
NOT gate (inverter)
The output Q is true when the input A is
NOT true, the output is the inverse of the input: Q = NOT A
A NOT gate can only have one input. A NOT gate is also called an inverter.
A NOT gate can only have one input. A NOT gate is also called an inverter.
AND gate
The output Q is true if input A AND input B
are both true: Q = A AND B
An AND gate can have two or more inputs, its output is true if all inputs are true.
An AND gate can have two or more inputs, its output is true if all inputs are true.
B031210021
1.2 DECODER
-Decoder is use to build larger components
-The most common type of decoder has an n-bit input and 2n outputs
-This decoder translates the n-bit input into a signal that corresponds to the binary value of the n-bit input
-The outputs are shows a 3-bit decoder and the truth table.This decoder is called a 3-to-8 decoder
-Encoder performs the inverse function of a decoder
1.3 MULTIPLEXOR
-The output is one of the inputs that is selected by a control
-The left side shows this multiplexor has three inputs:
two data values and a selector (control) value.
-The selector value determines which of the inputs becomes the output
-We can represent the logic function computed by a two-input multiplexor
C = (A & S') + (B & S)
-Multiplexor can be created with an arbitrary number of data input
-If there are only two inputs, the selector is a single signal that selects one of the inputs
-If it true (1) and the other if it is false (0)
-The multiplexor basically consists of 3 parts:
1) A decoder that generates n signals, each indicating a different input
2) An array of n AND gates, each combining one of the inputs with a signal from the decoder
3) A single large OR gate that incorporates the outputs of the AND gates
-To associate the inputs with selector values, we often label the data inputs numerically
HALIMAH BINTI RAHMAN
B031210349
BITC
1.4 Arithmetic Logic Unit ( ALU )
ALU ~ the part of computer processor or also known as CPU that carries out the arithmetic operations ( addition , subtraction ) and logical operation ( AND , OR ) on the operands in a computer.
~divided into 2 units : a) Arithmetic unit b) Logic unit
~A large part of ALU design is captured by the design of a 1-bit ALU~ALU consists of 32 bit-wide arranged in parallel to send output bits from each operation to the ALU outputs.
![]() |
1-bit logical unit for OR and AND
~This adder is called full adder.
~Also called (3,2) adder because it has 2 outputs and 3 inputs. ~Adder with only A and B inputs is called (2,2) adder or HALF Adder |
![]() |
Figure 2 |
~Adder have two inputs for the operands and a single bit output for the sum .
~There are a second output pass on the carry called CARRYOUT.
~The CarryOut from the neighbour adder have to be included as an input.
~The third input is called CarryIn .
~Each bit of addition has 3 input bits (Ai, Bi, and CarryIni), as well as 2 outputs bits (Sumi, CarryOuti), where CarryIni+1 = CarryOuti. (Note: The "i" subscript denotes the i-th bit.) .
~Nur Amira Farhana bt Zainol
~B031210351
1.5 Sum of Product and Product of Sum
Sum of Product (SOP)
*is a logical sum OR of products.
*Each function result is 1
*Form product of all variables.
*When two or more product terms are summed by Boolean addition, the resulting expression is sum of product ( SOP ).
Examples :
![]() |
Product of Sum (POS)
*is logical sum AND of products
*Each function result is 0
~When two or more sum terms are multiplied the resulting expression is product of sum ( POS ).
For examples :
*can contain single variable terms
example :
* A single overbar cannot extend over more than one variable, but more than one variable in a term can have an overbar.
Example :
*Figure 1 shows for the expression (A + B)(B + C + D)(A + C). The output X of the AND gate equals the POS expression.
![]() |
Figure 1 |

~Nur Amira Farhana bt Zainol
~B031210351
1.6 Sum of Product and Product of Sum
Sum of Product (SOP)*is a logical sum OR of products.
*Each function result is 1
*Form product of all variables.
*When two or more product terms are summed by Boolean addition, the resulting expression is sum of product ( SOP ).
Examples :
![]() |
Product of Sum (POS)
*is logical sum AND of products
*Each function result is 0
~When two or more sum terms are multiplied the resulting expression is product of sum ( POS ).
For examples :
*can contain single variable terms
example :
* A single overbar cannot extend over more than one variable, but more than one variable in a term can have an overbar.
Example :
*Figure 1 shows for the expression (A + B)(B + C + D)(A + C). The output X of the AND gate equals the POS expression.
![]() |
Figure 1 |