際際滷

際際滷Share a Scribd company logo
SWITCHING THEORY AND LOGIC
DESIGN
GNIT ECE 1
 UNIT  I Number System and Boolean
algebra And Switching Functions: Review of
number systems, Complements of Numbers,
Codes- Binary Codes, Binary Coded Decimal
Code and its Properties, Unit Distance Codes,
Error Detecting and Correcting Codes.
Boolean Algebra: Basic Theorems and
Properties, Switching Functions, Canonical
and Standard Form, Algebraic Simplification
of Digital Logic Gates, Properties of XOR
Gates, Universal Gates, Multilevel NAND/NOR
realizations.
GNIT ECE 2
 1.1 Review of number systems
 1.2 Complements of Numbers
 1.3 Codes- Binary Codes
 1.4 Binary Coded Decimal Code and its Properties
 1.5 Unit Distance Codes
 1.6 Error Detecting and Correcting Codes
 1.7 Boolean Algebra: Basic Theorems and Properties
 1.8 Switching Functions
 1.9 Canonical and Standard Form
 1.10 Algebraic Simplification of Digital Logic Gates
 1.11 Properties of XOR Gates
 1.12 Universal Gates
 1.13 Multilevel NAND/NOR realizations
GNIT ECE 3
 Base (also called radix) = 10
 10 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
 Digit Position
 Integer & fraction
 Digit Weight
 Weight = (Base) Position
 Magnitude
 Sum of Digit x Weight
 Formal Notation
d2*B
2
+d1*B
1
+d0*B
0
+d-1*B
-1
+d-2*B
-2
GNIT ECE 4
 Base = 2
 2 digits { 0, 1 }, called binary digits or bits
 Weights
 Weight = (Base)
Position
 Magnitude
 Sum of Bit x Weight
 Formal Notation
 Groups of bits 4 bits = Nibble
8 bits = Byte
1 0 -1
2 -2
2 1 1/2
4 1/4
1 0 1 0 1
1 *22
+0 *21
+1 *20
+0 *2-1
+1 *2-
2
=(5.25)10
(101.01)2
1 0 1 1
1 1 0 0 0 1 0 1
GNIT ECE 5
Decimal
(Base 10)
Octal
(Base 8)
Binary
(Base 2)
Hexadecimal
(Base 16)
Evaluate
Magnitude
Evaluate
Magnitude
Evaluate
Magnitude
GNIT ECE 6
 Divide the number by the Base (=2)
 Take the remainder (either 0 or 1) as a coefficient
 Take the quotient and repeat the division
Example: (13)10
Quotient Remainder Coefficient
Answer: (13)10 = (a3 a2 a1 a0)2 = (1101)2
MSB LSB
13/ 2 = 6 1 a0 = 1
6 / 2 = 3 0 a1 = 0
3 / 2 = 1 1 a2 = 1
1 / 2 = 0 1 a3 = 1
GNIT ECE 7
 Multiply the number by the Base (=2)
 Take the integer (either 0 or 1) as a coefficient
 Take the resultant fraction and repeat the division
Example: (0.625)10
Integer Fraction Coefficient
Answer: (0.625)10 = (0.a-1 a-2 a-3)2 = (0.101)2
MSB LSB
0.625 * 2 = 1 . 25
0.25 * 2 = 0 . 5 a-2 = 0
0.5 * 2 = 1 . 0 a-3 = 1
a-1 = 1
GNIT ECE 8
Example: (175)10
Quotient Remainder Coefficient
Answer: (175)10 = (a2 a1 a0)8 = (257)8
175 / 8 = 21 7 a0 = 7
21 / 8 = 2 5 a1 = 5
2 / 8 = 0 2 a2 = 2
Example: (0.3125)10
Integer Fraction Coefficient
Answer: (0.3125)10 = (0.a-1 a-2 a-3)8 = (0.24)8
0.3125 * 8 = 2 . 5
0.5 * 8 = 4 . 0 a-2 = 4
a-1 = 2
GNIT ECE 9
 8 = 23
 Each group of 3 bits represents
an octal digit
Octal Binary
0 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1
Example:
( 1 0 1 1 0 . 0 1 )2
( 2 6 . 2 )8
Assume Zeros
Works both ways (Binary to Octal & Octal to Binary)
GNIT ECE 10
 16 = 24
 Each group of 4 bits represents a
hexadecimal digit
Hex Binary
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
A 1 0 1 0
B 1 0 1 1
C 1 1 0 0
D 1 1 0 1
E 1 1 1 0
F 1 1 1 1
Example:
( 1 0 1 1 0 . 0 1 )2
( 1 6 . 4 )16
Assume Zeros
Works both ways (Binary to Hex & Hex to Binary)
GNIT ECE 11
 Convert to Binary as an intermediate step
Example:
( 0 1 0 1 1 0 . 0 1 0 )2
( 1 6 . 4 )16
Assume Zeros
Works both ways (Octal to Hex & Hex to Octal)
( 2 6 . 2
)8
Assume Zeros
GNIT ECE 12
 Base = 8
 8 digits { 0, 1, 2, 3, 4, 5, 6, 7 }
 Weights
 Weight = (Base)
Position
 Magnitude
 Sum of Digit x Weight
 Formal Notation
1 0 -1
2 -2
8 1 1/8
64 1/64
5 1 2 7 4
5 *82
+1 *81
+2 *80
+7 *8-1
+4 *8-2
=(330.9375)10
(512.74)8
GNIT ECE 13
 Base = 16
 16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }
 Weights
 Weight = (Base) Position
 Magnitude
 Sum of Digit x Weight
 Formal Notation
1 0 -1
2 -2
16 1 1/16
256 1/256
1 E 5 7 A
1 *162
+14 *161
+5 *160
+7 *16-1
+10 *16-2
=(485.4765625)10
(1E5.7A)16
GNIT ECE 14
n 2n
0 20=1
1 21=2
2 22=4
3 23=8
4 24=16
5 25=32
6 26=64
7 27=128
n 2n
8 28=256
9 29=512
10 210=1024
11 211=2048
12 212=4096
20 220=1M
30 230=1G
40 240=1T
Mega
Giga
Tera
Kilo
GNIT ECE 15
 Decimal Addition
5 5
5
5
+
0
1
1
= Ten  Base
 Subtract a Base
1
1 Carry
GNIT ECE 16
 Column Addition
1 0 1
1
1
1
1
1
1
1 0
+
0
0
0
0 1 1
1
 (2)10
1
1
1
1
1
1
= 61
= 23
= 84
GNIT ECE 17
 Borrow a Base when needed
0 0 1
1
1
0
1
1
1
1 0

0
1
0
1 1 1
0
= (10)2
2
2
2 2
1
0
0
0
1
= 77
= 23
= 54
GNIT ECE 18
 Bit by bit
0
1 1 1 1
0
1 1 0
0
0 0 0 0
0
1 1 1 1
0
1 1 1 1
0 0 0
0
0
0
1
1
0
1
1
1 0
x
GNIT ECE 19
Decimal Binary Octal Hex
00 0000 00 0
01 0001 01 1
02 0010 02 2
03 0011 03 3
04 0100 04 4
05 0101 05 5
06 0110 06 6
07 0111 07 7
08 1000 10 8
09 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
GNIT ECE 20
 There are two types of complements for each base-r system: the radix
complement and diminished radix complement.
 Diminished Radix Complement - (r-1)s Complement
 Given a number N in base r having n digits, the (r1)s
complement of N is defined as:
(rn 1)  N
 Example for 6-digit decimal numbers:
 9s complement is (rn  1)N = (1061)N = 999999N
 9s complement of 546700 is 999999546700 = 453299
 Example for 7-digit binary numbers:
 1s complement is (rn  1)  N = (271)N = 1111111N
 1s complement of 1011000 is 11111111011000 = 0100111
 Observation:
 Subtraction from (rn  1) will never require a borrow
 Diminished radix complement can be computed digit-by-digit
 For binary: 1  0 = 1 and 1  1 = 0
GNIT ECE 21
 1s Complement (Diminished Radix Complement)
 All 0s become 1s
 All 1s become 0s
Example (10110000)2
 (01001111)2
If you add a number and its 1s complement 
1 0 1 1 0 0 0 0
+ 0 1 0 0 1 1 1 1
1 1 1 1 1 1 1 1
GNIT ECE 22
 Radix Complement
 Example: Base-10
 Example: Base-2
The r's complement of an n-digit number N in base r is defined as
rn  N for N  0 and as 0 for N = 0. Comparing with the (r  1) 's
complement, we note that the r's complement is obtained by adding 1 to
the (r  1) 's complement, since rn  N = [(rn  1)  N] + 1.
The 10's complement of 012398 is 987602
The 10's complement of 246700 is 753300
The 2's complement of 1101100 is 0010100
The 2's complement of 0110111 is 1001001
GNIT ECE 23
 2s Complement (Radix Complement)
 Take 1s complement then add 1
 Toggle all bits to the left of the first 1 from the right
Example:
Number:
1s Comp.:
0 1 0 1 0 0 0 0
1 0 1 1 0 0 0 0
0 1 0 0 1 1 1 1
+ 1
OR
1 0 1 1 0 0 0 0
0
0
0
0
1
0
1
0
GNIT ECE 24
 Subtraction with Complements
 The subtraction of two n-digit unsigned numbers
M  N in base r can be done as follows:
GNIT ECE 25
 Example 1.5
 Using 10's complement, subtract 72532  3250.
 Example 1.6
 Using 10's complement, subtract 3250  72532.
There is no end carry.
Therefore, the answer is  (10's complement of 30718) =  69282.
GNIT ECE 26
 Example 1.7
 Given the two binary numbers X = 1010100 and Y
= 1000011, perform the subtraction (a) X  Y ;
and (b) Y  X, by using 2's complement.
There is no end carry.
Therefore, the answer is
Y  X =  (2's complement
of 1101111) =  0010001.
GNIT ECE 27
 Subtraction of unsigned numbers can also be done by means of the (r 
1)'s complement. Remember that the (r  1) 's complement is one less
then the r's complement.
 Example 1.8
 Repeat Example 1.7, but this time using 1's complement.
There is no end carry,
Therefore, the answer is Y 
X =  (1's complement of
1101110) =  0010001.
GNIT ECE 28
 Example:
 Consider decimal 185 and its corresponding value
in BCD and binary:
 BCD addition
GNIT ECE 29
 Example:
 Consider the addition of 184 + 576 = 760 in BCD:
 Decimal Arithmetic: (+375) + (-240) = +135
Hint 6: using 10s of BCD
GNIT ECE 30
 Other Decimal Codes
GNIT ECE 31
 Gray Code
 The advantage is that only
bit in the code group changes
in going from one number to
the next.
 Error detection.
 Representation of analog data.
 Low power design.
000 001
010
100
110 111
101
011
1-1 and onto!! GNIT ECE 32
 American Standard Code for Information Interchange (ASCII)
Character Code
GNIT ECE 33
 ASCII Character Code
GNIT ECE 34
 Error-Detecting Code
 To detect errors in data communication and
processing, an eighth bit is sometimes added to
the ASCII character to indicate its parity.
 A parity bit is an extra bit included with a
message to make the total number of 1's either
even or odd.
 Example:
 Consider the following two characters and their
even and odd parity:
GNIT ECE 35
 BCD Code
 A number with k decimal digits
will require 4k bits in BCD.
 Decimal 396 is represented in
BCD with 12bits as 0011 1001
0110, with each group of 4 bits
representing one decimal digit.
 A decimal number in BCD is
the same as its equivalent
binary number only when the
number is between 0 and 9.
 The binary combinations 1010
through 1111 are not used and
have no meaning in BCD.
GNIT ECE 36
Binary code Gray code
1.5 Unit Distance Codes
The most common example of a unit distance code (Successive values differ by only one bit). See Table 2-10 page
52.
GNIT ECE 37
Decimal Binary Gray
0 000 000
1 001 001
2 010 011
3 011 010
4 100 110
5 101 111
6 110 101
7 111 100
GNIT ECE 38
 The binary value B = bnb2 b1 b0 can be
converted to Gray code G = gng2 g1 g0.
 With gi = bi+1  bi or G = B  B/2
Examples:
If B =110 then G = 110  011 = 101
If B = 10110111then
G = 10110111
 1011011
= 11101100
GNIT ECE 39
From gi = bi  bi+1 it follows that bi = gi  bi+1
 Example: Let G = 01011111. Then using b8 =
0.
 b7 = g7  b8 = 0  0 = 0
 b6 = g6  b7 = 1  0 = 1
 b5 = g5  b6 = 0  1 = 1
 b4 = g4  b5 = 1  1 = 0
 b3 = g3  b4 = 1  0 = 1
 b2 = g2  b3 = 1  1 = 0
 b1 = g1  b2 = 1  0 = 1
 b0 = g0  b1 = 1  1 = 0
 B = 01101010
GNIT ECE 40
 Hamming codes:
Hamming code not only provides the detection of a
bit error, but also identifies which bit is in error so
that it can be corrected. Thus hamming code is
called error detecting and error correcting code. The
code uses a no. of parity bits located at certain
positions in the code group. Hamming code can be
constructed for single error correction.
 Number of parity bits:
No. of parity bits dependent on the number of
information bits. If the no. of information bits is
designed x, the no. of parity bits, P is determined by
the following relationship.
2p > = x+p+1------------------- 1
GNIT ECE 41
 Example: Encode the binary word 1011 into seven bit even parity
hamming code.
 Sol: Step 1: Find the no. of parity bits required. Let P=3, then
Then 2p= 23 = 8 and x+p+1=4+3+1=8
Three parity bits are sufficient
Therefore, Total code bits = 4+3 = 7
 Step 2: Construct a bit location table
Bit designation D7 D6 D5 P4 D3 P2
P1
Bit location 7 6 5 4 3 2
1
Binary location 111 110 101 100 011 010
001
Number
Information bits(Dn) 1 0 1 1
Parity bits(Pn) 0 0
1
GNIT ECE 42
 Step 3: Determine the parity bits
 For P1: Bit locations 3, 5, 7 have three 1s
and therefore to have an even parity P1 must
be 1.
 For P2: Bit locations 3, 6, 7 have two 1s and
therefore to have an even parity P2 must be
0.
 For P4: Bit locations 5, 6, 7 have two 1s and
therefore to have an even parity P4 must be
0.
 Step 4: Enter the parity bits into the table to
form a seven bit hamming code = 1010101.
Digital systems
Digital systems
GNIT ECE 43
 American Standard Code for Information
Interchange (Refer to Table 1.7)
 A popular code used to represent information
sent as character-based data.
 It uses 7-bits to represent:
 94 Graphic printing characters.
 34 Non-printing characters.
 Some non-printing characters are used for text
format (e.g. BS = Backspace, CR = carriage
return).
 Other non-printing characters are used for
record marking and flow control (e.g. STX and
ETX start and end text areas).
GNIT ECE 44
 ASCII has some interesting properties:
 Digits 0 to 9 span Hexadecimal values 3016 to 3916
 Upper case A-Z span 4116 to 5A16
 Lower case a-z span 6116 to 7A16
 Lower to upper case translation (and vice versa)
occurs by flipping bit 6.
GNIT ECE 45
0
1
1
0
X
NOT
X
Z =
 Truth table  a tabular listing of the values of a
function for all possible combinations of values
on its arguments
 Example: Truth tables for the basic logic
operations:
1
1
1
0
0
1
0
1
0
0
0
0
Z = X揃Y
Y
X
AND OR
X Y Z = X+Y
0 0 0
0 1 1
1 0 1
1 1 1
GNIT ECE 46
1.
3.
5.
7.
9.
11.
13.
15.
17.
Commutative
Associative
Distributive
DeMorgan s
2.
4.
6.
8.
X . 1 X
=
X . 0 0
=
X . X X
=
0
=
X . X
10.
12.
14.
16.
X + Y Y + X
=
(X + Y) Z
+ X + (Y Z)
+
=
X(Y + Z) XY XZ
+
=
X + Y X . Y
=
XY YX
=
(XY) Z X(Y Z)
=
X + YZ (X + Y) (X + Z)
=
X . Y X + Y
=
X + 0 X
=
+
X 1 1
=
X + X X
=
1
=
X + X
X = X
 Invented by George Boole in 1854
 An algebraic structure defined by a set B = {0, 1}, together with two binary operators (+ and 揃) and a
unary operator ( )
Idempotence
Complement
Involution
Identity element
GNIT ECE 47
 Boolean Algebra is defined in general by a set B that can
have more than two values
 A two-valued Boolean algebra is also know as Switching
Algebra. The Boolean set B is restricted to 0 and 1.
Switching circuits can be represented by this algebra.
 The dual of an algebraic expression is obtained by
interchanging + and 揃 and interchanging 0s and 1s.
 The identities appear in dual pairs. When there is only one
identity on a line the identity is self-dual, i. e., the dual
expression = the original expression.
 Sometimes, the dot symbol  (AND operator) is not
written when the meaning is clear
GNIT ECE 48
 Example: F = (A + C) 揃 B + 0
dual F = (A 揃 C + B) 揃 1 = A 揃 C + B
 Example: G = X 揃 Y + (W + Z)
dual G =
 Example: H = A 揃 B + A 揃 C + B 揃 C
dual H =
 Unless it happens to be self-dual, the dual of
an expression does not equal the expression
itself
 Are any of these functions self-dual?
(A+B)(A+C)(B+C)=(A+BC)(B+C)=AB+AC+BC
(X+Y) 揃 (W 揃 Z) = (X+Y) 揃 (W+Z)
(A+B) 揃 (A+C) 揃 (B+C)
H is self-dual
GNIT ECE 49
 The order of evaluation is:
1. Parentheses
2. NOT
3. AND
4. OR
 Consequence: Parentheses appear
around OR expressions
 Example: F = A(B + C)(C + D)
GNIT ECE 50
 A + A 揃 B = A (Absorption Theorem)
Proof Steps Justification
A + A 揃 B
= A 揃 1 + A 揃 B Identity element: A 揃 1 = A
= A 揃 ( 1 + B) Distributive
= A 揃 1 1 + B = 1
= A Identity element
 Our primary reason for doing proofs is to learn:
 Careful and efficient use of the identities and theorems
of Boolean algebra, and
 How to choose the appropriate identity or theorem to
apply to make forward progress, irrespective of the
application.
GNIT ECE 51
 AB + AC + BC = AB + AC (Consensus Theorem)
Proof Steps Justification
= AB + AC + BC
= AB + AC + 1 揃 BC Identity element
= AB + AC + (A + A) 揃 BC Complement
= AB + AC + ABC + ABC Distributive
= AB + ABC + AC + ACB Commutative
= AB 揃 1 + ABC + AC 揃 1 + ACB Identity element
= AB (1+C) + AC (1 + B) Distributive
= AB . 1 + AC . 1 1+X = 1
= AB + AC Identity element
GNIT ECE 52
 Minimization
X Y + X Y = Y
 Absorption
X + X = X
 Simplification
X + X Y = X + Y
 DeMorgans
 X + Y = X 揃 Y
 Minimization (dual)
(X+Y)(X+Y) = Y
 Absorption (dual)
X 揃 (X + Y) = X
 Simplification (dual)
X 揃 (X + Y) = X 揃 Y
 DeMorgans (dual)
 X 揃 Y = X + Y
GNIT ECE 53
 Generalized DeMorgans Theorem:
X1 + X2 +  + Xn = X1 揃 X2 揃  揃 Xn
X1 揃 X2 揃  揃 Xn = X1 + X2 +  + Xn
X Y X揃Y X+Y X Y X+Y X 揃 Y X揃Y X+Y
0 0 0 0 1 1 1 1 1 1
0 1 0 1 1 0 0 0 1 1
1 0 0 1 0 1 0 0 1 1
1 1 1 1 0 0 0 0 0 0
X + Y = X 揃 Y X 揃 Y = X + Y
GNIT ECE 54
Use DeMorgan's Theorem:
1. Interchange AND and OR operators
2. Complement each constant and
literal
Example: Complement G = (a + bc)d
+ e
G = (a (b + c) + d) e
GNIT ECE 55
 An application of Boolean algebra
 Simplify to contain the smallest number of
literals (variables that may or may not be
complemented)
= AB + ABCD + A C D + A C D + A B D
= AB + AB(CD) + A C (D + D) + A B D
= AB + A C + A B D = B(A + AD) +AC
= B (A + D) + A C (has only 5 literals)
GNIT ECE 56
A B S C(arry)
0 0 0 0
1 0 1 0
0 1 1 0
1 1 0 1
Notice that the carry results are the same as AND
C = A  B
GNIT ECE 57
 Minterms and Maxterms
 Sum-of-Minterm (SOM) Canonical Form
 Product-of-Maxterm (POM) Canonical Form
 Representation of Complements of Functions
 Conversions between Representations
GNIT ECE 58
 Minterms are AND terms with every variable
present in either true or complemented form.
 Given that each binary variable may appear
normal (e.g., x) or complemented (there are 2n
minterms for n variables.
 Example: Two variables (X and Y) produce
2 x 2 = 4 combinations:
(both normal)
(X normal, Y complemented)
(X complemented, Y normal)
(both complemented)
 Thus there are four minterms of two variables.
Y
X
XY
Y
X
Y
X
x
GNIT ECE 59
 Maxterms are OR terms with every variable in
true or complemented form.
 Given that each binary variable may appear
normal (e.g., x) or complemented (e.g., x), there
are 2n maxterms for n variables.
 Example: Two variables (X and Y) produce
2 x 2 = 4 combinations:
X+Y(both normal)
X+Y(x normal, y complemented)
X+Y (x complement , y normal)
X+Y(both complement)
GNIT ECE 60
 Two variable minterms and maxterms.
 The minterm mi should evaluate to 1 for
each combination of x and y.
 The maxterm is the complement of the
minterm
x y Index Minterm Maxterm
0 0 0 m0 = x y M0 = x + y
0 1 1 m1 = x y M1 = x + y
1 0 2 m2 = x y M2 = x + y
1 1 3 m3 = x y M3 = x + y
GNIT ECE 61
M3 = x + y + z
m3 = x y z
3
1
1
0
M4 = x + y + z
m4 = x y z
4
0
0
1
M5 = x + y + z
m5 = x y z
5
1
0
1
M6 = x + y + z
m6 = x y z
6
0
1
1
1
1
0
0
y
1
0
0
0
x
1
0
1
0
z
M7 = x + y + z
m7 = x y z
7
M2 = x + y + z
m2 = x y z
2
M1 = x + y + z
m1 = x y z
1
M0 = x + y + z
m0 = x y z
0
Maxterm
Minterm
Index
Maxterm Mi is the complement of minterm mi
Mi = mi and mi = Mi
GNIT ECE 62
F = m1+m2+m3+m5+m7 = (1, 2, 3, 5, 7) =
x y z + x y z + x y z + x y z + x y z
F = M0 揃 M4 揃 M6 = (0, 4, 6) = (x+y+z)(x+y+z)(x+y+z)
x y z F Minterm Maxterm
0 0 0 0 M0 = (x + y + z)
0 0 1 1 m1 = x y z
0 1 0 1 m2 = x y z
0 1 1 1 m3 = x y z
1 0 0 0 M4 = (x + y + z)
1 0 1 1 m5 = x y z
1 1 0 0 M6 = (x + y + z)
1 1 1 1 m7 = x y z
GNIT ECE 63
 Standard Sum-of-Products (SOP) form:
equations are written as an OR of AND
terms
 Standard Product-of-Sums (POS) form:
equations are written as an AND of OR
terms
 Examples:
 SOP:
 POS:
 These mixed forms are neither SOP nor
POS


B
C
B
A
C
B
A +
+
C
揃
)
C
B
(A
揃
B)
(A +
+
+
C)
(A
C)
B
(A +
+
B)
(A
C
A
C
B
A +
+
GNIT ECE 64
 A sum of minterms form for n variables can be
written down directly from a truth table.
 Implementation of this form is a two-level network of
gates such that:
 The first level consists of n-input AND gates
 The second level is a single OR gate
 This form often can be simplified so that the
corresponding circuit is simpler.
GNIT ECE 65
 A Simplification Example:
 Writing the minterm expression:
F = A B C + A B C + A B C + ABC + ABC
 Simplifying:
F = A B C + A (B C + B C + B C + B C)
F = A B C + A (B (C + C) + B (C + C))
F = A B C + A (B + B)
F = A B C + A
F = B C + A
 Simplified F contains 3 literals compared to
15
)
7
,
6
,
5
,
4
,
1
(
)
C
,
B
,
A
(
F S
=
GNIT ECE 66
 In order for current to flow, both switches
must be closed
 Logic notation AB = C
(Sometimes AB = C)
A B C
0 0 0
0 1 0
1 0 0
1 1 1
GNIT ECE 67
 Current flows if either switch is closed
 Logic notation A + B = C
A B C
0 0 0
0 1 1
1 0 1
1 1 1
GNIT ECE 68
 Commutation
o A + B = B + A
o A  B = B  A
Same as
Same as
GNIT ECE 69
A + B B + A
A  B B  A
GNIT ECE 70
 Associative Property
A + (B + C) = (A + B) + C
A  (B  C) = (A  B)  C
=
GNIT ECE 71
Distributive Property
A + B  C = (A + B)  (A + C)
A + B  C
A B C Q
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
GNIT ECE 72
(A + B)  (A + C)
A B C Q
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
GNIT ECE 73
Accumulating our results: Binary addition is the
result of XOR plus AND
B
A
B
A
B
A 
+

=

GNIT ECE 74
A Q
0 1
1 0
Logic: A
Q =
GNIT ECE 75
 Exclusive OR/ Exclusive NOR
 The eXclusive OR (XOR) function is an important Boolean
function used extensively in logic circuits.
 The XOR function may be;
 implemented directly as an electronic circuit (truly a gate)
or
 implemented by interconnecting other gate types (used
as a convenient representation)
 The eXclusive NOR function is the complement of the
XOR function
 By our definition, XOR and XNOR gates are complex
gates.
Chapter 2
- Part 3
76
 Uses for the XOR and XNORs gate include:
 Adders/subtractors/multipliers
 Counters/incrementers/decrementers
 Parity generators/checkers
 Definitions
 The XOR function is:
 The eXclusive NOR (XNOR) function, otherwise
known as equivalence is:
 Strictly speaking, XOR and XNOR gates do no
exist for more that two inputs. Instead, they
are replaced by odd and even functions.
Y
X
Y
X
Y
X +
=

Y
X
Y
X
Y
X +
=

Chapter 2
- Part 3
77
 Operator Rules: XOR XNOR
 The XOR function means:
X OR Y, but NOT BOTH
 XOR is known as equivalence function, why?
X Y X  Y
0 0 0
0 1 1
1 0 1
1 1 0
X Y
0 0 1
0 1 0
1 0 0
1 1 1
(X  Y)
Chapter 2
- Part 3
78
 The XOR function can be extended to 3 or more
variables. For more than 2 variables, it is called
an odd function or modulo 2 sum (Mod 2 sum),
not an XOR:
 The complement of the odd function is the even
function.
 The XOR identities: =
= X
1
X
X
0
X 

1
X
X
0
X
X =

=

X
Y
Y
X 
=

Z
Y
X
)
Z
Y
(
X
Z
)
Y
X
( 

=


=


+
+
+
=

 Z
Y
X
Z
Y
X
Z
Y
X
Z
Y
X
Z
Y
X
Chapter 2
- Part 3
79
 XOR symbol:
 XNOR symbol:
 Shaped symbols exist only for two inputs
Chapter 2
- Part 3
80
1.12 Universal Gates
Nand and Nor gates are called Universal gates
as any Boolean function can be realized with the
help of Nand and Nor gates only
GNIT ECE 81
GNIT ECE
For example, NOT, OR, AND gates can be realized
by only Nand gates.
82
GNIT ECE
83
GNIT ECE
84
GNIT ECE
85
GNIT ECE
86
GNIT ECE
 Add inverters in two-level implementation
into the cost picture
 Attempt to combine inverters to reduce
the term count
 Attempt to reduce literal + term count by
factoring expression into POSOP or SOPOS
87
GNIT ECE
 F = A B + A C + B A + B C
= A A + A B + A C + B A + B B + B C
= A (A + B + C) + B (A + B + C)
F
A
C
B
7 inputs and 4 gates
15 inputs and 8 gates*
* Counting inverters (NOTS) as 1 input and 1 gate
88
GNIT ECE
 F = AB + AD + BC + CD 12 inputs & 5 gates
= A(B + D) + C(B + D) 8 inputs & 5 gates
F
A
C
B
D
89

More Related Content

Similar to unit-i-number-systems.pdf (20)

Number system
Number systemNumber system
Number system
Mantra VLSI
Number system on various number tyoes decimal
Number system on various number tyoes decimalNumber system on various number tyoes decimal
Number system on various number tyoes decimal
NamanArora441283
Video lectures
Video lecturesVideo lectures
Video lectures
Edhole.com
Mba ebooks
Mba ebooksMba ebooks
Mba ebooks
Edhole.com
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
skatiarrahaman
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
sulekhasaxena2
Logic Design 2009
Logic Design 2009Logic Design 2009
Logic Design 2009
lionking
Chapter_1_Digital_Systems_and_Binary_Numbers.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers.pptChapter_1_Digital_Systems_and_Binary_Numbers.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers.ppt
RupaRaj6
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
Edhole.com
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
Suganthi Vasanth Raj
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
ssuser52a19e
Review on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and HexadecimalReview on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and Hexadecimal
UtkirjonUbaydullaev1
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
RAJKUMARP63
mmmmmmmmmmmmmmmmmmmmmmbinary-numbers.ppt
mmmmmmmmmmmmmmmmmmmmmmbinary-numbers.pptmmmmmmmmmmmmmmmmmmmmmmbinary-numbers.ppt
mmmmmmmmmmmmmmmmmmmmmmbinary-numbers.ppt
AdityaGupta221734
ch3a-binary-numbers.ppt ch3a-binary-numbers.ppt ch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt ch3a-binary-numbers.ppt  ch3a-binary-numbers.pptch3a-binary-numbers.ppt ch3a-binary-numbers.ppt  ch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt ch3a-binary-numbers.ppt ch3a-binary-numbers.ppt
anilmallah76
binary-numbers.ppt
binary-numbers.pptbinary-numbers.ppt
binary-numbers.ppt
MarlonMagtibay2
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
RabiaAsif31
Number_Systems decimal, binary, octal, and hexadecimal
Number_Systems decimal, binary, octal, and hexadecimalNumber_Systems decimal, binary, octal, and hexadecimal
Number_Systems decimal, binary, octal, and hexadecimal
Meenakshi Munjal
Number system
Number systemNumber system
Number system
Mantra VLSI
Number system on various number tyoes decimal
Number system on various number tyoes decimalNumber system on various number tyoes decimal
Number system on various number tyoes decimal
NamanArora441283
Video lectures
Video lecturesVideo lectures
Video lectures
Edhole.com
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
skatiarrahaman
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
sulekhasaxena2
Logic Design 2009
Logic Design 2009Logic Design 2009
Logic Design 2009
lionking
Chapter_1_Digital_Systems_and_Binary_Numbers.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers.pptChapter_1_Digital_Systems_and_Binary_Numbers.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers.ppt
RupaRaj6
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
Edhole.com
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
ssuser52a19e
Review on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and HexadecimalReview on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and Hexadecimal
UtkirjonUbaydullaev1
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
RAJKUMARP63
mmmmmmmmmmmmmmmmmmmmmmbinary-numbers.ppt
mmmmmmmmmmmmmmmmmmmmmmbinary-numbers.pptmmmmmmmmmmmmmmmmmmmmmmbinary-numbers.ppt
mmmmmmmmmmmmmmmmmmmmmmbinary-numbers.ppt
AdityaGupta221734
ch3a-binary-numbers.ppt ch3a-binary-numbers.ppt ch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt ch3a-binary-numbers.ppt  ch3a-binary-numbers.pptch3a-binary-numbers.ppt ch3a-binary-numbers.ppt  ch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt ch3a-binary-numbers.ppt ch3a-binary-numbers.ppt
anilmallah76
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
RabiaAsif31
Number_Systems decimal, binary, octal, and hexadecimal
Number_Systems decimal, binary, octal, and hexadecimalNumber_Systems decimal, binary, octal, and hexadecimal
Number_Systems decimal, binary, octal, and hexadecimal
Meenakshi Munjal

Recently uploaded (20)

Air pollution is contamination of the indoor or outdoor environment by any ch...
Air pollution is contamination of the indoor or outdoor environment by any ch...Air pollution is contamination of the indoor or outdoor environment by any ch...
Air pollution is contamination of the indoor or outdoor environment by any ch...
dhanashree78
Name.docxVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Name.docxVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVName.docxVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Name.docxVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
MerijimArsedelPalmad1
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptxUNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
KesavanT10
Wireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdfWireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdf
AbhinandanMishra30
CONTRACTOR ALL RISK INSURANCESAR (1).ppt
CONTRACTOR ALL RISK INSURANCESAR (1).pptCONTRACTOR ALL RISK INSURANCESAR (1).ppt
CONTRACTOR ALL RISK INSURANCESAR (1).ppt
suaktonny
US Patented ReGenX Generator, ReGen-X Quatum Motor EV Regenerative Accelerati...
US Patented ReGenX Generator, ReGen-X Quatum Motor EV Regenerative Accelerati...US Patented ReGenX Generator, ReGen-X Quatum Motor EV Regenerative Accelerati...
US Patented ReGenX Generator, ReGen-X Quatum Motor EV Regenerative Accelerati...
Thane Heins NOBEL PRIZE WINNING ENERGY RESEARCHER
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptxGROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
meneememoo
How to Build a Maze Solving Robot Using Arduino
How to Build a Maze Solving Robot Using ArduinoHow to Build a Maze Solving Robot Using Arduino
How to Build a Maze Solving Robot Using Arduino
CircuitDigest
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
sreenath seenu
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptxRAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
JenTeruel1
only history of java.pptx real bihind the name java
only history of java.pptx real bihind the name javaonly history of java.pptx real bihind the name java
only history of java.pptx real bihind the name java
mushtaqsaliq9
Embedded System intro Embedded System intro.ppt
Embedded System intro Embedded System intro.pptEmbedded System intro Embedded System intro.ppt
Embedded System intro Embedded System intro.ppt
23ucc580
GREEN BULIDING PPT FOR THE REFRENACE.PPT
GREEN BULIDING PPT FOR THE REFRENACE.PPTGREEN BULIDING PPT FOR THE REFRENACE.PPT
GREEN BULIDING PPT FOR THE REFRENACE.PPT
kamalkeerthan61
eng funda notes.pdfddddddddddddddddddddddd
eng funda notes.pdfdddddddddddddddddddddddeng funda notes.pdfddddddddddddddddddddddd
eng funda notes.pdfddddddddddddddddddddddd
aayushkumarsinghec22
Power Point Presentation for Electrical Engineering 3-phase.ppt
Power Point Presentation for Electrical Engineering 3-phase.pptPower Point Presentation for Electrical Engineering 3-phase.ppt
Power Point Presentation for Electrical Engineering 3-phase.ppt
Aniket_1415
Multi objective genetic approach with Ranking
Multi objective genetic approach with RankingMulti objective genetic approach with Ranking
Multi objective genetic approach with Ranking
namisha18
Frankfurt University of Applied Science urkunde
Frankfurt University of Applied Science urkundeFrankfurt University of Applied Science urkunde
Frankfurt University of Applied Science urkunde
Lisa Emerson
Industrial Valves, Instruments Products Profile
Industrial Valves, Instruments Products ProfileIndustrial Valves, Instruments Products Profile
Industrial Valves, Instruments Products Profile
zebcoeng
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
Mathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptxMathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptx
ppkmurthy2006
Air pollution is contamination of the indoor or outdoor environment by any ch...
Air pollution is contamination of the indoor or outdoor environment by any ch...Air pollution is contamination of the indoor or outdoor environment by any ch...
Air pollution is contamination of the indoor or outdoor environment by any ch...
dhanashree78
Name.docxVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Name.docxVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVName.docxVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Name.docxVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
MerijimArsedelPalmad1
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptxUNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
KesavanT10
Wireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdfWireless-Charger presentation for seminar .pdf
Wireless-Charger presentation for seminar .pdf
AbhinandanMishra30
CONTRACTOR ALL RISK INSURANCESAR (1).ppt
CONTRACTOR ALL RISK INSURANCESAR (1).pptCONTRACTOR ALL RISK INSURANCESAR (1).ppt
CONTRACTOR ALL RISK INSURANCESAR (1).ppt
suaktonny
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptxGROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
meneememoo
How to Build a Maze Solving Robot Using Arduino
How to Build a Maze Solving Robot Using ArduinoHow to Build a Maze Solving Robot Using Arduino
How to Build a Maze Solving Robot Using Arduino
CircuitDigest
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
sreenath seenu
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptxRAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
JenTeruel1
only history of java.pptx real bihind the name java
only history of java.pptx real bihind the name javaonly history of java.pptx real bihind the name java
only history of java.pptx real bihind the name java
mushtaqsaliq9
Embedded System intro Embedded System intro.ppt
Embedded System intro Embedded System intro.pptEmbedded System intro Embedded System intro.ppt
Embedded System intro Embedded System intro.ppt
23ucc580
GREEN BULIDING PPT FOR THE REFRENACE.PPT
GREEN BULIDING PPT FOR THE REFRENACE.PPTGREEN BULIDING PPT FOR THE REFRENACE.PPT
GREEN BULIDING PPT FOR THE REFRENACE.PPT
kamalkeerthan61
eng funda notes.pdfddddddddddddddddddddddd
eng funda notes.pdfdddddddddddddddddddddddeng funda notes.pdfddddddddddddddddddddddd
eng funda notes.pdfddddddddddddddddddddddd
aayushkumarsinghec22
Power Point Presentation for Electrical Engineering 3-phase.ppt
Power Point Presentation for Electrical Engineering 3-phase.pptPower Point Presentation for Electrical Engineering 3-phase.ppt
Power Point Presentation for Electrical Engineering 3-phase.ppt
Aniket_1415
Multi objective genetic approach with Ranking
Multi objective genetic approach with RankingMulti objective genetic approach with Ranking
Multi objective genetic approach with Ranking
namisha18
Frankfurt University of Applied Science urkunde
Frankfurt University of Applied Science urkundeFrankfurt University of Applied Science urkunde
Frankfurt University of Applied Science urkunde
Lisa Emerson
Industrial Valves, Instruments Products Profile
Industrial Valves, Instruments Products ProfileIndustrial Valves, Instruments Products Profile
Industrial Valves, Instruments Products Profile
zebcoeng
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
Mathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptxMathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptx
ppkmurthy2006

unit-i-number-systems.pdf

  • 1. SWITCHING THEORY AND LOGIC DESIGN GNIT ECE 1
  • 2. UNIT I Number System and Boolean algebra And Switching Functions: Review of number systems, Complements of Numbers, Codes- Binary Codes, Binary Coded Decimal Code and its Properties, Unit Distance Codes, Error Detecting and Correcting Codes. Boolean Algebra: Basic Theorems and Properties, Switching Functions, Canonical and Standard Form, Algebraic Simplification of Digital Logic Gates, Properties of XOR Gates, Universal Gates, Multilevel NAND/NOR realizations. GNIT ECE 2
  • 3. 1.1 Review of number systems 1.2 Complements of Numbers 1.3 Codes- Binary Codes 1.4 Binary Coded Decimal Code and its Properties 1.5 Unit Distance Codes 1.6 Error Detecting and Correcting Codes 1.7 Boolean Algebra: Basic Theorems and Properties 1.8 Switching Functions 1.9 Canonical and Standard Form 1.10 Algebraic Simplification of Digital Logic Gates 1.11 Properties of XOR Gates 1.12 Universal Gates 1.13 Multilevel NAND/NOR realizations GNIT ECE 3
  • 4. Base (also called radix) = 10 10 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } Digit Position Integer & fraction Digit Weight Weight = (Base) Position Magnitude Sum of Digit x Weight Formal Notation d2*B 2 +d1*B 1 +d0*B 0 +d-1*B -1 +d-2*B -2 GNIT ECE 4
  • 5. Base = 2 2 digits { 0, 1 }, called binary digits or bits Weights Weight = (Base) Position Magnitude Sum of Bit x Weight Formal Notation Groups of bits 4 bits = Nibble 8 bits = Byte 1 0 -1 2 -2 2 1 1/2 4 1/4 1 0 1 0 1 1 *22 +0 *21 +1 *20 +0 *2-1 +1 *2- 2 =(5.25)10 (101.01)2 1 0 1 1 1 1 0 0 0 1 0 1 GNIT ECE 5
  • 6. Decimal (Base 10) Octal (Base 8) Binary (Base 2) Hexadecimal (Base 16) Evaluate Magnitude Evaluate Magnitude Evaluate Magnitude GNIT ECE 6
  • 7. Divide the number by the Base (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division Example: (13)10 Quotient Remainder Coefficient Answer: (13)10 = (a3 a2 a1 a0)2 = (1101)2 MSB LSB 13/ 2 = 6 1 a0 = 1 6 / 2 = 3 0 a1 = 0 3 / 2 = 1 1 a2 = 1 1 / 2 = 0 1 a3 = 1 GNIT ECE 7
  • 8. Multiply the number by the Base (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division Example: (0.625)10 Integer Fraction Coefficient Answer: (0.625)10 = (0.a-1 a-2 a-3)2 = (0.101)2 MSB LSB 0.625 * 2 = 1 . 25 0.25 * 2 = 0 . 5 a-2 = 0 0.5 * 2 = 1 . 0 a-3 = 1 a-1 = 1 GNIT ECE 8
  • 9. Example: (175)10 Quotient Remainder Coefficient Answer: (175)10 = (a2 a1 a0)8 = (257)8 175 / 8 = 21 7 a0 = 7 21 / 8 = 2 5 a1 = 5 2 / 8 = 0 2 a2 = 2 Example: (0.3125)10 Integer Fraction Coefficient Answer: (0.3125)10 = (0.a-1 a-2 a-3)8 = (0.24)8 0.3125 * 8 = 2 . 5 0.5 * 8 = 4 . 0 a-2 = 4 a-1 = 2 GNIT ECE 9
  • 10. 8 = 23 Each group of 3 bits represents an octal digit Octal Binary 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 Example: ( 1 0 1 1 0 . 0 1 )2 ( 2 6 . 2 )8 Assume Zeros Works both ways (Binary to Octal & Octal to Binary) GNIT ECE 10
  • 11. 16 = 24 Each group of 4 bits represents a hexadecimal digit Hex Binary 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1 A 1 0 1 0 B 1 0 1 1 C 1 1 0 0 D 1 1 0 1 E 1 1 1 0 F 1 1 1 1 Example: ( 1 0 1 1 0 . 0 1 )2 ( 1 6 . 4 )16 Assume Zeros Works both ways (Binary to Hex & Hex to Binary) GNIT ECE 11
  • 12. Convert to Binary as an intermediate step Example: ( 0 1 0 1 1 0 . 0 1 0 )2 ( 1 6 . 4 )16 Assume Zeros Works both ways (Octal to Hex & Hex to Octal) ( 2 6 . 2 )8 Assume Zeros GNIT ECE 12
  • 13. Base = 8 8 digits { 0, 1, 2, 3, 4, 5, 6, 7 } Weights Weight = (Base) Position Magnitude Sum of Digit x Weight Formal Notation 1 0 -1 2 -2 8 1 1/8 64 1/64 5 1 2 7 4 5 *82 +1 *81 +2 *80 +7 *8-1 +4 *8-2 =(330.9375)10 (512.74)8 GNIT ECE 13
  • 14. Base = 16 16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F } Weights Weight = (Base) Position Magnitude Sum of Digit x Weight Formal Notation 1 0 -1 2 -2 16 1 1/16 256 1/256 1 E 5 7 A 1 *162 +14 *161 +5 *160 +7 *16-1 +10 *16-2 =(485.4765625)10 (1E5.7A)16 GNIT ECE 14
  • 15. n 2n 0 20=1 1 21=2 2 22=4 3 23=8 4 24=16 5 25=32 6 26=64 7 27=128 n 2n 8 28=256 9 29=512 10 210=1024 11 211=2048 12 212=4096 20 220=1M 30 230=1G 40 240=1T Mega Giga Tera Kilo GNIT ECE 15
  • 16. Decimal Addition 5 5 5 5 + 0 1 1 = Ten Base Subtract a Base 1 1 Carry GNIT ECE 16
  • 17. Column Addition 1 0 1 1 1 1 1 1 1 1 0 + 0 0 0 0 1 1 1 (2)10 1 1 1 1 1 1 = 61 = 23 = 84 GNIT ECE 17
  • 18. Borrow a Base when needed 0 0 1 1 1 0 1 1 1 1 0 0 1 0 1 1 1 0 = (10)2 2 2 2 2 1 0 0 0 1 = 77 = 23 = 54 GNIT ECE 18
  • 19. Bit by bit 0 1 1 1 1 0 1 1 0 0 0 0 0 0 0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 1 1 0 1 1 1 0 x GNIT ECE 19
  • 20. Decimal Binary Octal Hex 00 0000 00 0 01 0001 01 1 02 0010 02 2 03 0011 03 3 04 0100 04 4 05 0101 05 5 06 0110 06 6 07 0111 07 7 08 1000 10 8 09 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F GNIT ECE 20
  • 21. There are two types of complements for each base-r system: the radix complement and diminished radix complement. Diminished Radix Complement - (r-1)s Complement Given a number N in base r having n digits, the (r1)s complement of N is defined as: (rn 1) N Example for 6-digit decimal numbers: 9s complement is (rn 1)N = (1061)N = 999999N 9s complement of 546700 is 999999546700 = 453299 Example for 7-digit binary numbers: 1s complement is (rn 1) N = (271)N = 1111111N 1s complement of 1011000 is 11111111011000 = 0100111 Observation: Subtraction from (rn 1) will never require a borrow Diminished radix complement can be computed digit-by-digit For binary: 1 0 = 1 and 1 1 = 0 GNIT ECE 21
  • 22. 1s Complement (Diminished Radix Complement) All 0s become 1s All 1s become 0s Example (10110000)2 (01001111)2 If you add a number and its 1s complement 1 0 1 1 0 0 0 0 + 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 GNIT ECE 22
  • 23. Radix Complement Example: Base-10 Example: Base-2 The r's complement of an n-digit number N in base r is defined as rn N for N 0 and as 0 for N = 0. Comparing with the (r 1) 's complement, we note that the r's complement is obtained by adding 1 to the (r 1) 's complement, since rn N = [(rn 1) N] + 1. The 10's complement of 012398 is 987602 The 10's complement of 246700 is 753300 The 2's complement of 1101100 is 0010100 The 2's complement of 0110111 is 1001001 GNIT ECE 23
  • 24. 2s Complement (Radix Complement) Take 1s complement then add 1 Toggle all bits to the left of the first 1 from the right Example: Number: 1s Comp.: 0 1 0 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 0 1 1 1 1 + 1 OR 1 0 1 1 0 0 0 0 0 0 0 0 1 0 1 0 GNIT ECE 24
  • 25. Subtraction with Complements The subtraction of two n-digit unsigned numbers M N in base r can be done as follows: GNIT ECE 25
  • 26. Example 1.5 Using 10's complement, subtract 72532 3250. Example 1.6 Using 10's complement, subtract 3250 72532. There is no end carry. Therefore, the answer is (10's complement of 30718) = 69282. GNIT ECE 26
  • 27. Example 1.7 Given the two binary numbers X = 1010100 and Y = 1000011, perform the subtraction (a) X Y ; and (b) Y X, by using 2's complement. There is no end carry. Therefore, the answer is Y X = (2's complement of 1101111) = 0010001. GNIT ECE 27
  • 28. Subtraction of unsigned numbers can also be done by means of the (r 1)'s complement. Remember that the (r 1) 's complement is one less then the r's complement. Example 1.8 Repeat Example 1.7, but this time using 1's complement. There is no end carry, Therefore, the answer is Y X = (1's complement of 1101110) = 0010001. GNIT ECE 28
  • 29. Example: Consider decimal 185 and its corresponding value in BCD and binary: BCD addition GNIT ECE 29
  • 30. Example: Consider the addition of 184 + 576 = 760 in BCD: Decimal Arithmetic: (+375) + (-240) = +135 Hint 6: using 10s of BCD GNIT ECE 30
  • 31. Other Decimal Codes GNIT ECE 31
  • 32. Gray Code The advantage is that only bit in the code group changes in going from one number to the next. Error detection. Representation of analog data. Low power design. 000 001 010 100 110 111 101 011 1-1 and onto!! GNIT ECE 32
  • 33. American Standard Code for Information Interchange (ASCII) Character Code GNIT ECE 33
  • 34. ASCII Character Code GNIT ECE 34
  • 35. Error-Detecting Code To detect errors in data communication and processing, an eighth bit is sometimes added to the ASCII character to indicate its parity. A parity bit is an extra bit included with a message to make the total number of 1's either even or odd. Example: Consider the following two characters and their even and odd parity: GNIT ECE 35
  • 36. BCD Code A number with k decimal digits will require 4k bits in BCD. Decimal 396 is represented in BCD with 12bits as 0011 1001 0110, with each group of 4 bits representing one decimal digit. A decimal number in BCD is the same as its equivalent binary number only when the number is between 0 and 9. The binary combinations 1010 through 1111 are not used and have no meaning in BCD. GNIT ECE 36
  • 37. Binary code Gray code 1.5 Unit Distance Codes The most common example of a unit distance code (Successive values differ by only one bit). See Table 2-10 page 52. GNIT ECE 37
  • 38. Decimal Binary Gray 0 000 000 1 001 001 2 010 011 3 011 010 4 100 110 5 101 111 6 110 101 7 111 100 GNIT ECE 38
  • 39. The binary value B = bnb2 b1 b0 can be converted to Gray code G = gng2 g1 g0. With gi = bi+1 bi or G = B B/2 Examples: If B =110 then G = 110 011 = 101 If B = 10110111then G = 10110111 1011011 = 11101100 GNIT ECE 39
  • 40. From gi = bi bi+1 it follows that bi = gi bi+1 Example: Let G = 01011111. Then using b8 = 0. b7 = g7 b8 = 0 0 = 0 b6 = g6 b7 = 1 0 = 1 b5 = g5 b6 = 0 1 = 1 b4 = g4 b5 = 1 1 = 0 b3 = g3 b4 = 1 0 = 1 b2 = g2 b3 = 1 1 = 0 b1 = g1 b2 = 1 0 = 1 b0 = g0 b1 = 1 1 = 0 B = 01101010 GNIT ECE 40
  • 41. Hamming codes: Hamming code not only provides the detection of a bit error, but also identifies which bit is in error so that it can be corrected. Thus hamming code is called error detecting and error correcting code. The code uses a no. of parity bits located at certain positions in the code group. Hamming code can be constructed for single error correction. Number of parity bits: No. of parity bits dependent on the number of information bits. If the no. of information bits is designed x, the no. of parity bits, P is determined by the following relationship. 2p > = x+p+1------------------- 1 GNIT ECE 41
  • 42. Example: Encode the binary word 1011 into seven bit even parity hamming code. Sol: Step 1: Find the no. of parity bits required. Let P=3, then Then 2p= 23 = 8 and x+p+1=4+3+1=8 Three parity bits are sufficient Therefore, Total code bits = 4+3 = 7 Step 2: Construct a bit location table Bit designation D7 D6 D5 P4 D3 P2 P1 Bit location 7 6 5 4 3 2 1 Binary location 111 110 101 100 011 010 001 Number Information bits(Dn) 1 0 1 1 Parity bits(Pn) 0 0 1 GNIT ECE 42
  • 43. Step 3: Determine the parity bits For P1: Bit locations 3, 5, 7 have three 1s and therefore to have an even parity P1 must be 1. For P2: Bit locations 3, 6, 7 have two 1s and therefore to have an even parity P2 must be 0. For P4: Bit locations 5, 6, 7 have two 1s and therefore to have an even parity P4 must be 0. Step 4: Enter the parity bits into the table to form a seven bit hamming code = 1010101. Digital systems Digital systems GNIT ECE 43
  • 44. American Standard Code for Information Interchange (Refer to Table 1.7) A popular code used to represent information sent as character-based data. It uses 7-bits to represent: 94 Graphic printing characters. 34 Non-printing characters. Some non-printing characters are used for text format (e.g. BS = Backspace, CR = carriage return). Other non-printing characters are used for record marking and flow control (e.g. STX and ETX start and end text areas). GNIT ECE 44
  • 45. ASCII has some interesting properties: Digits 0 to 9 span Hexadecimal values 3016 to 3916 Upper case A-Z span 4116 to 5A16 Lower case a-z span 6116 to 7A16 Lower to upper case translation (and vice versa) occurs by flipping bit 6. GNIT ECE 45
  • 46. 0 1 1 0 X NOT X Z = Truth table a tabular listing of the values of a function for all possible combinations of values on its arguments Example: Truth tables for the basic logic operations: 1 1 1 0 0 1 0 1 0 0 0 0 Z = X揃Y Y X AND OR X Y Z = X+Y 0 0 0 0 1 1 1 0 1 1 1 1 GNIT ECE 46
  • 47. 1. 3. 5. 7. 9. 11. 13. 15. 17. Commutative Associative Distributive DeMorgan s 2. 4. 6. 8. X . 1 X = X . 0 0 = X . X X = 0 = X . X 10. 12. 14. 16. X + Y Y + X = (X + Y) Z + X + (Y Z) + = X(Y + Z) XY XZ + = X + Y X . Y = XY YX = (XY) Z X(Y Z) = X + YZ (X + Y) (X + Z) = X . Y X + Y = X + 0 X = + X 1 1 = X + X X = 1 = X + X X = X Invented by George Boole in 1854 An algebraic structure defined by a set B = {0, 1}, together with two binary operators (+ and 揃) and a unary operator ( ) Idempotence Complement Involution Identity element GNIT ECE 47
  • 48. Boolean Algebra is defined in general by a set B that can have more than two values A two-valued Boolean algebra is also know as Switching Algebra. The Boolean set B is restricted to 0 and 1. Switching circuits can be represented by this algebra. The dual of an algebraic expression is obtained by interchanging + and 揃 and interchanging 0s and 1s. The identities appear in dual pairs. When there is only one identity on a line the identity is self-dual, i. e., the dual expression = the original expression. Sometimes, the dot symbol (AND operator) is not written when the meaning is clear GNIT ECE 48
  • 49. Example: F = (A + C) 揃 B + 0 dual F = (A 揃 C + B) 揃 1 = A 揃 C + B Example: G = X 揃 Y + (W + Z) dual G = Example: H = A 揃 B + A 揃 C + B 揃 C dual H = Unless it happens to be self-dual, the dual of an expression does not equal the expression itself Are any of these functions self-dual? (A+B)(A+C)(B+C)=(A+BC)(B+C)=AB+AC+BC (X+Y) 揃 (W 揃 Z) = (X+Y) 揃 (W+Z) (A+B) 揃 (A+C) 揃 (B+C) H is self-dual GNIT ECE 49
  • 50. The order of evaluation is: 1. Parentheses 2. NOT 3. AND 4. OR Consequence: Parentheses appear around OR expressions Example: F = A(B + C)(C + D) GNIT ECE 50
  • 51. A + A 揃 B = A (Absorption Theorem) Proof Steps Justification A + A 揃 B = A 揃 1 + A 揃 B Identity element: A 揃 1 = A = A 揃 ( 1 + B) Distributive = A 揃 1 1 + B = 1 = A Identity element Our primary reason for doing proofs is to learn: Careful and efficient use of the identities and theorems of Boolean algebra, and How to choose the appropriate identity or theorem to apply to make forward progress, irrespective of the application. GNIT ECE 51
  • 52. AB + AC + BC = AB + AC (Consensus Theorem) Proof Steps Justification = AB + AC + BC = AB + AC + 1 揃 BC Identity element = AB + AC + (A + A) 揃 BC Complement = AB + AC + ABC + ABC Distributive = AB + ABC + AC + ACB Commutative = AB 揃 1 + ABC + AC 揃 1 + ACB Identity element = AB (1+C) + AC (1 + B) Distributive = AB . 1 + AC . 1 1+X = 1 = AB + AC Identity element GNIT ECE 52
  • 53. Minimization X Y + X Y = Y Absorption X + X = X Simplification X + X Y = X + Y DeMorgans X + Y = X 揃 Y Minimization (dual) (X+Y)(X+Y) = Y Absorption (dual) X 揃 (X + Y) = X Simplification (dual) X 揃 (X + Y) = X 揃 Y DeMorgans (dual) X 揃 Y = X + Y GNIT ECE 53
  • 54. Generalized DeMorgans Theorem: X1 + X2 + + Xn = X1 揃 X2 揃 揃 Xn X1 揃 X2 揃 揃 Xn = X1 + X2 + + Xn X Y X揃Y X+Y X Y X+Y X 揃 Y X揃Y X+Y 0 0 0 0 1 1 1 1 1 1 0 1 0 1 1 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 1 1 1 0 0 0 0 0 0 X + Y = X 揃 Y X 揃 Y = X + Y GNIT ECE 54
  • 55. Use DeMorgan's Theorem: 1. Interchange AND and OR operators 2. Complement each constant and literal Example: Complement G = (a + bc)d + e G = (a (b + c) + d) e GNIT ECE 55
  • 56. An application of Boolean algebra Simplify to contain the smallest number of literals (variables that may or may not be complemented) = AB + ABCD + A C D + A C D + A B D = AB + AB(CD) + A C (D + D) + A B D = AB + A C + A B D = B(A + AD) +AC = B (A + D) + A C (has only 5 literals) GNIT ECE 56
  • 57. A B S C(arry) 0 0 0 0 1 0 1 0 0 1 1 0 1 1 0 1 Notice that the carry results are the same as AND C = A B GNIT ECE 57
  • 58. Minterms and Maxterms Sum-of-Minterm (SOM) Canonical Form Product-of-Maxterm (POM) Canonical Form Representation of Complements of Functions Conversions between Representations GNIT ECE 58
  • 59. Minterms are AND terms with every variable present in either true or complemented form. Given that each binary variable may appear normal (e.g., x) or complemented (there are 2n minterms for n variables. Example: Two variables (X and Y) produce 2 x 2 = 4 combinations: (both normal) (X normal, Y complemented) (X complemented, Y normal) (both complemented) Thus there are four minterms of two variables. Y X XY Y X Y X x GNIT ECE 59
  • 60. Maxterms are OR terms with every variable in true or complemented form. Given that each binary variable may appear normal (e.g., x) or complemented (e.g., x), there are 2n maxterms for n variables. Example: Two variables (X and Y) produce 2 x 2 = 4 combinations: X+Y(both normal) X+Y(x normal, y complemented) X+Y (x complement , y normal) X+Y(both complement) GNIT ECE 60
  • 61. Two variable minterms and maxterms. The minterm mi should evaluate to 1 for each combination of x and y. The maxterm is the complement of the minterm x y Index Minterm Maxterm 0 0 0 m0 = x y M0 = x + y 0 1 1 m1 = x y M1 = x + y 1 0 2 m2 = x y M2 = x + y 1 1 3 m3 = x y M3 = x + y GNIT ECE 61
  • 62. M3 = x + y + z m3 = x y z 3 1 1 0 M4 = x + y + z m4 = x y z 4 0 0 1 M5 = x + y + z m5 = x y z 5 1 0 1 M6 = x + y + z m6 = x y z 6 0 1 1 1 1 0 0 y 1 0 0 0 x 1 0 1 0 z M7 = x + y + z m7 = x y z 7 M2 = x + y + z m2 = x y z 2 M1 = x + y + z m1 = x y z 1 M0 = x + y + z m0 = x y z 0 Maxterm Minterm Index Maxterm Mi is the complement of minterm mi Mi = mi and mi = Mi GNIT ECE 62
  • 63. F = m1+m2+m3+m5+m7 = (1, 2, 3, 5, 7) = x y z + x y z + x y z + x y z + x y z F = M0 揃 M4 揃 M6 = (0, 4, 6) = (x+y+z)(x+y+z)(x+y+z) x y z F Minterm Maxterm 0 0 0 0 M0 = (x + y + z) 0 0 1 1 m1 = x y z 0 1 0 1 m2 = x y z 0 1 1 1 m3 = x y z 1 0 0 0 M4 = (x + y + z) 1 0 1 1 m5 = x y z 1 1 0 0 M6 = (x + y + z) 1 1 1 1 m7 = x y z GNIT ECE 63
  • 64. Standard Sum-of-Products (SOP) form: equations are written as an OR of AND terms Standard Product-of-Sums (POS) form: equations are written as an AND of OR terms Examples: SOP: POS: These mixed forms are neither SOP nor POS B C B A C B A + + C 揃 ) C B (A 揃 B) (A + + + C) (A C) B (A + + B) (A C A C B A + + GNIT ECE 64
  • 65. A sum of minterms form for n variables can be written down directly from a truth table. Implementation of this form is a two-level network of gates such that: The first level consists of n-input AND gates The second level is a single OR gate This form often can be simplified so that the corresponding circuit is simpler. GNIT ECE 65
  • 66. A Simplification Example: Writing the minterm expression: F = A B C + A B C + A B C + ABC + ABC Simplifying: F = A B C + A (B C + B C + B C + B C) F = A B C + A (B (C + C) + B (C + C)) F = A B C + A (B + B) F = A B C + A F = B C + A Simplified F contains 3 literals compared to 15 ) 7 , 6 , 5 , 4 , 1 ( ) C , B , A ( F S = GNIT ECE 66
  • 67. In order for current to flow, both switches must be closed Logic notation AB = C (Sometimes AB = C) A B C 0 0 0 0 1 0 1 0 0 1 1 1 GNIT ECE 67
  • 68. Current flows if either switch is closed Logic notation A + B = C A B C 0 0 0 0 1 1 1 0 1 1 1 1 GNIT ECE 68
  • 69. Commutation o A + B = B + A o A B = B A Same as Same as GNIT ECE 69
  • 70. A + B B + A A B B A GNIT ECE 70
  • 71. Associative Property A + (B + C) = (A + B) + C A (B C) = (A B) C = GNIT ECE 71
  • 72. Distributive Property A + B C = (A + B) (A + C) A + B C A B C Q 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 GNIT ECE 72
  • 73. (A + B) (A + C) A B C Q 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 GNIT ECE 73
  • 74. Accumulating our results: Binary addition is the result of XOR plus AND B A B A B A + = GNIT ECE 74
  • 75. A Q 0 1 1 0 Logic: A Q = GNIT ECE 75
  • 76. Exclusive OR/ Exclusive NOR The eXclusive OR (XOR) function is an important Boolean function used extensively in logic circuits. The XOR function may be; implemented directly as an electronic circuit (truly a gate) or implemented by interconnecting other gate types (used as a convenient representation) The eXclusive NOR function is the complement of the XOR function By our definition, XOR and XNOR gates are complex gates. Chapter 2 - Part 3 76
  • 77. Uses for the XOR and XNORs gate include: Adders/subtractors/multipliers Counters/incrementers/decrementers Parity generators/checkers Definitions The XOR function is: The eXclusive NOR (XNOR) function, otherwise known as equivalence is: Strictly speaking, XOR and XNOR gates do no exist for more that two inputs. Instead, they are replaced by odd and even functions. Y X Y X Y X + = Y X Y X Y X + = Chapter 2 - Part 3 77
  • 78. Operator Rules: XOR XNOR The XOR function means: X OR Y, but NOT BOTH XOR is known as equivalence function, why? X Y X Y 0 0 0 0 1 1 1 0 1 1 1 0 X Y 0 0 1 0 1 0 1 0 0 1 1 1 (X Y) Chapter 2 - Part 3 78
  • 79. The XOR function can be extended to 3 or more variables. For more than 2 variables, it is called an odd function or modulo 2 sum (Mod 2 sum), not an XOR: The complement of the odd function is the even function. The XOR identities: = = X 1 X X 0 X 1 X X 0 X X = = X Y Y X = Z Y X ) Z Y ( X Z ) Y X ( = = + + + = Z Y X Z Y X Z Y X Z Y X Z Y X Chapter 2 - Part 3 79
  • 80. XOR symbol: XNOR symbol: Shaped symbols exist only for two inputs Chapter 2 - Part 3 80
  • 81. 1.12 Universal Gates Nand and Nor gates are called Universal gates as any Boolean function can be realized with the help of Nand and Nor gates only GNIT ECE 81
  • 82. GNIT ECE For example, NOT, OR, AND gates can be realized by only Nand gates. 82
  • 87. GNIT ECE Add inverters in two-level implementation into the cost picture Attempt to combine inverters to reduce the term count Attempt to reduce literal + term count by factoring expression into POSOP or SOPOS 87
  • 88. GNIT ECE F = A B + A C + B A + B C = A A + A B + A C + B A + B B + B C = A (A + B + C) + B (A + B + C) F A C B 7 inputs and 4 gates 15 inputs and 8 gates* * Counting inverters (NOTS) as 1 input and 1 gate 88
  • 89. GNIT ECE F = AB + AD + BC + CD 12 inputs & 5 gates = A(B + D) + C(B + D) 8 inputs & 5 gates F A C B D 89