Ade (Unit 1)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 80

Analog

and
Digital Electronics

(Second Year BTech Computer)


(2019-20)

(Faculty: Mr. Y. K. Sharma)

Courtesy: R. P. Jain
(Modern Digital Electronics)
Topics To Be Covered

Unit-1: Number System & Logic Minimization Techniques.

Unit-2: Combinational Logic.

Unit-3: Sequential Logic.

Unit-4: Counters.

Unit-5: Logic Families.

Unit-6: Introduction to PLD’s & VHDL.


Number System
&
Logic Minimization Techniques

Unit-I

Courtesy: R. P. Jain
(Modern Digital Electronics)
Bits, Bytes, Nybbles
 The most important base you need to know for computer
organization is base 2. We also call this binary, since binary
means two valued.

 The second most important base is base 16 (or hexadecimal),


and the third is base 8 (octal). Beyond that, you don't need to
know the other bases.

 Let's start with some definitions first.

Bit : A single binary digit, that can have either value 0 or 1.


Byte : 8 bits.
Nybble: 4 bits.
Word : 32 bits
Halfword: 16 bits
Doubleword: 64 bits
Analog & Digital Signals
 Analog: A way of representing some physical quantity in such a way
that physical quantity varies continuously. An analog voltage or
current have any value within a defined range.

 Digital: A way of representing a physical quantity by a specific


discrete values.

Difference between Analog & Digital Signals:


Analog Digital

1. Continuously variable 1. Discrete Steps

2. Amplification 2. Switching

3. Voltages 3. Numbers
Number System

 In any number system there is an ordered set of


symbols known as digits with rules defined for
performing arithmetic operations like addition,
multiplication etc.

 A collection of these digits makes a number which in


general has two parts- integer and fractional, set apart
by a radix point(.).
Binary Number System
The binary number system contains only
 two symbols: 1 and 0
 In place of electrical current we can use these
symbols to abstractly represent some internal state
of the computer achieved through combinations of
ON/OFF values
 We can represent
• data
• somewhere to store the data
• instructions by combining individual bits
Binary Number System

• The binary number system is a positional number system


• We use the decimal number system which is also positional
• eg in the number 333 the digits are the same but are
interpreted based on their position
(3x100) + (3x10) + (3x1)
or
(3x102) + (3x101) + (3x100) based on

100000 10000 1000 100 10 1

105 104 103 102 101 100


Binary Number System
 Whereas the decimal system has ten digits 0,1,2,3,4,5,6,7,8,9 binary
only has two 0 and 1
 With positional values
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1

• so the binary number 10101 can be converted to a decimal value

• (1x24) + (0x23) + (1x22) + (0x21) + (1x20)


• = 16 + 0 + 4 + 0 + 1
• = 21
Signed Binary Numbers
Sign-Magnitude Representation:
• In decimal number system a plus(+) sign is used to denote a positive
number & a minus(-) sign for denoting a negative number.
• This representation of numbers is known as signed number.
• Digital circuits understand only two symbols, 0 or 1; so we must use
the same symbols to indicate the sign of the number.
• An additional bit is used as the sign bit & is placed as the MSB (Most
Significant Bit).
• A 0 is used to represent a positive number & a 1 is used to represent
a negative number.
• E.g. An 8-bit signed number (01000100) represents a positive number
& its value (magnitude) is (1000100) = (68). The MSB indicates that the
number is positive.
• E.g. In signed binary form, 11000100 represents a negative number
with magnitude (1000100) = (68). The 1 in the left most position (MSB)
indicates that the number is negative & the other seven bits give its
magnitude. This representation is known as sign-magnitude
representation.
1’s Complement Representation
• In a binary number, if each 1 is replace by 0 & each 0 by 1, the
resulting number is known as the 1’s complement of the first number.
• Thus both the numbers are complement of each other.
• If one of these numbers is positive, then the other number will be
negative with the same magnitude.
• E.g. (0101) binary no. represents (+5) decimal no. whereas (1010)
binary no. represents (-5) decimal no.
• It is widely used for representing signed numbers, where MSB is 0 for
positive numbers & 1 is for negative numbers.
• E.g. (+7) & (-7) in 1’s complement is (0111) & (1000).

Note: The 1’s complement of a binary number is the number that results
when we change all 1’s to 0’s & the 0’s to 1’s.
1’s Complement Representation
Steps:
1. Find 1’s complements of Subtrahend.
2. Add two nos. using binary addition.
3. Check carry if carry is generated, add the carry in LSB position.
4. If MSB is 1 then the result is negative & it is in 1’s Complement form.
5. If MSB is 0 then the result is positive & is true form.

E.g.
1. 8 – 9 = -1
step 1: 8= 1000
9= 1001 1’s complement of 9 is = 0110
step2: 1000 8
+ 0110  1’s complement of 9
------------------------
1110
step3: The MSB is 1, so the result is negative & in 1’s complement
form. So result is = -(0001) = -1
2. 9 – 8 = 1 Ans. (0001) = 1.
Advantages of 1’s Complement
1. The 1’s complement subtraction can be accomplished with an
binary adder, therefore this method is useful in arithmetic logic
circuits.
2. The 1’s complement of a number is easily obtained by inverting
each bit in the number.
Binary Arithmetic
Binary Addition: Rules for binary addition are as follows:
Augend Addend Sum Carry Result
0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 0 1 10

Binary Subtraction: Rules of Binary Subtraction are as follows:


Minuend Subtrahend Difference Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Binary Arithmetic
Binary Addition:
Add the binary numbers:
• 1011 & 1100 Ans. 1 0111
• 0101 & 1111 Ans. 1 0100
• 01101010, 00001000, 10000001,11111111 Ans. 111110010
2’s Complement Representation
 Digital Circuits are used for binary arithmetic operations.

 It is possible to use the circuits designed for binary addition to


perform the binary subtraction, if we can change the problem of
subtraction to that of an addition.

Subtraction Using 2’s Complement:


 Binary Subtraction can be performed by adding 2’s complement of
the subtrahend to the minuend.

 If a final carry is generated, discard the carry and the answer is


given by the remaining bits which is +ve (the minuend is greater
than the subtrahend).

 If final carry is 0, the answer is –ve (the minuend is smaller than the
subtrahend) and is in 2’s complement form.
2’s Complement Representation
 If 1 is added to 1’s complement of a binary number, the resulting
number is known as the two’s complement of the binary number.
E.g. 2’s complement of 0101 is 1011.
 In this representation also if MSB is 0 the number is positive,
whereas if the MSB is 1 the number is negative.

Steps:
1. Find 2’s complement of a subtrahend.
2. Add two nos. using binary addition.
3. Check carry, if carry is generated, discard the carry. If MSB is 1
then the answer is negative & it is in 2’s complement form. If MSB
is 0, then the result is positive & in true form.
4. E.g. 8-9 = -1
step 1 : 8 = 1000 (1’s Comp.) (Add 1)
9 = 1001 2’s complement = 0110 = 0111
step 2: 1000 + 0111 = 1111 (No carry generated)
Thus MSB is 1, so result is negative & it is in 2’s complement form. So
we have –(0001) 2’s complement of result.

(H. W. -> Solve Eg.1) 9- 8 =1, 2) 7- 5 = +2 3) 5 – 7 = - 2


2’s Complement Representation
Steps for direct conversion:
1. If LSB of number is 1, its 2’s complement is obtained by changing
each 0 to 1 and 1 to 0 except the Least-Significant Bit.
2. If LSB of number is 0, its 2’s complement is obtained by scanning the
number from the LSB to MSB bit by bit & retaining the bits as they
are up to and including the occurrence of the first 1 & complement all
other bits.
E.g.
1 . Number 01100100
2’s Complement 10011100

2. Number 01100111
2’s complement 10011001
2’s Complement Representation
Addition/Subtraction in 2’s Complement Representation:
 It can conveniently be performed using 2’s complement
representations for both the operands.
 It is most commonly used method when these operations are
performed using digital circuits and microprocessors.
E.g. Perform following operations using 2’s complement method:
1) 48 – 23 2) 23- 48 3) 48 – (-23) 4) -48 – 23
Using 8-bit representation of numbers.
Sol:
1) 2’s complement representation of +48 = 00110000
2) 2’s complement representation of -23 = 11101001
48 + (-23) 48 00110000
+(-23) (+) 1 1 1 0 1 0 0 1
-----------------------------------------------------------------------------------------
+25 1 00011001 = + 25
(Discard Carry)
Ans. 2) -25 3) +71 4) -71 (See Pg. 34 R. P. Jain)
2’s Complement Representation
1. If two operands are of the opposite sign, the result is to be
obtained by the rule of subtraction using 2’s complement.

2. If the two operands are of the same sign, the sign bit of the result
(msb) is to be compared with the sign bit of the operands.

3. In case sign bits are same, the result is correct and is in 2’s
complements form.

4. If the sign bits are not same there is a problem of overflow, i.e.
the result can not be accommodated using eight bits and the
result is to be interpreted suitably.

5. The result in this case will consist of nine bits i.e. carry and eight
bits, and the carry bit will give the sign of the number.
Number System and Base Conversions
• Electronic and Digital systems may use a variety of different number
systems, (e.g. Decimal, Hexadecimal, Octal, Binary).
• A number N in base or radix b can be written as:
(N)b = dn-1 dn-2 — — — — d1 d0 . d-1 d-2 — — — — d-m
• In the above, dn-1 to d0 is integer part, then follows a radix point, and
then d-1 to d-m is fractional part.
• dn-1 = Most significant bit (MSB)
• d-m = Least significant bit (LSB)
Binary to Decimal
(1010.01)2

1×23 + 0x22 + 1×21+ 0x20 + 0x2 -1 + 1×2 -2


= 8 + 0 + 2 + 0 + 0 + 0.25
= 10.25

(1010.01)2 = (10.25)10
Conversions

Binary To Decimal:
Binary Number Decimal Number
1. (11011) 2 : (27) 10
2. (0.1101) 2 : (0.8125) 10

H.W. : (Binary To Decimal)

1. (1101.1101) 2 (13.8125) 10
2. (1101.11) 2
3. (10101.101) 2
Decimal to Binary
(10.25)10

Note: Keep multiplying the fractional part with 2 until decimal part 0.00 is obtained.
(0.25)10 = (0.01)2
Answer: (10.25)10 = (1010.01)2
Conversions
Decimal to Binary:
1. (46)10 = (101110) 2

2. (115) 10 = ( )2

3. (0.2) 10 = ( 0011 ) 2

4. (25.75)10 = ( )2

Result:
1. (101110) 2
2. (1110011) 2
3. (0011) 2
4. (11001.110) 2

H.W. : 1. (268) 10 2. (39.50) 10 3. (1120.10) 10 4. (545646) 10


Binary to Octal
To convert a binary number to octal number, these steps are followed :

 Starting from the least significant bit, make groups of three bits.
 If there are one or two bits less in making the groups, 0s can be added after
the most significant bit
 Convert each group into its equivalent octal number
 Let’s take an example to understand this.

0101100101012 = 26258
Octal to Binary
To convert an octal number to binary, each octal digit is converted to its 3-bit
binary equivalent according to this table.

Octal
0 1 2 3 4 5 6 7
Digit

Binary
Equiva 000 001 010 011 100 101 110 111
lent

546738 = 1011001101110112
Conversions
Octal To Binary: (Make combination of 3 bits for conversion since 0 to 7)
Octal Binary
1. (155.52)8 = (001101101.101010) 2
2. (16.70)8 = (001110.111000) 2

H.W. : (Octal To Binary)


1. (762) 8
2. (0.231) 8
3. (762.301) 8

Binary To Octal:
Binary Octal
1. (100011110.010111101) 2 (436.275) 8
2. (1001.00110) 2 (11.14) 8
Octal to Decimal

(12.2)8

1 x 81 + 2 x 80 +2 x 8-1 = 8+2+0.25 = 10.25

(12.2)8 = (10.25)10
Decimal to Octal
(10.25)10

(10)10 = (12)8

Fractional part:
0.25 x 8 = 2.00

Note: Keep multiplying the fractional part with 8 until decimal part .00 is
obtained.
(.25)10 = (.2)8
Answer: (10.25)10 = (12.2)8
Conversions
Octal To Decimal:
Octal Number Decimal
1. (427.35) 8 (279.4531) 10
2. (6327.4051) 8 (3287.5100098) 10

Decimal To Octal:
Decimal Number Octal Number
1. (266) 10 (412) 8
2. (0.256) 10 (0.20304) 8
3. (247) 10 (367) 8
4. (0.6875) 10 (0.54) 8
5. (3287.5100098) 10 (6327.4051) 8
Conversions
• Hexadecimal Number System:
Hexadecimal Decimal Binary
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111
Decimal to Hexadecimal
Here is an example of using repeated division to convert 1792 decimal to
hexadecimal:
Decimal Hexadecimal
Operation Quotient Remainder
Number Result
1792 ÷ 16 = 112 0 0
112 ÷ 16 = 7 0 00
7 ÷ 16 = 0 7 700
0 done.
The only addition to the algorithm when converting from decimal to hexadecimal is
that a table must be used to obtain the hexadecimal digit if the remainder is greater
than decimal 9.
Decimal: 0 1 2 3 4 5 6 7
Hexadecimal: 0 1 2 3 4 5 6 7

Decimal: 8 9 10 11 12 13 14 15
Hexadecimal: 8 9 A B C D E F
Conversions
Hexadecimal To Octal:
Hexadecimal Number Octal Number
1. (4ECE.43F) (047316.2077)
2. (A72E) (123456)
3. (0.BF85) (0.577024)

Decimal To Hexadecimal:
Decimal Number Hexadecimal Number
1. (214) (D6)
2. (0.35) (0.599)
3. (95.5) (5F.8)
4. (675.625) (2A3.A)

Hexadecimal To Decimal:
1. (6ABC.2A) (27324.164)
2. (3A.2F) (58.1836)
Hexadecimal to Binary
To convert from Hexadecimal to Binary, write the 4-bit binary equivalent of hexadecimal.

(3A)16 = (00111010)2
To convert from Binary to Hexadecimal, group the bits in groups of 4 and write the hex
for the 4-bit binary. Add 0's to adjust the groups.
1111011011
(001111011011 )2 = (3DB)16
Conversions
Binary To Hexadecimal:
Binary Number Hexadecimal Number

1. (110111.10101111) 2 (37.AF) 16

2. (10100110101111) 2 (29AF) 16

3. (0.00011110101101) 2 (0.1EB4) 16

Hexadecimal To Binary:
Hexadecimal Number Binary Number

1. (23) 16 (00100011) 2

2. (F23.45B) 16 (111100100011.010001011011) 2
3. (2F9A) (0010111110011010) 2
Logic Minimization:
For two binary variables (taking values 0 and 1) there are 16 possible functions.
The functions involve only three operations which make up Boolean algebra:
AND, OR, and COMPLEMENT. They are symbolically represented as follows:

These operations are like ordinary algebraic operations in that they are
commutative, associative, and distributive. There is a group of useful theorems
of Boolean algebra which help in developing the logic for a given operation.
Boolean Algebra Theorems:
The applications of digital logic involve functions of the AND, OR, and NOT
operations. These operations are subject to the following identities:
Binary Functions of Two Variables
Digital logic involves combinations of the three types of operations for two variables:
AND, OR, and NOT. There are sixteen possible functions:
Single Variable Theorems
Two-Variable Theorems
Besides the important De-Morgan's Theorem, the theorems below
have utility in digital circuits. They have no direct counterparts in
ordinary algebra.
Representation of Truth-Table
 Truth table gives the values of the output variables for all the possible
combinations of the input variables.
 Consider a Boolean function F = A . B of the logic AND operation. In this
function A & B are the two input independent variables and will have 2N (22 =
4) possible input combinations, where N is the number of input variables.
Each input combination gives rise an output.
 All possible values of input and output variables listed in the form of a table
is known as truth table.
 The truth table of this AND operation is shown in table:
Representation of Truth-Table
Draw the truth table of a Boolean function given: F = A B + C

Solution: The given expression has the three independent variables, so it will have 8
different horizontal rows (as 23 = 8). Putting all possible values of the independent
variables in the binary progression and evaluated values of the dependent variable F
from the given expression F = A B + C , the required truth table is obtained which is
shown in table below.
Canonical Forms for Boolean Function
 Two basic forms of Boolean function corresponding to a given truth table are
Canonical SP form (Sum of Products) and Canonical PS form (Product of
Sums).
Canonical SP (or SOP) Form:
 In this form boolean function of the truth table are obtained by summing
(ORing) the product (ANDed) terms corresponding to the 1’s entry in the
output column of the truth table.
 The product terms also known as minterms are formed by ANDing the
complemented and uncomplemented variables in such a way that the
complement of variable is taken for the 0’s entry to the input variable and the
variable itself is taken for 1’s entry in the input variable.
 The minterms (ANDed terms or products) for the two variables A and B are
shown in table:
Canonical Forms for Boolean Function
Canonical PS (or POS) Form:
 In this form boolean function of the truth table are obtained by taking the
product (ANDing) of the sum (ORed) terms corresponding to the 0’s entry in
the output column of the truth table.
 The ORed terms are called as maxterms.
 Maxterms are formed by ORing the complemented and uncomplemented
variables present in a row of the truth table in such a way that the
complement of variable is taken for the 1’s entry to the input variable and the
variable itself is taken for 0’s entry in the input variable.
 The maxterms for three variables are shown in table:
Simplification of Logical functions
 Boolean algebra is used to simplify Boolean expressions which
represent combinational logic circuits.
 It reduces the original expression to an equivalent expression that has
fewer terms which means that less logic gates are needed to implement
the combinational logic circuit.
 Simplification Rules:
Simplification of Logical functions
Simplification of Logical functions
Simplification of Logical functions
Methods to Simplify Boolean Functions

1. Algebraic Method.
2. Karnaugh-Map Technique
3. Quine-McCluskey Method

Karnaugh-Map Technique:
 It is the simplest and most commonly used method.
 It is a manual method and depends to a great extent upon human
intuition.
 It can be used conveniently up to six variables beyond which it is
very cumbersome.

Quine-McCluskey Method:
 It is suitable for computer mechanization and is basically used by
logic designers manually.
Karnaugh Map Representation of Logical
Functions
Standard Representations for Logical Functions:
Artibtrary logic function can be expressed in following terms:
1.Sum of Products form (SOP) and
2.Product of Sums form (POS)
This does not mean that logic functions cannot be written in any other
form. But these two forms are standard methods for designing the
circuits.
e.g.
Sum of Product can be represented as:
Y= m(0,3,6,7,10,12,15)
Y= M(1,2,4,5,8,9,11,13,14)
Karnaugh Map Representation of Logical
Functions
• Some times it is difficult to be sure that a logical expression can be
simplified using algebraic method of simplification using boolean
algebraic theorms directly.
• There is a graphical Technique known as karnaugh map technique
which provides a systematic method for simplifying and manipulating
boolean expressions.
• In this technique, the information contained in a truth table or
available in POS or SOP or form is represented on Karnaugh map
(K-map).
• It can be used for any number of variables, but it is used upto six
variables, beyound which it becomes very cumbersome.
• There are K-maps for two, three and four variables. Thus in an n
variable K-map there are 2n cells. Each cell corresponds to one of the
combinations of n variables, since there are 2n combinations of n
variables.
Karnaugh Map Representation of Logical
Functions
• Truth Table of a 3-variable function:
Inputs Output
Row no. A B C Y
0 0 0 0 0
1 0 0 1 1
2 0 1 0 1
3 0 1 1 0
4 1 0 0 1
5 1 0 1 0
6 1 1 0 0
7 1 1 1 1

Note: The output Y is logical 1 for row 1,2,4,7 thus the equation on SOP
form is:
Y= ABC +ABC+ABC+ABC
Karnaugh Map Representation of Logical
Functions
• In above truth table logical 0 corresponds to the rows 0,3,5 & 6 and
the output Y can be represented in terms of standard POS form as
given below:
• Y= (A+B+C) (A+B+C) (A+B+C)(A+B+C)
Karnaugh-Map Technique
The K-map technique is not suitable for handling the design of
complex digital systems because of the following disadvantages:

1. Minimization of logic functions involving more than six variables


is unwieldly.
2. Recognition of prime- implicants that may form part of the
simplified function relies on the ability of the human user making
it difficult to be sure whether the best selection has been made.
Quine-McCluskey Method
The Quine-McCluskey minimization technique satisfies the following
characteristics:
1. It has the capability of handling large number of variables.
2. It does not depend on the ability of a human user for recognising
prime-implicants.
3. It ensures minimized expression.
4. It is suitable for computer solution.

Thus Quine-McCluskey method consists of two parts:


1. To find by an exhaustive search all the prime-implicants that may
form part of the simplified function.
2. To identify essential prime-implicants obtained from part 1 and
choose among the remaining prime- implicants those that give an
expression with the least number of literals. This method is also
known as tabular method.
Quine-McCluskey Method
E.g. Y(A,B,C,D) = m(0,1,3,7,8,9,11,15)

Step 1. Check weither the logic function to be minimized is in the


minterm form, if not then convert it in minterm form.

Step 2. Arrange all minterms of the function in binary representation form


in a table according to the number of ones contained and form
the groups containing no ones, 1 ones, 2 ones, 3 ones and so on.
The groups are separated by horizontal lines.

Step 3. Apply boolean algebraic theorem A + A = 1 to pairs of minterms in


which only one variable is different and all the other variables are
same. This relationship is applicable only to the minterms
belonging to adjacent groups of minterms. Compare each
minterm in group n with each minterm in group (n+1) and identify
the matched pairs. Put a check mark on each matched pair.
Quine-McCluskey Method

Step 4. Compare the adjacent groups to see if groups of four can be


made by matching. For this match the dashes must be in the
same bit position in the groups of two and only one variable must
differ.

Step 5. Repeat the process of grouping of eight minterms.

Step 6. All nonchecked minterm groups in tables are the prime implicants
of the function.

Step 7. Next a prime-implicant table is prepared listing each of the


minterms contained in the original function, PI terms, and the
decimal numbers of minterms that make up the PI. A cross is
marked in the table in each row under the minterms contained in
that PI. Now find the minterms that contain only one cross in its
column. These cross are encircled and the corresponding terms
are checked.
Quine-McCluskey Method
E.g. Y(A,B,C,D) = m(0,1,3,7,8,9,11,15)
Table 1. Grouping minterms according to the number of 1’s.
Group Minterm Variables Steps Checked
ABCD
0 0 0 0 00 Checked

1 1 0 0 01 Checked
8 1 0 00 Checked

2 3 0 0 11 Checked
9 1 0 01 Checked

3 7 0 1 11 Checked
11 1 0 11 Checked

4 15 1 1 11 Checked
Quine-McCluskey Method
E.g. Y(A,B,C,D) = m(0,1,3,7,8,9,11,15)
Table 2. Combination of minterms groups of two.
Group Minterm Variables Steps Checked
ABCD
0 0,1 0 0 0- Checked
0,8 - 0 00 Checked

1 1,3 0 0 - 1 Checked
1,9 - 0 01 Checked
8,9 1 0 0 - Checked

2 3,7 0 - 11 Checked
3,11 - 0 11 Checked
9,11 1 0 - 1 Checked

3 7,15 - 1 11 Checked
11,15 1 - 11 Checked
Quine-McCluskey Method
E.g. Y(A,B,C,D) = m(0,1,3,7,8,9,11,15)
Table 3. Combination of minterms groups of four.
Group Minterm Variables Steps Checked
ABCD
0 0,1,8,9 - 0 0- Checked
0,8,1,9 - 0 0- Checked

1 1,3,9,11 - 0 - 1 Checked
1,9,3,11 - 0 - 1 Checked

2 3,7,11,15 - - 11 Checked
3,11,7,15 - - 11 Checked
Quine-McCluskey Method
E.g. Y(A,B,C,D) = m(0,1,3,7,8,9,11,15)
Table 4. Prime Implicant Table (Essential PI)
PI Terms Decimal Nos. Minterms

0 1 3 7 8 9 11 15
BC 0,1,8,9 X X X X
BD 1,3,9,11 X X X X
CD 3,7,11,15 X X X X

E.g.
Minimize the four-variable logic function using k-map:
f(A,B,C,D) = m(0,1,2,3,5,7,8,9,11,14)

(Simplify the logic function using the Quine-McCluskey method.)


Q.1) a) Quine McCluskey method.f(A, B, C, D) = ∑m(0,1,2,3,5,7,8,10,12,13,15) [6 marks]

Solution: ∑m (0000,0001,0010,0011,0101,0111,1000,1010,1100,1101,1111) in binary form.


Quine-McCluskey Method
Quine-McCluskey Method
E.g.
f(A,B,C,D) = m(1,3,7,11,15) + d(0,2,5)
Preview
Natural BCD Code: Decimal digits 0 through 9 are represented by
their natural binary equivalents using 4 bits.

Excess 3 code: Another BCD code in 4 bit binary code. The decimal
digit is obtained by adding 3 to the natural BCD code.

Gray code: It is a code in which each gray code number differs from
the preceding & succeeding number by a single bit.

Construction of Gray Code:


1. A 1 bit gray code has two code words 0 and 1 representing
decimal numbers 0 & 1 respectively.
2. An n-bit (n>=2) gray code will have first 2n-1 gray codes of (n-1)
bits written in order with a leading 0 appended.
3. The last 2n-1 gray codes will be equal to the gray code words of an
(n-1) bit gray code written in reverse order with a leading 1
appended.
Continue….
E.g. :
1. 1 bit gray code
Decimal number Gray Code
0 0
1 1
2. 2 bit gray code
Decimal number Gray Code
0 0 0
1 0 1
2 1 1
3 1 0
3. 3 bit Gray Code
Decimal number Gray Code
0 0 0 0
1 0 0 1
2 0 1 1
3 0 1 0
4 1 1 0
5 1 1 1
6 1 0 1
7 1 0 0
End
of
Unit-1

You might also like