0% found this document useful (0 votes)
51 views50 pages

ECE 211 Digital Electronics Unit 1

Download as pptx, pdf, or txt
0% found this document useful (0 votes)
51 views50 pages

ECE 211 Digital Electronics Unit 1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 50

ECE 211 Digital Electronics

UNIT - I

Digital Fundamentals

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 1


Syllabus
• Number system
• Basic logic gates, Boolean algebra, De Morgan’s laws
• 1’s and 2’s complements
• Minterms and Maxterms, Sum of products and product of sums
• Introduction to Karnaugh maps (up to 4 variable)
• Codes - Binary, BCD, Excess 3, Gray, Alphanumeric codes
• Prime Implicants, Essential Prime Implicants.

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 2


Number System
• In digital electronics, the number system is used for representing the
information.
• The number system has different bases.
• The base represent as the total number of digit used in the number
system.
• There are four types f number systems.

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 3


For example:
1010 represents the decimal value ten. (1 ten + 0 units)
102 represents the binary value two. (1 two + 0 units)
108 represents the octal value eight. (1 eight + 0 units)
1016 represents the hexadecimal value sixteen. (1 sixteen + 0 units)
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 4
Conversion Among Bases
• The possibilities:

Decimal Octal

Binary Hexadecimal

5
Converting between number systems
Octal to Decimal
For example the system radix of octal is 8, since any of the 8 values from 0 to 7 can be
written as a single digit.
Convert 1268 to decimal.
Using the values of each column, (which in an octal integer are powers of 8) the octal
value 1268 can also be written as:
(1x82) + (2x81) + (6 x 80)
As (82 = 64), (81 = 8) and (80 =1), this gives a multiplier value for each column.
Multiply the digit in each column by the column multiplier value for that column to
give:
1x64 = 64 2x8 =16 6x1 = 6
Then simply add these results to give the decimal value.
64 + 16 + 6 = 8610
Therefore 1268 = 8610.
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 6
Binary to Decimal
Convert 11012 to decimal.
The same method can be used to convert binary
number to decimal:
= (1x23)+(1x22)+(0x21)+(1x20)
= 8 + 4 +0 +1
= 1310
Therefore 11012 = 1310.

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 7


Hexadecimal to Decimal
Convert B2D16 to decimal.
Using the same method to convert hexadecimal to decimal.
= (Bx162)+(2x161)+(Dx160)
= (11x162)+(2x161)+(13x160)
= 2816 + 32 +13
= 286110
Therefore B2D16 = 286110.
The same method (multiplying each digit by it's column value) can be to
convert any system to decimal.
Try these conversions to decimal WITHOUT USING YOUR
CALCULATOR FOR THE ACTUAL CONVERSION.
1102 678 AFC16 FC16
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 8
Decimal to Octal

For example, to convert the decimal number 8610 to octal:


Divide 8610 by the system radix, which when converting to
octal is 8. This gives the answer 10, with a remainder of 6.
Continue dividing the answer by 8 and writing down the
remainder until the answer = 0
Now simply write out the remainders, starting from the
bottom, to give 1268
Therefore 8610 = 1268

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 9


Decimal to Binary

This process also works to convert decimal to binary, but


this time the system radix is 2:
For example, to convert the decimal number 13 10 to
binary:

Therefore 1310 = 11012

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 10


Decimal to Hexadecimal

It also works to convert decimal to hexadecimal, but now


the radix is 16:
As some of the remainders may be greater than 9 (and so
require their alphabetic replacement), you may find it
easier to use Decimal for the remainders, and then convert
them to Hex.
Therefore 286110 = B2D16

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 11


Numbers with Fractions
Converting the Decimal Integer to Binary
The radix point splits the number into two parts; the part to the left of the
radix point is called the INTEGER. The part to the right of the radix point
is the FRACTION. A number such as 34.62510 is therefore split into
3410 (the integer), and .62510 (the fraction).
To convert such a fractional decimal number to any other radix, the
method described above is used to covert the integer.
So 3410 = 1000102
Converting the Decimal Fraction to Binary
To convert the fraction, this must be MULTIPLIED by the radix (in this case 2
to convert to binary). Notice that with each multiplication a CARRY is generate
from the third column. The Carry will be either 1 or 0 and these are written
down at the left hand side of the result. However when each result is multiplied
the carry is ignored (don’t multiply the carry). Each result is multiplied in this
way until the result (ignoring the carry) is 000. Conversion is now complete.
For the converted value just read the carry column from top to bottom.
So 0.62510 = .1012
Therefore the complete conversion shows that 34.62510 = 100010.101 2
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 12
Basic Logic Gates

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 13


Boolean Algebra

A combinational logic circuit such as that shown in Fig below is


described by a Boolean equation as:
X = (A•B) + (A•C) + (A•B•C)

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 14


Circuit Simplification Using Boolean Algebra
The algebraic method used to simplify digital circuits applies a number of Boolean laws
to successively simplify complex equations. Selected laws and rules are applied, step by
step, to the original equation, so as to eventually arrive at a simplified version that can
be implemented with a smaller number of gates and therefore lead to a simpler circuit.

Boolean Laws
The laws of Boolean algebra are similar in some ways to those of standard algebra, but in
some cases Boolean laws are unique. This is because when logic is applied to digital
circuits, any variable such as A can only have two values 1 or 0, whereas in standard
algebra A can have many values.

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 15


Commutative Laws
In a group of variables connected by operators AND or OR, the order of the variables
does not matter.
1a. Boolean addition (OR): A+B = B+A
1b. Boolean multiplication (AND): A•B = B•A

Associative Laws
The order of calculation can be changed without affecting the result (Change which
terms are in brackets, or remove brackets). Note: This is only OK so long as all signs (+
or •) are the same.
2a. Boolean addition (OR): (A+B)+C = A+(B+C) = A+B+C
2b. Boolean Multiplication (AND): (A•B)•C = A•(B•C) = A•B•C = ABC

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 16


Distributive Laws
The same answer is arrived at when multiplying (ANDing) a variable by a
group of bracketed variables added (ORed) together, as when each
multiplication (AND) is performed separately.
Law 3a is similar to factoring in normal algebra, but law 3b is unique to
Boolean algebra because unlike normal algebra, where A x A=A 2, in Boolean
algebra A•A = A
3a. A•(B+C) = A•B+A•C
3b. A+(B•C) = (A+B) • (A+C) = AA +AC + AB +BC
= A(1+C) + AB +BC [as AA = A]
= A +AB +BC [ as 1+C = 1]
= A(1+B) +BC [as 1+B = 1]
= A + BC.
Identity Elements
Rule 4b, shows that the Identity Element for the OR operator is 0, and any
variable (e.g. A) ORed with 0 it retains its identity.
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 17
4a. A•1 = A
5a and 5b show how by ‘forcing the Identity Element’, (in B
column of the truth tables) to the opposite states to those
used in 4a and 4b, produces an output that is the same as the
Identity Element.
5a. A•0 = 0
5b. A+1 = 1

6a and 6b show that ANDing or ORing two identical


variables, produces an output equal to a single variable,
showing that one of the variables is redundant, a useful rule
when simplifying Boolean equations.
6a. A•A = A
6b. A+A = A
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 18
Complement Law
7a. A + A’ = 1 Any variable ORed with its inverse is 1
7b. A • A’ = 0 Any variable ANDed with its inverse is 0

Reduction
8a. When a single variable (A) is ANDed with itself OR a
second variable (A+B), the result is equal to the single
variable.
8a A•(A+B) = A = A + AB = A(1+B) =A.1=A

8b. When a single variable (A) is ORed with itself AND a


second variable (A•B), the result is equal to the single
variable.
8b A+(A•B) = A
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 19
8c. When a single variable (A) is ORed with
itself OR a second variable (A+B), the single
variable disappears.
8c A+(A+B) = (A+B)

8d. When a single variable (A) is ANDed with


itself AND a second variable (A•B), the single
variable disappears.
8d A•(A•B) = (A•B)

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 20


Duality Rules

It is possible to derive additional identities by


obtaining the Dual of an identity. This involves
changing the AND operators to OR and the OR
operators to AND. Additionally any 0s are
changed to 1s and 1s to 0s as shown in Table.
The duality rule can be used to change a logic
expression containing both AND and OR
elements to its equivalent dual expression.
Table 2.3.3 shows that A•(B+C) is the same as
A+(B•C).

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 21


De Morgan’s Theorem

Law 1. A+B = A . B
A’ + B’ = (A • B)’ Inverting the inputs to an OR gate
changes its function to NAND.
Law 2. . A.B = A + B
A’ • B’ = (A + B)’ Inverting the inputs to an AND
gate changes its function to NOR

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 22


Boolean Simplification Examples

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 23


03/11/2023 Fall 2020 - ECE 211 Digital Electronics 24
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 25
1’s and 2’s complement of a Binary Number

1’s complement of a binary number is another binary


number obtained by toggling all bits in it, i.e.,
transforming the 0 bit to 1 and the 1 bit to 0.
Examples:

1's complement of "0111" is "1000"


1's complement of "1100" is "0011"

2’s complement of a binary number is 1 added


to the 1’s complement of the binary number.
Examples:
2's complement of "0111" is "1001"
2's complement of "1100" is "0100"
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 26
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 27
Practice

Convert to one’s complement:


1.1010
2.11110000
3.10111100 11000000
4.10100001

Convert to two’s complement:


5.1010
6.11110000
7.10000000
8.011111111

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 28


Minterm and Maxterm

• Conversion of English sentences to Boolean equations.


• Example
–The alarm will ring iff the alarm switch is on and the door is not
closed or it is after 6 PM and the window is not closed.
–Boolean equation
• Z = AB’ + CD’
• If Z = 1 , the alarm will ring.
• Draw the network. Z will drive the alarm.

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 29


Minterm Notation

• f = A’BC + AB’C’ + AB’C + ABC’ +ABC;

The other way to represent f is:


f (A,B,C) = m3 + m4 + m5 + m6 + m7 or
f (A,B,C) = Σm(3,4,5,6,7)
Another view,
f (A,B,C) =0.m0+ 0.m1 +0.m2+ 1. m3 +1. m4 +1. m5 +1. m6
+1. m7

• Minterms present in f correspond with the 1’s of f in the


03/11/2023 truth table. Fall 2020 - ECE 211 Digital Electronics 30
Maxterm Notation
f = (A+B+C)(A+B+C’)(A+B’+C)
f (A,B,C) = M0M1M2 or
f (A,B,C) = П M (0,1,2)
• Maxterms present in f correspond with the 0’s of f in the truth table.

M and m Relationship

• If the minterm expansion for f (A,B,C) = m3 + m4 + m5 + m6 + m7, what


is the maxterm expansion for f(A,B,C)?

• Choose those not present in the minterms.


–So the Maxterm expansion for f(A,B,C) = M0M1M2.
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 31
Complement of minterm

• Complement of a minterm is the corresponding maxterm.


• Example

if f = f (A,B,C) = m3 + m4 + m5 + m6 + m7
• f’ = (m3 + m4 + m5 + m6 + m7)’ = m’3 m’4 m’5 m’6 m’7

= M3M4M5M6M7

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 32


Find the Minterm Expansion

• f(a,b,c,d) = a’(b’+d) + acd’.

= a’b’ +a’d + acd’


= a’b’(c+c’)(d+d’) + a’d(b+b’)(c+c’) + acd’(b+b’)
= a’b’c’d’ + a’b’c’d + a’b’cd’ +a’b’cd + a’bc’d + a’bcd + abcd’
+ab’cd’
= Σm(0,1,2,3,5,7,10,14)

What is the maxterm expansion for f?

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 33


Find the Maxterm Expansion

• f(a,b,c,d) = a’(b’+d) + acd’.

= (a’+cd’)(a +b’+d); Use (x+y)(x’+z)=xz +x’y.


= (a’+c)(a’+d’)(a+b’+d); Use (x+y)(x+z) = x+yz.
=(a’+bb’+c+dd’)(a’+bb’+cc’+d’)(a+b’+cc’+d)
=(a’+bb’+c+d)(a’+bb’+c+d’)(a’+bb’+c+d’)(a’+bb’+c’+d’)(a+b’+cc’+d)
=(a’+b+c+d)(a’+b’+c+d)(a’+b+c+d’)(a’+b’+c+d’)(a’+b+c’+d’)
(a’+b’+c’+d’)(a+b’+c+d)(a+b’+c’+d)
=ΠM(4,6,8,9,11,12,13,15)

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 34


Karnaugh Maps
Karnaugh Maps offer a graphical method of reducing a digital circuit to
its minimum number of gates.
The shape and size of the map is
dependent on the number of binary
inputs in the circuit to be analysed. The
map needs one cell for each possible
binary word applied to the inputs.
Therefore:
2 input circuits with inputs A and B require maps with 22 = 4 cells.
3 input circuits with inputs A B and C require maps with 23 = 8 cells.
4 input circuits with inputs A B C and D require maps with 2 4 = 16
cells.
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 35
Simplifying Karnaugh Maps
Circuit simplification in any Karnaugh map is
achieved by combining the cells containing 1 to
make groups of cells. In grouping the cells it is
necessary to follow six rules.

How these rules are applied is illustrated using a


four input 16-cell map shown in Fig.

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 36


Karnaugh Map Rules

1. Groups should contain as many ‘1’ cells (i.e. cells containing a logic 1) as
possible and no blank cells.
2. Groups can only contain 1, 2, 4, 8, 16 or 32... etc. cells (powers of 2).
3. A ‘1’ cell can only be grouped with adjacent ‘1’ cells that are immediately
above, below, left or right of that cell; no diagonal grouping.
4. Groups of ‘1’ cells can overlap. This helps make smaller groups as large as
possible, which is an advantage in finding the simplest solution.
5. The top/bottom and left/right edges of the map are considered to be
continuous, as shown in Fig. 2.4.3, so larger groups can be made by grouping
cells across the top and bottom or left and right edges of the map.
6. There should be as few groups as possible.
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 37
Binary Codes

In the coding, when numbers, letters or words are represented by a specific group of
symbols, it is said that the number, letter or word is being encoded. The group of
symbols is called as a code. The digital data is represented, stored and transmitted as
group of binary bits. This group is also called as binary code. The binary code is
represented by the number as well as alphanumeric letter.

Advantages of Binary Code


Following is the list of advantages that binary code offers.
•Binary codes are suitable for the computer applications.
•Binary codes are suitable for the digital communications.
•Binary codes make the analysis and designing of digital circuits if we use the binary
codes.
•Since only 0 & 1 are being used, implementation becomes easy.
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 38
Classification of binary codes

The codes are broadly categorized into following four


categories.
•Weighted Codes
•Non-Weighted Codes
•Binary Coded Decimal Code
•Alphanumeric Codes
•Error Detecting Codes
•Error Correcting Codes

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 39


Weighted Codes

Weighted binary codes are those binary codes which obey the positional
weight principle. Each position of the number represents a specific
weight. Several systems of the codes are used to express the decimal
digits 0 through 9. In these codes each decimal digit is represented by a
group of four bits.

Non-Weighted Codes

In this type of binary codes, the positional weights are not assigned. The
examples of non-weighted codes are Excess-3 code and Gray code.
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 40
Excess-3 code
The Excess-3 code is also called as XS-3 code. It is non-weighted code used to express
decimal numbers. The Excess-3 code words are derived from the 8421 BCD code words
adding (0011)2 or (3)10 to each code word in 8421. The excess-3 codes are obtained as
follows

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 41


Gray Code
It is the non-weighted code and it is not arithmetic codes. That means there are no
specific weights assigned to the bit position. It has a very special feature that, only one
bit will change each time the decimal number is incremented as shown in fig. As only
one bit changes at a time, the gray code is called as a unit distance code. The gray code
is a cyclic code. Gray code cannot be used for arithmetic operation.

Application of Gray code

•Gray code is popularly used in the shaft position


encoders.
•A shaft position encoder produces a code word
which represents the angular position of the shaft.

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 42


Binary Coded Decimal (BCD) code
In this code each decimal digit is represented by a 4-bit binary number. BCD is a way
to express each of the decimal digits with a binary code. In the BCD, with four bits we
can represent sixteen numbers (0000 to 1111). But in BCD code only first ten of these
are used (0000 to 1001). The remaining six code combinations i.e. 1010 to 1111 are
invalid in BCD.

Advantages of BCD Codes Disadvantages of BCD Codes


•It is very similar to decimal system. •The addition and subtraction of BCD have
•We need to remember binary different rules.
equivalent of decimal numbers 0 to 9 •The BCD arithmetic is little more complicated.
only. •BCD needs more number of bits than binary to
represent the decimal number. So BCD is less
03/11/2023 Fall 2020 - ECE efficient than binary.
211 Digital Electronics 43
Alphanumeric codes
A binary digit or bit can represent only two symbols as it has only two states '0' or '1'.
But this is not enough for communication between two computers because there we
need many more symbols for communication. These symbols are required to represent
26 alphabets with capital and small letters, numbers from 0 to 9, punctuation marks and
other symbols.
The alphanumeric codes are the codes that represent numbers and alphabetic characters.
Mostly such codes also represent other characters such as symbol and various
instructions necessary for conveying information. An alphanumeric code should at least
represent 10 digits and 26 letters of alphabet i.e. total 36 items. The following three
alphanumeric codes are very commonly used for the data representation.
•American Standard Code for Information Interchange (ASCII).
•Extended Binary Coded Decimal Interchange Code (EBCDIC).
•Five bit Baudot Code.
ASCII code is a 7-bit code whereas EBCDIC is an 8-bit code. ASCII code is more
commonly used worldwide while EBCDIC is used primarily in large IBM computers.
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 44
Codes Conversion
There are many methods or techniques which can be used to convert code from one
format to another. We'll demonstrate here the following

•Binary to BCD Conversion


•BCD to Binary Conversion
•BCD to Excess-3
•Excess-3 to BCD

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 45


Prime Implicants and Essential Prime Implicants
Implicant is a product/minterm term in Sum of Products (SOP) or sum/maxterm term in
Product of Sums (POS) of a Boolean function. E.g., consider a boolean function, F = AB
+ ABC + BC. Implicants are AB, ABC and BC.

Prime Implicants
A group of square or rectangle made up of bunch of adjacent
minterms which is allowed by definition of K-Map are called prime
implicants (PI) i.e. all possible groups formed in K-Map.
Example:

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 46


Essential Prime Implicants
These are those subcubes(groups) which cover atleast one minterm that can’t be
covered by any other prime implicant. Essential prime implicants(EPI) are
those prime implicants which always appear in final solution.
Example:

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 47


Redundant Prime Implicants
The prime implicants for which each of its
minterm is covered by some essential prime
implicant are redundant prime
implicants(RPI). This prime implicant never
appears in final solution.

Selective Prime Implicants


The prime implicants for which are neither
essential nor redundant prime implicants are
called selective prime implicants(SPI). These
are also known as non-essential prime
implicants. They may appear in some solution
or may not appear in some solution.
03/11/2023 Fall 2020 - ECE 211 Digital Electronics 48
Example: Given F = ∑(1, 5, 6, 7, 11, 12, 13, 15), find
number of implicant, PI, EPI, RPI and SPI.

03/11/2023 Fall 2020 - ECE 211 Digital Electronics 49


References

1. Digital Design 5th Edition by M Morris Mano, PEARSON INDIA.

You might also like