De Unit 1
De Unit 1
Lecture-1 UNIT-1
Number System
P.Archana
Assistant Professor, ECE Dept
Text Books
Digital: Analog:
only assumes discrete values values vary over a broad range
continuously
Voltage : 5v to 3.5 V --- 1
Chapter 1 11
The string of digits represents the
power series:
j=-1
i=n-1
i
(Number) = ∑A r i + ∑ Aj r
j
r
i=0 j=-m
+ve exponents -ve exponents
Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F
Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Octal 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17
Binary Numbers:
Special Powers of 2
Decimal Octal
Binary Hexadecimal
Decimal to Decimal (just for fun)
Decimal Octal
Binary Hexadecimal
Decimal Octal
Binary Hexadecimal
Binary to Decimal
• Technique
–Multiply each bit by 2n, where n is
the “weight” of the bit
• The weight is the position of the bit,
starting from 0 on the right side
–Add the results
Examples
EX1:
1010112 => 1x25+0x24+1x23+0x22+1x21+1x20 =43
EX2:
( 1 0 1 1 0 . 0 1 0 1 )2 = 2¹ + 2² + (2^4) +( 2^-2) + (2^-4)
Binary:
(111111111111)2
Decimal:
(111111111111)2 = 1x 2º+ 1 x 2¹ + 1 x 2² +…..+ 1 x 2¹¹
(111111111111)2 = 4,095
Octal to Decimal
Decimal Octal
Binary Hexadecimal
Octal to Decimal
• Technique
– Multiply each bit by 8n, where n is the
“weight” of the bit
• The weight is the position of the bit,
starting from 0 on the right side
– Add the results
Example:
724.128 => 7x82+2x81+4x80 +1*8-1+2*8-2=
46810
Hexadecimal to Decimal
Decimal Octal
Binary Hexadecimal
Hexadecimal to Decimal
• Technique
–Multiply each bit by 16n, where n is
the “weight” of the bit
• The weight is the position of the bit,
starting from 0 on the right side
–Add the results
Example
274810
Decimal to Binary
Decimal Octal
Binary Hexadecimal
Decimal to Binary
• Integer part conversion
– Successive division by two, keep track of the
remainder until quotient is 0 or 1.
– The first remainder is least-significant bit
– The last remainder is most-significant bit
• Fractional part conversion.
– Successive multiplication by two. The integer part of
the product becomes a numeral in the binary take it a
side.
– The fractional part is again multiplied by two and
this process is repeated untill fractional part reaches
zero
– The first product integer is MSB and last product
integer is LSB bits
Convert the decimal number 345 to binary
(a) 34.4375
34 0.4375
Decimal Octal
Binary Hexadecimal
Decimal to Octal
• Integer part conversion
– Successive division by 8, keep track of the
remainder until quotient is zero.
– The first remainder is least-significant bit
– The last remainder is most-significant bit
• Fractional part conversion.
– Successive multiplication by 8. The integer part of
the product becomes a numeral in the octal take it a
side.
– The fractional part is again multiplied by 8 and this
process is repeated until fractional part reaches zero
– The first product integer is MSB and last product
integer is LSB bits
Decimal to Hexadecimal
Decimal Octal
Binary Hexadecimal
Decimal to Hexadecimal
• Integer part conversion
– Successive division by 16, keep track of the
remainder until quotient is zero.
– The first remainder is least-significant bit
– The last remainder is most-significant bit
• Fractional part conversion.
– Successive multiplication by 16. The integer part of
the product becomes a numeral in the hexadecimal,
take it a side.
– The fractional part is again multiplied by 16 and
this process is repeated until fractional part reaches
zero
– The first product integer is MSB and last product
integer is LSB bits
Octal to Binary
Decimal Octal
Binary Hexadecimal
Octal to Binary
• Technique
–Convert each octal digit to a 3-bit
equivalent binary representation
Example
7058 = ?2
7 0 5
7058 = 1110001012
Hexadecimal to Binary
Decimal Octal
Binary Hexadecimal
Hexadecimal to Binary
• Technique
–Convert each hexadecimal digit to
a 4-bit equivalent binary
representation
Example
10AF16 = ?2
1 0 A F
10AF16 = 00010000101011112
Binary to Octal
Decimal Octal
Binary Hexadecimal
Binary to Octal
• Technique
–Group bits in threes, starting on
right
–Convert to octal digits
Example
10110101112 = ?8
1 3 2 7
10110101112 = 13278
Hexadecimal to Octal
Decimal Octal
Binary Hexadecimal
Hexadecimal to Octal
• Technique
–Use binary as an intermediate
number
Binary to Hexadecimal
Decimal Octal
Binary Hexadecimal
Binary to Hexadecimal
• Technique
–Group bits in fours, starting on
right
–Convert to hexadecimal digits
Example
10101110112 = ?16
10 1011 1011
2 B B
10101110112 = 2BB16
What is the largest binary number that can be expressed with
12 bits? What is the equivalent hexadecimal ?
Binary:
(111111111111)2
Hexadecimal:
(1111 1111 1111)2
F F F
= (FFF)16
Convert the given binary number 1.11010 to hexadecimal
number
( 1 . 1101 0 )2 = ( 1 . D )16
1 D 0 0 -1
Octal to Hexadecimal
Decimal Octal
Binary Hexadecimal
Octal to Hexadecimal
• Technique
–Use binary as an intermediary
Convert the hexadecimal number 68BE to binary and then
binary to octal .
(68BE) 16
Binary form:
(0110 1000 1011
1110)2=(0110100010111110)2
6 8 B E
Octal form:
(0 110 100 010 111 110)2
0 6 4 2 7 6
=(064276)8
Convert the following numbers with the indicated bases to
decimal : (4310)5 , and (198)12 .
(4310)5 = 0 x 5º + 1 x 5¹ + 3 x 5² + 4 x 5³ = 0 + 5 + 75 + 500
(4310)5 = (580)10
1 1 1 0 1 Gray
Binary to Gray Code Conversion-2
The Gray to Binary Conversion
• Gray-to-Binary Conversion
– The MSB in the binary code is the same as the
corresponding bit in the Gray code.
– Add each binary code bit generated to the Gray
code bit in the next adjacent position. Discard
carries.
ex: convert the Gray code word 11011 to binary
1 1 0 1 1 Gray
+ + + +
1 0 0 1 0 Binary
1’s compliment and 2’s compliment
1’s complements:
(a) 00010101 (b)10000001 (c)11111110 (d)01111111
2’s complement :
(a) 00010110 (b)10000010 (c)11111111 (d)10000000
Operation with 2’s complement
• Add 4 and -6
• Will use the 2’s complement of -6 or 1010
– 4 0100
– -6 1010
– 1110
• And taking the 2’s complement of 1110 get
0001 + 1 = 0010
100
ADDITION
Example
Definition of Boolean algebra
In mathematics and mathematical logic,
Boolean algebra is the branch of algebra in
which the values of the variables are the truth
values true and false, usually denoted 1 and 0
respectively.
x y x.y x y x+y x x’
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
Duality Property
• If a Boolean expression is true, the dual of
expression also true.
• To find the dual, follow the following steps:
(1) Change + operator to . operator
(2) Change . operator to + operator.
(3) Change 0 to 1 and 1 to 0 .
• Example: Dual of relation X + X’ = 1 is X . X’ =0.
• Duality is a very important property of boolean
algebra.
Basic Boolean Theorems
Theorem1 : Idempotency
(a) A+A=A (b) A . A = A
Proof: Proof:
A + A = (A + A) . 1 A.A=A.A+0
= (A + A). (A + A’) = A . A + A .A’
= A A + A A’ + A A + A = A ( A + A’)
A’ =A.1
= A A+ A A’ =A
=A+0
=A
Perfect Induction Method
• (a) A+1 =1 (b) A . 0 = 0
Proof:
A + 1 = 1 . (A + 1) Proof:
= (A + A’) (A + 1) 0.0=0
= A.A + A.1 + A’
.A + A’.1 => A
= A +A+ 0 + A’ .0=0
= A + A’
=1 1.0=0
A . 0 = 0 by the
Theorem 2: Involution
• A’’ = A
• Proof:
0’’ = 0
=> A’’ = A
1’’ = 1
Theorem 3 : Absorbtion
• (a) A + AB = A (b) A (A+B) = A
Proof: Proof:
A + AB = A . 1 + AB A (A + B) = A . A + AB
= A(1+B) = A + AB
=A.1 =A
=A
Examples of Absorption theorem
• (a) A + A’ B = A + B (b) A . (A’ + B) = AB
Proof:
Proof: A . ( A’ + B) = (A + AB) . (A’ + B)
A + A’ B = A + AB + A’B = A A’ + AB + A’AB+ ABB
= AB + ABB
= A + B .( A + A’)
= AB + AB
= A + B .1 = AB
= A+ B
Theorem4: DeMorgan’s Theorems
• DeMorgan suggested two theorems that
form an important part of boolean algebra.
(1) = +
(2)The complement of a product is equal to the
sum of the complements
Truth Table:
(2)
=
• The complement of a sum is equal to
the product of the complements
Truth Table:
Theorem5 : Consensus Theorem
• The expression of the form AB + A’C+ BC in which
the term BC is redundant and can be eliminated to
form the equivalent expression as AB + A’C
• The theorem used for this simplification is known as
consensus theorem and it is stated as
AB + A’C + BC = AB + A’C
Proof:
AB + A’C + BC = AB + A’C + (A + A’) BC
= AB + A’C + ABC + A’BC
= AB + ABC + A’C + A’BC
= AB(1+C) + A’C(1+B)
= AB + A’C
Binary Operators
x y x.y x y x+y x x’
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
x.(y+z) = (x.y)+(x.z)
x y z y+z x.(y+z) x.y x.z (x.y)+x.z
0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0
0 1 0 1 0 0 0 0
0 1 1 1 0 0 0 0
1 0 0 0 0 0 0 0
1 0 1 1 1 0 1 1
1 1 0 1 1 1 0 1
1 1 1 1 1 1 1 1
Switching Functions
• Switching functions are also called as Boolean Functions
Product terms
• Each of these sum of products expression consist of
two or more product terms (AND) that are ORed
together
• Each product term consists of one or more literals,
appear in either complemented or uncomplemented
form
• The sum of products form is also known as
disjunctive normal form
Product Of Sums (POS)
• A product of sums is group of sum terms ANDed
together.
E xample: Product
f(A,B,C) = (A + B) . (B’ + C)
Sum terms
• Product of sums expression consist of two or more
sum terms (OR) that are ANDed together.
• Each sum term consists of one or more literals,
appear in either complemented or an
uncomplemented form.
• The product of sums form is also known as
conjunctive normal form
Canonical Forms
• The canonical forms are the special
cases of Sum Of Product (SOP) and
Product Of Sum (POS) forms
• These are also known as standard
Sum Of Product(SOP) and standard
Product Of Sum (POS) forms
Standard SOP Form
• In the SOP form all the individual terms do not involve all
literals.
• Example: AB + ABC’
• If each term in SOP form contains all the literals, then the
SOP form is known as Standard or canonical SOP form.
• Each individual term in standard SOP form is called
minterm. So it also called as minterm canonical form.
• Example: f(A,B,C) = A B’C + A B C + A’ B C’
Each product term consists of all literals in either
complemnted or uncomplemented form
• Example2: Simplify the following three variable expression
using Boolean algebra, Y =
= C’ + A’ B’
Standard POS form
• If each term in POS form contains all the
literals, then the POS form is known as
standard or canonical POS form.
• Each individual term in the standard POS form
is called maxterm. So it is also known as
maxterm canonical form
Example: f(A,B,C) = (A + B+ C) . (A + B’
+ C)
Each sum term consists of all literals in
either complemnted or un complemnted form
Converting expressions in to standard
SOP or POS form
• Steps to convert SOP to Standard
SOP form:
– Step1: Find the missing literal in each product
term.
– Step2: AND each product term having missing
literal with term formed by ORing the literal
and its complement.
– Step3: Expand the terms by applying
distributive law and reorder the literals in the
product terms.
– Step4: Reduce the expression by omitting
repeated product terms, if any. Because A + A =
A.
Example
• Convert the given expression in to standard
SOP form
f(A,B,C) = AC + AB + BC
• Solution:
Step1: Find the missing literal in each
product term.
f(A,B,C) = AC + AB + BC
Literal B is missing
Literal A is missing
Literal C is missing
• Step2: AND product term with (missing literal + its
complement).
Original product terms
f(A,B,C) = AC . (B+B’) + AB . (C+C’) + BC .
(A+A’)
Missing Literals and their
complements
• Step3: Expand the terms and reorder literals
Expand: f(A,B,C) = ACB +ACB’ + ABC + ABC’ +
BCA + BCA’
Reorder: f(A,B,C) = ABC + AB’C + ABC + ABC’ +
ABC + A’BC
• Step4:Omit repeated product terms
f(A,B,C) = ABC + AB’C + ABC +
ABC’ +ABC + A’BC
= (A + B + C) ( A + B’ + C) (A + B + C’) (A + B’ + C’)
( A+ B+ C)
• Step4: Omit repeated sum terms
f(A,B,C) = (A + B + C) (A + B’ + C) (A + B + C’) (A
+ B’ + C’) (A + B + C)
f(A,B,C) = (A + B + C) (A + B’ + C) (A + B + C’) (A
+ B’ + C’)
----Standard POS
form (Canonical form)
M-Notations : Minterms and Maxterms
• Minterm is a product term having all the variables of
the function either in its normal or complimented
form
• Each individual term in standard SOP form is called
Minterm
• Maxterm is a sum term having all the variables of
the function either in its normal or complimented
form
• Each individual term in standard POS form is called
Maxterm
• For an n-variable logical function there are 2 n
minterms and an equal number of maxterms.
Minterms and Maxterms for Three Variables
•Each minterm is represented by m i .
•Each maxterm is represented by Mi .
• Where i is the decimal number equilent of the
binary number
Examples
• Minterms:
f( A,B,C) = A’ B’ C’ + A’ B’C + A’ B C +
A B C’
= m0 + m 1 + m3 + m6 =
• Maxterms:
f( A,B,C) = (A + B + C’) (A + B’ + C’) (A’ + B’ + C)
= M1 . M3 . M6 = Л M (1, 3 ,6)
Where Л denotes product of sums and