Notes On Digital Electronics
Notes On Digital Electronics
Basic Rules
Basic Rules
✔ In binary 10 - 1 = 1, not 9.
• Binary Multiplication
Basic Rules
✔ Change all bits to the left of the least significant 1 to get 2’s complement
2’s complement
• An alternative method of finding the 2’s complement of a binary
number is as follows:
1. Start at the right with the LSB and write the bits as they are up
to and including the first 1.
2. Take the 1’s complements of the remaining bits.
2’s complement
Signed Numbers
The left-most bit in a signed binary number is the sign bit, which
tells you whether the number is positive or negative.
In the sign-magnitude form, a negative number has the same magnitude bits as
the corresponding positive number but the sign bit is a 1 rather than a zero.
• In the 1’s complement form, a negative number is the 1’s complement of
the corresponding positive number
• In the 2’s complement form, a negative number is the 2’s complement of
the corresponding positive number
• The formula for finding the number of different combinations of n bits is
Total combinations = 2n
• For 2’s complement signed numbers, the range of values for n-bit numbers is
Range = -(2n-1) to +(2n-1 - 1)
where in each case there is one sign bit and n - 1 magnitude bits.
Addition
Subtraction
• To subtract two signed numbers, take the 2’s complement of the subtrahend
and add. Discard any final carry bit.
Multiplication
Hexadecimel
✔ The hexadecimal number system consists of digits 0–9 and letters A–F
Conversion
Octal
• The octal number system is composed of eight digits, which are 0, 1, 2, 3, 4, 5, 6, 7
• To count above 7, begin another column and start over:
10, 11, 12, 13, 14, 15, 16, 17, 20, 21, etc
Inverter
In Boolean algebra,
AND gate • For a 2-input AND gate, output X is HIGH only when
inputs A and B are HIGH
• X is LOW when either A or B is LOW, or when both A
and B are LOW.
where N is the number of possible input combinations and n is the number of input variables
• For a 2-input NAND gate, output X is LOW only when inputs A and B are HIGH;
• X is HIGH when either A or B is LOW, or when both A and B are LOW.
✔ The NAND gate is the same as the AND gate except the output is inverted
• The Boolean expression for the output of a 2-input
NAND gate is
• For a 2-input NOR gate, output X is LOW when either input A or input B is HIGH, or
when both A and B are HIGH;
• X is HIGH only when both A and B are LOW
• This equation says that the two input variables are first
ORed and then complemented, as indicated by the bar
over the OR expression
XOR gate
Boolean Arithmetic
Boolean Addition
• Boolean addition is equivalent to
the OR operation
• In Boolean algebra, a sum term is a
sum of literals
Boolean Multiplication
Basic Rules
Demorgan’s Theorems
Theorem 1 : The complement of a product of variables is equal to the sum of the
complements of the variables
OR
The complement of two or more ANDed variables is equivalent to the OR of the
complements of the individual variables.
• The domain of a general Boolean expression is the set of variables contained in the
expression in either complemented or uncomplemented form
AND/OR
implementation
of SOP
✔ An SOP expression can be implemented with one OR gate and two or more AND gates
• Any logic expression can be changed into SOP form by applying Boolean algebra
techniques.
• For example, the expression A(B + CD) can be converted to SOP form by applying the
distributive law:
A(B + CD) = AB + ACD
• A standard SOP expression is one in which all the variables in the domain appear in
each product term in the expression.
Example:
• When two or more sum terms are multiplied, the resulting expression is
a product-of-sums (POS).
• A standard POS expression is one in which all the variables in the domain appear in
each sum term in the expression
Example:
Converting Standard SOP to Standard POS
Boolean Expressions & Truth Tables
✔ Similar way, you can determine Standard Expressions from a given Truth Table
The Karnaugh Map
• Karnaugh map is similar to a truth table because it presents all of the possible values of
input variables and the resulting output for each value.
• Instead of being organized into columns and rows like a truth table, the Karnaugh map is
an array of cells in which each cell represents a binary value of the input variables.
1. A group must contain either 1, 2, 4, 8, or 16 cells, which are all powers of two. In the
case of a 3-variable map, 23 = 8 cells is the maximum group.
2. Each cell in a group must be adjacent to one or more cells in that same group, but all
cells in the group do not have to be adjacent to each other.
3. Always include the largest possible number of 1s in a group in accordance with rule 1.
4. Each 1 on the map must be included in at least one group. The 1s already in a group can
be included in another group as long as the overlapping groups include noncommon 1s.
Resulting minimum SOP expression
1. Group the cells that have 1s. Each group of cells containing 1s creates one product term
composed of all variables that occur in only one form (either uncomplemented or
complemented) within the group. Variables that occur both uncomplemented and
complemented within the group are eliminated. These are called contradictory variables.
2. Determine the minimum product term for each group.
(a) For a 3-variable map:
(1) A 1-cell group yields a 3-variable product term
(2) A 2-cell group yields a 2-variable product term
(3) A 4-cell group yields a 1-variable term
(4) An 8-cell group yields a value of 1 for the expression
(b) For a 4-variable map:
(1) A 1-cell group yields a 4-variable product term
(2) A 2-cell group yields a 3-variable product term
(3) A 4-cell group yields a 2-variable product term
(4) An 8-cell group yields a 1-variable term
(5) A 16-cell group yields a value of 1 for the expression
3. When all the minimum product terms are derived from the Karnaugh map, they are
summed to form the minimum SOP expression.
Mapping Directly from Truth Table
“Don’t Care” Conditions
• They can be treated as “don’t care” terms with respect to their effect on the output.
• That is, for these “don’t care” terms either a 1 or a 0 may be assigned to the output;
• It really does not matter since they will never occur. Eg: invalid codes of BCD
Karnaugh Map POS minimization
The process for minimizing a POS expression is basically the same as for an SOP
expression except that you group 0s to produce minimum sum terms instead of
grouping 1s to produce minimum product terms.
Converting Between POS and SOP Using the Karnaugh Map
Universal Gates
• All Boolean functions can be implemented using the set {AND, OR, NOT}
• Gates which can implement any Boolean function without the need to use
any other type of gate
• NAND and NOR are universal gates
• Really?
Universal Gates
Combinational
Combinational Circuit
Circuit
Memory
• Reduce the combinational logic circuit to a minimum form