0% found this document useful (0 votes)
57 views

Notes On Digital Electronics

- The binary number system has a base of 2 and uses only the digits 0 and 1. The value of each digit is determined by its position in the number. - Basic logic gates include the AND, OR, NAND, NOR, XOR, and XNOR gates. The output of these gates depends on the inputs according to their truth tables. - Boolean algebra provides laws and theorems to simplify logic expressions and describe the operation of logic circuits using variables, complements, sums, and products. It is based on George Boole's work in the 1800s.

Uploaded by

Mahesh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Notes On Digital Electronics

- The binary number system has a base of 2 and uses only the digits 0 and 1. The value of each digit is determined by its position in the number. - Basic logic gates include the AND, OR, NAND, NOR, XOR, and XNOR gates. The output of these gates depends on the inputs according to their truth tables. - Boolean algebra provides laws and theorems to simplify logic expressions and describe the operation of logic circuits using variables, complements, sums, and products. It is based on George Boole's work in the 1800s.

Uploaded by

Mahesh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

Number Systems & Basics

• The number system that we use in day-to-day life is called


Decimal Number System.
• Ten digits, 0 through 9
• The ten symbols (digits) do not limit you to expressing only ten
different quantities because you use the various digits in
appropriate positions within a number to indicate the magnitude
of the quantity
• What is weight in the number system??

• Can you explain using the number 123.456?

✔ The decimal number system has a base of 10.


✔ The value of a digit is determined by its position in the
• Binary Number System – less complicated- only 2 digits!!
• Let us count in binary,

• with n bits you can count up to a number equal to 2n - 1.

✔ The binary number system has a base of 2.


✔ The value of a bit is determined by its position in the number
• Binary weights
• Decimal numbers to binary
• Binary Addition

Basic Rules

✔ In binary 1+1 = 10, not 2


• Binary Subtraction

Basic Rules

✔ In binary 10 - 1 = 1, not 9.
• Binary Multiplication

Basic Rules

✔ Binary multiplication of two bits is the same as


multiplication of the decimal digits 0 and 1.
• Binary Division
Complements & Related Arithemtic
1’s complement
• The 1’s complement of a binary number is found by changing all 1s to 0s and all
0s to 1s

✔ Change each bit in a number to get the 1’s complement


2’s complement
• The 2’s complement of a binary number is found by adding 1 to the LSB of the
1’s complement.
2’s complement = (1’s complement) + 1

✔ 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.

A 0 sign bit indicates a positive number, and a 1 sign bit indicates a


negative number.

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

• If the signs are the same, the product is positive.


• If the signs are different, the product is negative.
Other number systems/codes

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

BCD – Binary Coded Decimal


8421 BCD code
• The 8421 code is a type of BCD (binary coded decimal) code.
• Binary coded decimal means that each decimal digit, 0 through 9, is represented by a
binary code of four bits.
• The designation 8421 indicates the binary weights of the four bits (2 3, 22, 21, 20).
• The six code combinations that are not used—1010, 1011, 1100, 1101, 1110, and 1111
—are invalid in the 8421 BCD code
Gray Code

• The Gray code is unweighted and is not an arithmetic code


• It exhibits only a single bit change from one code word to the next in sequence
– Why is that so important??
Basic Logic Gates

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.

✔ For an AND gate, all HIGH inputs produce a HIGH output


The total number of possible combinations of binary inputs to a gate is

where N is the number of possible input combinations and n is the number of input variables

• Boolean multiplication follows the same basic rules governing binary


multiplication
• Boolean multiplication is the same as the AND function.
OR gate • For a 2-input OR gate, output X is HIGH when
either input A or input B is HIGH, or when
both A and B are HIGH;
• X is LOW only when both A and B are LOW.

✔ For an OR gate, at least one HIGH input produces a HIGH output


Boolean addition is the same as the OR function.

✔ When variables are separated by +, they are Ored


✔ When variables are shown together like ABC, they are ANDed.
NAND gate

• 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

• This expression says that the two input variables, A


and B, are first ANDed and then complemented, as
indicated by the bar over the AND expression.
NOR gate

• 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

✔ The NOR is the same as the OR except the output is inverted


• The Boolean expression for the output of a 2-input
NOR gate can be written as

• 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

• For an exclusive-OR gate, output X is HIGH when input A


is LOW and input B is HIGH, or when input A is HIGH and
input B is LOW;
• X is LOW when A and B are both HIGH or both LOW.

✔ For an exclusive-OR gate, opposite inputs make the output HIGH


exclusive-NOR (XNOR) gate

• For an exclusive-NOR gate, output X is LOW when


input A is LOW and input B is HIGH, or when A is
HIGH and B is LOW;
• X is HIGH when A and B are both HIGH or both LOW.
Boolean Algebra

• In 1854, George Boole published a work titled An


Investigation of the Laws of Thought, on Which
Are Founded the Mathematical Theories of Logic
and Probabilities.
• It was in this publication that a “logical algebra,”
known today as Boolean algebra, was
formulated.
• Boolean algebra is a convenient and systematic
way of expressing and analyzing the operation of
logic circuits.

• An MIT student Claude Shannon applied


Boole’s work to the analysis and design of
logic circuits
• Made Boole’s work useful and famous
• Claude Shannon is also well known for
something else – can you find??
• A variable is a symbol (usually an italic uppercase letter or word) used to represent an
action, a condition, or data. Any single variable can have only a 1 or a 0 value.
• The complement is the inverse of a variable and is indicated by a bar over the variable
(overbar).
• A literal is a variable or the complement of a variable

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

• Boolean multiplication is equivalent to


the AND operation
• In Boolean algebra, a product term is the
product of literals
Laws of Boolean Algebra
Commutative Law
Commutative law of addition

Commutative law of multiplication


Associative Law
Associative law of addition

Associative law of multiplication


Distributive Law
Distributive Law

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.

Theorem 2 : The complement of a sum of variables is equal to the product of the


complements of the variables
OR
The complement of two or more ORed variables is equivalent to the AND of the
complements of the individual variables.
• Gate equivalencies and the corresponding truth tables that illustrate DeMorgan’s
theorems. Notice the equality of the two output columns in each table.
• This shows that the equivalent gates perform the same logic function
Consider the implementation of a Boolean Expression:

✔ A combinational logic circuit can be described by a truth table


Logic Simplification
Apply the laws, rules, and theorems of Boolean algebra to simplify general expressions

✔ Simplification means fewer gates for the same function.


Standard forms of Boolean Expressions
• When two or more product terms are summed by Boolean addition, the resulting
expression is a sum-of-products (SOP).

• The domain of a general Boolean expression is the set of variables contained in the
expression in either complemented or uncomplemented form

Domain is set of variables A, B,C


Domain is set of variables A, B,C, D, E

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.

✔ The purpose of a Karnaugh map is to simplify a Boolean expression


✔ Cells that differ by only one variable are adjacent.
✔ Cells with values that differ by more than one variable are not adjacent
✔ Adjacent cells could be combined
✔ For more than 4 variables, other methods such as The Quine-McCluskey Method is used.
Karnaugh Map SOP minimization

STEP 1 : Convert to Standard SOP


STEP 2 : Map standard SOP to K-map
STEP 3 : Minimization

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

• Please verify them yourself!!!


• In a similar way, prove that NOR gate is universal too
Combinational circuits

• Combinational logic refers to circuits whose output is a function of


the present value of the inputs only.
• As soon as inputs are changed, the information about the previous inputs is
lost, that is, combinational logic circuits have no memory
• Sequential logic circuits are those whose outputs are also dependent upon
past inputs, and hence outputs.
• In other words the output of a sequential circuit may depend upon its
previous outputs and so in effect has some form of "memory"
Sequential Circuit
INPUT OUTPUT
INPUT OUTPUT

Combinational
Combinational Circuit
Circuit

Memory
• Reduce the combinational logic circuit to a minimum form

Final Simplified Circuit


• Combinational logic could be implemented using universal gates
• Universal Gate Implementation Understanding
• NOR logic

You might also like