0% found this document useful (0 votes)
52 views86 pages

Unit 5

EEE basics - 3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views86 pages

Unit 5

EEE basics - 3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

EEIR11 – Basics of Electrical and Electronics

Engineering

Dr. P. Maheswaran
Assistant Professor, Dept. of ECE
NIT Trichy

mahes@nitt.edu
Overview of the unit
Unit 5:

Digital Electronics: Introduction to numbers systems, basic Boolean laws, reduction of


Boolean expressions and implementation with logic gates.
Decimal number system:
Any number is represented in units, tens, hundreds, thousands and so on.

5678.9 can be represented as

A Decimal number can be written as (5678.9)10. Subscript indicates radix or base.

In powers of ten we can write

The position of a digit with reference to decimal point determines its value/weight.

Sum of all digits multiplied by their weights give the total number.
Binary number system:
Decimal system with its ten digits is a base ten system.

Binary systems with its two digits is a base-two system.

Two binary digits (bits) are 1 and 0.

Weight of binary numbers is expressed as power of 2.

(1101.101)2 in powers of 2 and its decimal equivalent.


Octal number system:
Decimal number system uses ten symbols (0 to 9).

The octal number system uses the first eight digits of decimal number system: (0 to 7).

It uses base as 8.

(567)8 in powers of eight and its decimal equivalent.


Hexadecimal number system:
Base of 16.

16 digits: 0 to 9, A, B, C, D, E, F.

Useful for human communication with a computer.

Its base is a power of 2 (24), it is easy to convert to


binary and vice versa.
Number base conversions: Binary to Octal
Base of octal is 8. The base for binary number is 2.

Base for octal is third power of the base for binary numbers.

By grouping 3 digits of binary numbers, and then converting each group digits to its octal
equivalent, one can convert binary number to its octal equivalent.
Number base conversions: Octal to Binary
Reversal of the process explained in the previous section.

Each digit of the octal number is individually converted to its binary equivalent to get octal to
binary conversion.

(634)8 to binary:

(725.63)8 to binary:
Number base conversions: Binary to Hexadecimal
The base of hexadecimal number is 16.

Base of binary numbers is 2.

The base of hexadecimal number is the fourth power of the base for binary numbers.

By grouping 4 digits of binary numbers and then converting each group digit to its
hexadecimal equivalent, binary number can be converted to its hexadecimal equivalent.
Number base conversions: Hexadecimal to Binary
This is the reverse process of what was done for hex to binary conversion.

Each digit in the hexadecimal number is individually converted to its binary equivalent to get
hexadecimal to binary conversion of the number.

Convert (5A9.B4)H to binary


Number base conversions: Octal to Hexadecimal
Convert octal number to its binary equivalent.

Convert binary number to its hexadecimal equivalent.

Example: (615)8 to hexadecimal.


Number base conversions: Hexadecimal to Octal
Convert hexadecimal number to its binary equivalent.

Convert binary number to its octal equivalent.

Example: (25B)H to its octal equivalent.


Number base conversions: Converting any radix to decimal
In general, numbers can be represented as

A number with any radix can be converted into its decimal equivalent.

(3102.12)4 to its decimal.


Number base conversions: Conversion of decimal numbers to any radix number

Successive division for integer part:


Repeatedly divide the integer part of the decimal number ty r (new radix) until quotient is
zero.
The remainder of each division becomes the numeral in the new radix.
The remainders are taken in the reverse order to form a new radix number.

First remainder is least significant digit (LSD) and last remainder is the most significant digit
(MSD).
Number base conversions: Conversion of decimal numbers to any radix number

Successive division for integer part: Convert (37)10 to its binary


Number base conversions: Conversion of decimal numbers to any radix number

Successive division for integer part: Convert (214)10 to its octal equivalent
Number base conversions: Conversion of decimal numbers to any radix number

Successive multiplication for fractional part:


The number to be converted is multiplied by the radix of the new number.

This produces an integer part and a factional part.

The integer part (carry) of the product becomes a numeral in the new radix number.
The fractional part is again multiplied by the radix.

This process is repeated until fractional part reaches 0 or until new radix number is carried
out to significant digits.
The integer part (carry) of each product is read downward to represent the new radix
number.
Number base conversions: Conversion of decimal numbers to any radix number

Successive multiplication for fractional part: Convert (0.8125)10 to its binary form

Binary fraction = 0.1101, which is equivalent to 0.8125 in decimal.


Number base conversions: Conversion of decimal numbers to any radix number

Successive multiplication for fractional part: Convert (0.95)10 to its binary form

0.8 is repeated. Further multiplication gives repeated sequence.


The sequence is stopped at 7 digits = 0.1111001
This answer is approximate.
Complements:

• Complements are used in digital computers to simplify the subtraction operation.


• Two types of complements:
• The radix complement – aka r’s complement.
• The diminished radix complement – aka (r-1)’s complement.
• For binary system, r = 2. We take 2’s complement and 1’s complement.
• In decimal system, r = 10. We take 10’s complement and 9’s complement.
• 1’s complement representation:

• 2’s complement representation:

• 2’s complement is used to represent negative numbers.


Complements: 1’s complement subtraction

• Subtraction can be performed with addition using 1’s complement method.


• Two cases:
• Case 1: A – B, where A > B
• Case 2: A – B, where B > A
• Case 1: Method:
• Determine the 1’s complement of the smaller number.
• Add the 1’s complement to the larger number.
• Remove the carry and add it to the result. This is called end-around carry.
Complements: 1’s complement subtraction

• Case 2: Method:
• Determine the 1’s complement of the larger number.
• Add the 1’s complement to the smaller number.
• Answer is in 1’s complement form. To get the answer in true form, take the 1’s
complement and assign negative sign to the answer.
Complements: 2’s complement subtraction

• The subtraction is obtained by only addition.


• Case 1: A – B, A > B.
• Determine the 2’s complement of a smaller number.
• Add the 2’s complement to the larger number.
• Discard the carry.
Complements: 2’s complement subtraction

• Case 2: A – B, B > A.
• Determine the 2’s complement of the larger number.
• Add the 2’s complement to the smaller number.
• Answer is in the 2’s complement form. To get the answer in the true form, take the 2’s
complement and assign negative sign to the answer.
Binary arithmetic:

• Rules for binary addition:


Binary arithmetic:

• Rules for binary subtraction:

• If the signs are same, we add the two magnitudes and give the sum the common sign.
• If the signs are different, we subtract the smaller magnitude from the larger and give the result the sign
of the larger number.
• (+24) + (-32) = -(32-24) = -8
• This process requires the comparison of the signs and the magnitudes and then performing addition or
subtraction.
Binary arithmetic:

• But with signed complement arithmetic does not require comparison or subtraction.
• Only addition is needed.
• 2’s complement arithmetic for all cases:
Binary coded decimal (8-4-2-1):

• Each digit position of the number represents a specific weight.


• Each digit of a decimal number is represented by a separate group of bits.
• Each decimal digit is represented by a 4 bit binary number.
• It is called 8-4-2-1 BCD because the weights associated with 4 bits are 8-4-2-1 from left to right.

• The pure binary representation of (58)10 = (111010)2, only 6 bits are required.
• BCD requires 8 bits, less efficient.
• But easy for conversion between BCD and decimal.
BCD addition:

• The addition of two BCD numbers is best understood by considering the three cases that occur when
two BCD digits are added.
• Sum equals 9 or less with carry 0:

• The addition is carried out as in normal binary addition and the sum is 1001, which BCD for 9.
• Sum greater than 9 with carry 0:

• Whenever the sum exceeds 9, it has to be corrected by adding (0110) in the invalid BCD.
BCD addition:
• Sum equals 9 or less with carry 1:

• The result (0001 0001) is a valid BDC number, but it is incorrect.


• To get the correct BCD result, correction factor of 6 has to be added to the least significant digit sum.

In summary:
• Add two BCD numbers using ordinary binary addition.
• If four-bit sum is equal to or less than 9, no correction is needed. The sum is in proper BCD form.
• If the four-bit sum is greater than 9 or if a carry is generated from the four-bit sum, the sum is invalid.
• To correct the invalid sum, add 0110 2 to the four-bit sum. If a carry results from this addition, add it to
the next higher–order BCD digit.
BCD addition:
In summary:
• Add two BCD numbers using ordinary binary addition.
• If four-bit sum is equal to or less than 9, no correction is needed. The sum is in proper BCD form.
• If the four-bit sum is greater than 9 or if a carry is generated from the four-bit sum, the sum is invalid.
• To correct the invalid sum, add 0110 2 to the four-bit sum. If a carry results from this addition, add it to
the next higher–order BCD digit.
BCD subtraction:
• A negative BCD number can be expressed by taking the 9’s or 10’s complement methods.
• 9’s complement if found by subtracting the decimal number from 9.
• When 9’s complement of smaller number is added to the larger number, carry is generated.
• Add this carry to the result (end-around carry).
• When larger number is subtracted from smaller number, there is no carry.
• The result is in 9’s complement form and negative.
BCD subtraction:
BCD subtraction:
• The 10’s complement of a decimal number is equal to the 9’s complement plus 1.
• The 10’s complement can be used to perform subtraction by adding the minuend to the 10’s
complement of the subtrahend and dropping the carry.

In summary:
• Find the 10’s complement of a negative number.
• Add two number using BCD addition.
• If carry is not generated find the 10’s complement of the result.
Boolean postulates and laws:
• The postulates are basic assumptions from which it is possible to deduce the rules, laws, theorems,
and properties of the system.
• Boolean algebra formulated by:
• Defined set of elements.
• Two binary operators (+ and .).
Rules of Boolean algebra:
Rules of Boolean algebra:
Rules of Boolean algebra:
Laws of Boolean algebra:
Three of the laws of Boolean algebra are the same as in ordinary algebra.
Commutative laws:

Law 2: AB = BA: order in which the variables are ANDed makes no difference.

Commutative laws can be extended to any number of variables.


A+B+C = B+A+C, ABCD = BCDA, etc.
Laws of Boolean algebra:
Three of the laws of Boolean algebra are the same as in ordinary algebra.
Associative laws:
Laws of Boolean algebra:
Three of the laws of Boolean algebra are the same as in ordinary algebra.
Distributive law:
Additional rules of Boolean algebra:
Theorems in Boolean algebra:
DeMorgan’s theorems:
Consensus theorem:

Dual of Consensus theorem:


Principle of duality:

It says that starting with a Boolean relation, you can derive another Boolean relation by:

1. Changing each OR sign to an AND sign


2. Changing each AND sign to an OR sign and
3. Complementing any 0 or 1 appearing in the expression

For instance, Rule 1 says A + 0 = A


The dual is A.1 = A
Boolean Expression and Boolean Function:

• Boolean expressions are constructed by connecting the Boolean constants and variables with Boolean
operations.
• These Boolean expressions are also known as Boolean formulas.
• Boolean expressions are used to describe Boolean functions:

• Literals: each occurrence of variable in complemented or un-complemented form.


• Product term: Either a literal or a product (aka conjunction) of literals.
Boolean Expression and Boolean Function:
• Sum term: Either a literal or a sum (aka disjunction) of literals.

• The literals can be arranged in one of the two forms:


• Sum of product form (SOP)
• Product of sum form (POS)
• Sum of product form (SOP)

• Sum of product form (SOP)


M-notations: Minterms and Maxterms:

• Each individual term in standard SOP form is called minterm.


• Each individual term in standard POS form is called maxterm.
• Minterms and maxterms allows us to introduce a very convenient shorthand notations to
express logical functions.
• For n variable logical function, there are 2^n minterms and maxterms.
These shorthand notations can be used to represent logical
functions as
Minimization of Boolean expressions:

• Boolean functions are realized by logic gates.


• The number of gates required and the number of input terminals for the gates gets reduced
if the Boolean function is simplified.
• Simplification of Boolean function saves hardware required.
• Saves cost for design of Boolean function.
Minimization of Boolean expressions:
Karnaugh Map Minimization:

• Minimization of Boolean expressions by Boolean algebra needs better understanding of


Boolean laws, rules, and theorems.
• During the process of simplification, we have to predict each successive step.
• We can not be sure if an expression simplified by Boolean algebra alone is the simplest
possible expression.
• Map method gives us systematic approach for simplification.
The Karnaugh Map:

• The basis of this method is the graphical chart known as K-map.


• It contains boxes called cells.
• Each of the cell represents one of the 2^n possible products formed from n variables.
• 2-variable map contains 2^2 = 4 cells.
• 3-variable map contains 2^3 = 8 cells.
• So on.
The Karnaugh Map:

• The cells of K-map are labelled with a combination of variables and complements.
• The product term in a cell is the product of all the variables in that column and row.
• When we move from one cell to another, along a row or column:
• One and only one variable in the product term changes.
• Irrespective of number of variables the labels along each row and column must conform to
the single-change rule.
The Karnaugh Map:

• Figures show the label of rows and columns of a 2,3 and 4 variable maps
using gray code and the product terms corresponding to each cell.
• Instead of writing actual product terms, shorthand minterm notations are
written in the cell.
• Rows and columns are marked with Gray code instead of variables.
Plotting of K-map:

• The logic function can be represented in various forms:


• Truth table
• SOP Boolean expression.
• POS Boolean expression.
Plotting of K-map: Representation of Truth table on K-map
Plotting of K-map: Representing Standard SOP on K-Map

• Boolean expression in the sum of products form is plotted on K-Map by placing a 1 in each
cell corresponding to a term (minterm) in the sum of products expression.
• Remaining cells are filled with zeros.
Plotting of K-map: Representing Standard SOP on K-Map
Plotting of K-map: Representing Standard POS on K-Map

• A Boolean expression in POS can be plotted on K-Map by placing a 0 (zero) in each cell
corresponding to a maxterm in the expression.
• Remaining cells are filled with ones.
Grouping of cell for simplification:

• Grouping two adjacent ones (pair)


• Any pair of vertical or horizontal ones can be grouped.
Grouping of cell for simplification:

• Grouping two adjacent ones (pair)


• Any pair of vertical or horizontal ones can be grouped.
• When a pair is combined, one variable is eliminated.
Grouping of cell for simplification:

• Grouping four adjacent ones (quad)


• When a quad is combined, two variables are eliminated.
Grouping of cell for simplification:

• Grouping four adjacent ones (quad)


• When a quad is combined, two variables are eliminated.
• Overlapping of groups is possible.
Grouping of cell for simplification:

• Grouping eight adjacent ones (octet)


• When an octet is combined, three variables are eliminated.
Simplification of SOP expression:
Simplification of SOP expression:
Logical operators:
NOT operator OR operator

AND operator
Logic Gates:
NOT gate
Logic Gates:
AND gate

Pulsed operation: Timing diagram


Logic Gates:
OR gate

Pulsed operation: Timing diagram


Logic Gates:
NAND gate

Pulsed operation: Timing diagram


Logic Gates:
NOR gate

Pulsed operation: Timing diagram


Logic Gates:
Exclusive OR gate

Pulsed operation: Timing diagram


Logic Gates:
Exclusive NOR gate

Pulsed operation: Timing diagram


Boolean Expression for Logic Gates:
Alternative Logic-Gate Representation:
Universal Gates:

• NAND and NOR gates are called universal gates.


• Any logic function can be implemented with NAND and NOR gate.
NAND gate:
Can be used to realize NOT function, AND function, OR function, and NOR function.
Universal Gates:

• NAND and NOR gates are called universal gates.


• Any logic function can be implemented with NAND and NOR gate.
NAND gate:
• OR function
Universal Gates:

• NAND and NOR gates are called universal gates.


• Any logic function can be implemented with NAND and NOR gate.
NAND gate:
• NOR function
Universal Gates:

• NAND and NOR gates are called universal gates.


• Any logic function can be implemented with NAND and NOR gate.
NOR gate:
NOT function OR function
Universal Gates:

• NAND and NOR gates are called universal gates.


• Any logic function can be implemented with NAND and NOR gate.
NOR gate:
AND function
Universal Gates:

• NAND and NOR gates are called universal gates.


• Any logic function can be implemented with NAND and NOR gate.
NOR gate:
NAND function
Steps for converting to NAND/NOR logic using graphical procedure:
Steps for converting to NAND/NOR logic using graphical procedure:
Implementation of logic functions using gates:
Implementation of SOP expression:
Implementation of logic functions using gates:
Implementation of POS expression:

You might also like