SlideShare a Scribd company logo
1 of 143
Digital Electronics
• Number systems (Decimal, Binary, Octal and
Hexadecimal)
• One’s and two’s complements
• Binary codes (weighted and non-weighted codes)
• Boolean algebraic theorems
• Simplification of Boolean expressions
• Logic gates
• Implementation of Boolean expressions using logic gates
• Standard and canonical forms of Boolean expression,
POS and SOP forms
• Simplification of Boolean expressions using K-map
• Basics of Flip-flops and its applications.
• “There are 10 types of people in this
world, one who believe in God and
another who don’t.”
Introduction
• 4 types of signals
• 1—continuous time-continuous amplitude
signal
• 2 -- continuous time-discrete amplitude
signal(digital signal—binary signals)
• 3--- Discrete time-continuous amplitude
signal
• 4--- Discrete time-Discrete amplitude signal
•
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Difference between analogue and
Digital signals
• Analog signal more prone to noise
• Analog signal has complete information
• Digital signal can produce approximate
information.
• Processing tool for digital signal are available.
• Mathematical operations become simple
Number Systems and Binary
Arithmetic
• Most number systems are order dependent
• Decimal
123410 = (1  103) + (2  102) + (3  101) + (4  100)
• Binary
11012 = (1  23) + (1  22) + (0  21) + (1  20)
• Octal
1238 = (1  82) + (2  81) + (3  80)
• Hexadecimal
12316 = (1  162) + (2  161) + (3  160)
here we need 16 characters – 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Number conversion
– conversion Binary to decimal
• add up decimal equivalent of individual digits
Example –
Convert 110102 to decimal
110102 = (1  24) + (1  23) + (0  22) + (1  21) + (0  20)
= 16 + 8 + 0 + 2 + 0
= 2610
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Decimal to Binary
• repeatedly divide by the base and remember the remainder
Example –
Convert 2610 to binary
Number Remainder
Starting point 26
 2 13 0
 2 6 1
 2 3 0
 2 1 1
 2 0 1
read number from this end
=11010
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Other number system to Decimal
• Any number an-1an-2....a2a1a0 at base r may be
represented in decimal number system as
• (an-1an-2....a2a1a0 )r=
(an-1Xrn-1+an-2Xrn-2+...+ a2 Xr2+a1r1+a0Xr0)10
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Decimal to other number system
• Any decimal number can be represented in other
number system by successively dividing the
decimal number by the base of the new number
system till quotient becomes zero. Remember the
remainder after each division and write them in
reverse order.
• Decimal number is represented using ten symbols-
--0,1,2,....9.
• Hexadecimal---0,1,2,....,9,A,B,C,D,E,F.
• Octal---0,1,2,...,6,7.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Among Octal, Hexadecimal and Binary
• 3 bit of binary are used to represent 1 Octal
symbol. (make triplets starting from right most
side)
• 4 bit of binary are used to represent 1
Hexadecimal symbol. (make quadruples
starting from right most side)
• OctalBinary Hexadecimal
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Exercise
• (47)10=(?)2, (2351) 10=(?)16, (612) 10=(?)7
• (1101010) 2 =(?) 7, (101110) 2 =(?) 16,
(10011010) 2 =(?) 10
• (147) 7 =(?) 10, (278) 7 =(?) 16, (109) 7 =(?) 2
• (ABC) 16 =(?) 10, (1A0) 16 =(?) 2, (2F1) 16 =(?) 7
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Number Representation: Negative
Numbers
1. Signed and Magnitude Representation
2. Signed 1’s Complement Representation
3. Signed 2’s Complement Representation
Sign Magnitude
1 negative number, 0 positive number
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
1’s complement
• 10 and 01
• That is
• 1’s complement of x=11001 (25) is calculated as—
• 11111
• -11001
• ------------
• 00110
• Or in other word replace 0 by 1 and 1 by 0.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
1’s complement
• Or in other words
• 1’s complement of x is 2n-1-x;
• That is for 5 bit number on previous slide 1’s
complement is 25-1-25=6(00110).
• 1’s complement of a positive number is same
as binary number
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
2’s complement
• Add 1 to 1’s complement
• Or start from LSB and upto 1st one (1) dont flip
then after that flit the bits.
• E. G. 010010 to converted to 2’s complement
• Start from LSB and upto 10 no flipping, after that
flip (0100) hence we get 1011(10). As 2’s
complement.
• 2’s complement of a positive number is same as
binary number
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Arithematic with 1’s complement
To perform subtraction
• y-x = y+(2n-1-x)-2n +1
• That is add y with 1’s complement of x and
bring carry (-2n) back to the result (+1)
• E.g. 1101(13)-0110(6)=0111(7)
• Take 1’s complement of 0110=>1001
• Add to Augend 1101+1001=(1 carry)0110
• The result is in 1’s complement form
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Arithmetic Operations: 1’s Complement
Input: two positive integers x & y,
1. We represent the operands in one’s complement.
2. We sum up the two operands.
3. We delete 2n-1 if there is carry out at left.
4. The result is the solution in one’s complement.
Arithmetic 1’s complement
x + y x + y
x - y x + (2n -1- y) = 2n-1+(x-y)
x – y(y>x) (2n -1-y) + x =2n-1-(y-x)=2n-1-z=1’s comp no
carry
-x - y (2n -1-x) + (2n -1-y) = 2n-1+(2n-1-(x+y))
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
18
Arithmetic Operations: Example: 4 – 3 = 1
0100 (4 in decimal )
+ 1100 (12 in decimal or 15-3 )
1,0000 (16 in decimal or 15+1 )
0001(after deleting 2n-1)
410 = 01002
310 = 00112 -310 11002 in one’s complement
We discard the extra 1 at the left which is 2n and add one
at the first bit.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
19
Arithmetic Operations: Example: -4 +3 = -1
1011 ( 11 in decimal or 15-4 )
+ 0011 ( 3 in decimal )
1110 ( 14 in decimal or 15-1 )
410 = 01002 -410  Using one’s comp. 10112
(Invert bits)310 = 00112
If the left-most bit is 1, it means that we have a negative
number.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
20
Example: – 4 – 3 = – 7
4 in binary = 0100.
Flipping the bits, you get –4 (1011) in binary.
3 in binary = 0011.
Flipping the bits, you get –3 (1100) in binary.
1011 (11 in decimal, or 15-4)
+ 1100 (12 in decimal, or 15-3)
-----------------------------------------
1,0111 (23 in decimal (15+15-7))
So now take the extra 1 and remove it from the 5th spot and add it
to the remainder
0111
+ 1
------------------------------------------
1000 (-7 in 1’s comp)
One’s Complement
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Arithmetic in 2’s complement
When both nos. Positive
4+3=7
4=0100
3=0011
0100
+0011
---------
0111
--------
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Arithmetic in 2’s complement
When first > second
4-3=1
4=0100
3=0011
-3=1101
Hence
0100
+1101
---------
1)0001
Discard carry
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
When first < second
-4+3=-1
+4=0100
-4=1100
3=0011
Hence
1100
+0011
---------
1111
1st bit is 1 negative no. (in 2’s complement form)
Take 2’s complement again to get the magnitude
Arithmetic in 2’s complement
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Arithmetic in 2’s complement
When both nos. negative
-4-3=-7
+4=0100
-4=1100
+3=0011
-3=1101
Hence
1100
+1101
---------
1)1001(2’s complement of 7) discard carry
1st bit is 1 negative no. (in 2’s complement form)
Take 2’s complement again to get the magnitude
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Over flow detection in 1’s and
2’s complement
•If the sum of two positive numbers yields a negative result,
the sum has overflowed.
•If the sum of two negative numbers yields a positive result,
the sum has overflowed.
•Otherwise, the sum has not overflowed.
•Is there a carry into sign bit position?
•Is there a carry out of sign bit position?
•If step 2 and step 3 results are not equal then the overflow
condition is detected.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
-7-7
01111001(2’s compl)
Hence
1001
+1001
--------
1)0010 (carry into sign
bit =0 and out of it=1)
Example
-7-7
01111000(1’s compl)
Hence
1000
+1000
--------
1)0000 (carry into sign
bit =0 and out of it=1)
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Signed Magnitude
•Two representations
of zero
inefficiency and
confusion
•+ve and –ve
numbers need to be
processed separately
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
1’s complement
•Two representations
of zero
inefficiency and
confusion
•+ve and –ve
numbers need to be
processed separately
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Signed 2’s complement
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Comparison
Parameter Signed magnitude Signed 1’s
complement
Signed 2’s
complement
Representation Only sign bit is kept
different for +ve
and –ve no.
-ve no is obtained
by flipping the bit in
magnitude part
Is obtained by
adding 1 to 1’s
complement
Range(total n bits) -(2n-1-1) to +(2n-1-1) -(2n-1-1) to +(2n-1-1) -2n-1 to +(2n-1-1)
Representation of
Zero
Two different
representations
Two different
representations
Only one
representation
Processing of +ve
and –ve nos.
Different Different Same
Arithmetic Complex Complex Simple
Overflow detection From carry into sign
bit
From carry into and
out of carry bit
From carry into and
out of carry bit
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
31
1's Compliment
Let f(x) = 2n -1 -x
Theorem: f(f(x)) = x
Proof: f (f(x))
= f (2n - 1 - x)
= 2n - 1 - (2n -1 - x)
= x
Recovery of the Numbers
2's Compliment
Let g(x) = 2n - x
Theorem: g(g(x)) = x
Proof: g(g(x))
= g(2n - x)
= 2n - (2n - x)
= x
Numeric and Alphanumeric Codes
• Binary code
– by far the most
common way of
representing numeric
information
– has advantages of
simplicity and efficiency
of storage
BinaryDecimal
0
1
10
11
100
101
110
111
1000
1001
1010
1011
1100
etc.
0
1
2
3
4
5
6
7
8
9
10
11
12
etc.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Binary Coded Decimal (BCD code)
• Each digit is represented by 4 bit binary code
• 23 is represented as
• 0010 0011
• 67 is represented as
• 0110 0111
• Some bit are unused
• Easy for human understanding
Numeric and Alphabetic Codes
 Binary-coded decimal code
 formed by converting each
digit of a decimal number
individually into binary
 requires more digits than
conventional binary
 has advantage of very easy
conversion to/from decimal
 used where input and output
are in decimal form
BinaryDecimal
0
1
10
11
100
101
110
111
1000
1001
10000
10001
10010
etc.
0
1
2
3
4
5
6
7
8
9
10
11
12
etc.
Numeric and Alphabetic Codes
• ASCII code
– American Standard Code for Information Interchange
– an alphanumeric code
– each character represented by a 7-bit code
• gives 128 possible characters
• codes defined for upper and lower-case alphabetic
characters,
digits 0 – 9, punctuation marks and various non-printing
control characters (such as carriage-return and backspace)
Numeric and Alphabetic Codes
• Error detecting and correcting codes
– adding redundant information into codes allows
the detection of transmission errors
• examples include the use of parity bits and checksums
– adding additional redundancy allows errors to be
not only detected but also corrected
• such techniques are used in CDs, mobile phones and
computer disks
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Numeric and Alphabetic Codes
Excess -3 code
• Obtained by adding 3 in the
number
• Excess-3 code is also known
as self complimenting code
or reflective code, as 1′s
compliment of any number
(0-9) is available within these
10 numbers.
Decimal
Number
Excess-3
Equivalent
0 0011
1 0100
2 0101
3 0110
4 0111
5 1000
6 1001
7 1010
8 1011
9 1100
Binary Quantities and Variables
• A binary quantity is one that can take only 2
states
A simple binary arrangement
S L
OPEN OFF
CLOSED ON
S L
0 0
1 1
A truth table
• A binary arrangement with two switches in
series
L = S1 AND S2
• A binary arrangement with two switches in
parallel
L = S1 OR S2
• Three switches in series
L = S1 AND S2 AND S3
• Three switches in parallel
L = S1 OR S2 OR S3
• A series/parallel arrangement
L = S1 AND (S2 OR S3)
• Representing an unknown network
Logic Gates
• The building blocks used to create digital circuits
are logic gates
• There are three elementary logic gates and a
range of other simple gates
• Each gate has its own logic symbol which allows
complex functions to be represented by a logic
diagram
• The function of each gate can be represented by a
truth table or using Boolean notation
• The AND gate
• The OR gate
• The NOT gate (or inverter)
• A logic buffer gate
• The NAND gate
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• The NOR gate
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• The Exclusive OR gate
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• The Exclusive NOR gate
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Gray code
• Only one bit differs for consecutive number
representation
• Easy to transmit data
• Lesser no. of bits required
• Error detection and correction easier
• a3a2a1a0a3(a3 XOR a2) (a2 XOR a1)(a1 XOR a0)
• 11011(1 XOR 1)(1 XOR 0)(0 XOR 1)
–1011
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Gray codes
Decimal Binary Gray
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 1000
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Boolean Algebra
• Boolean Constants
– these are ‘0’ (false) and ‘1’ (true)
• Boolean Variables
– variables that can only take the vales ‘0’ or ‘1’
• Boolean Functions
– each of the logic functions (such as AND, OR and NOT)
are represented by symbols as described above
• Boolean Theorems
– a set of identities and laws.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• Boolean identities
AND Function OR Function NOT function
00=0 0+0=0
01=0 0+1=1
10=0 1+0=1
11=1 1+1=1
A0=0 A+0=A
0A=0 0+A=A
A1=A A+1=1
1A=A 1+A=1
AA=A A+A=A
0 AA 1 AA
10 
01 
AA 
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Commutative law Absorption law
Distributive law De Morgan’s law
Associative law Note also
• Boolean laws
ABBA
BAAB


))((
)(
CABABCA
BCABCBA


CBACBA
CABBCA


)()(
)()(
ABAA
AABA


)(
BABA
BABA


ABBAA
BABAA


)(
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
DeMorgan’s Theorem
BABA
BABA


.
.)(
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Combinational Logic
• Digital systems may be divided into two broad
categories:
– combinational logic
• where the outputs are determined solely by the current
states of the inputs
– sequential logic
• where the outputs are determined not only by the
current inputs but also by the sequence of inputs that
led to the current state
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• Implementing a function from a Boolean
expression
Example –
Implement the function
CBAX 
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• Implementing a function from a Boolean
expression
Example –
Implement the function
DCBAY 
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• Generating a Boolean expression from a logic
diagram
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Example (continued)
– work progressively from the inputs to the output
adding logic expressions to the output of each gate
turn
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• Implementing a logic function from a description
Example –
The operation of the Exclusive OR gate can be stated as:
“The output should be true if either of its inputs are true,
but not if both inputs are true.”
This can be rephrased as:
“The output is true if A OR B is true,
AND if A AND B is NOT true.”
We can write this in Boolean notation as )()( ABBAX 
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Example (continued)
The logic function
can then be implemented as before
)()( ABBAX 
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• Implementing a logic function from a truth table
Example –
Implement the function of the following truth table
A B C X
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
– first write down a Boolean
expression for the output
– then implement as before
– in this case
– By looking at when X=1
CBACBACBAX 
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Example (continued)
The logic function
can then be implemented as before
CBACBACBAX 
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• In some cases it is possible to simplify logic
expressions using the rules of Boolean algebra
Example –
can be simplified to
hence the following circuits are equivalent
CAACBCAABCX 
ABCX 
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Boolean expression simplefication
• Prove that x+yz=(x+y)(x+z)
• RHS=(x+y)(x+z)
• =x.x+x.z+y.x+y.z; using distributive property
• =x+x.z+x+y.x+y.z; x+x=x
• =x(1+z)+x(1+y)+y.z; taking common
• =x+x+y.z; as 1+x=x
• =x+y.z
• proved
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Contd...
• Prove that x(x’+y)=xy
• LHS=x(x’+y)
• =x.x’+x.y
• =x.y; as x.x’=0.
• proved
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Contd...
• Simplify f(x,y,z)=x’y’z+ x’yz+ xy’
• x’y’z+ x’yz+ xy’
• =x’z(y’+y)+xy’
• =x’z+xy’; As y+y’=1
• Answer
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Contd...
• Simplify f(x,y,z)=xy+x’z+yz
• xy+x’z+yz
• = xy+x’z+yz(x+x’)
• = xy+x’z+yzx+yzx’
• =xy(1+z)+x’z(1+y)
• =xy+x’z; as 1+z=1
• Answer
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Contd...
• Prove that (x+y)(x’+z)(y+z)=(x+y)(x’+z)
• LHS=(x+y)(x’+z)(y+z)=(xx’+xz+yx’+yz)(y+z)
• =xyz+yx’+yz+xz+x’yz+yz; as xx’=0, xx=x
• =xx’+xyz+yz+xyz+xz+yx’+x’yz+yz; adding xx’=0
and xyz
• =xx’+yz(1+x)+xz(1+y)+yx’+yz(1+x’)
• =xx’+yz+xz+yx’+yz;
• =xx’+yz+xz+yx’; removing extra yz
• =(x+y)(x’+z)
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Exercise...
• Simplify...
• 1. x’y’+xy+x’y
• 2. (x+y)(x+y’)
• 3. x’y+xy’+xy+x’y’
• 4. x’+xy+xz’+xy’z’
• 5. xy’+y’z’+x’z’
• 6. x’yz+xz
• 7. (x+y)’(x’+y’)
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Key Points
• It is common to represent the two states of a binary variable by
‘0’ and ‘1’
• Logic circuits are usually implemented using logic gates
• Circuits in which the output is determined solely by the current
inputs are termed combinational logic circuits
• Logic functions can be described by truth tables or using
Boolean algebraic notation
• Binary digits may be combined to form digital words
• Digital words can be processed using binary arithmetic
• Several codes can be used to represent different forms of
information
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Minterms
• Variables x, y
• x.y, x’.y, x.y’, x’.y’ 4 possible combinations
• Called minterms
• For n variables 2n minterms
• Each minterm is obtained from AND of n-
variables
• Minterm for 010 binary variable value is x’.y.z’.
• Primed variable for 0 and un-primed for 1.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Maxterms
• Variables x, y
• X+y, x’+y,x+y’, x’+y’ possible combinations
• Called maxterms
• For n variables 2n maxterms
• Each maxterm is obtained from OR of n-variables
• Maxterm for 010 binary variable value is x+y’+z.
• Primed variable for 1 and un-primed for 0.
• Maxterm and minterms are primed of each other
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Function in terms of minterms and maxterms
+equivalent to ORing
.equivalent to ANDing
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
• Any Boolean function can be written as sum of
minterms
• f1’ is sum of minterms corresponding to 0
value of f1.
If we take complement of it again
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Canonical Form
• Hence any Boolean function can be written as sum
of minterms.
• Any Boolean function can be written as product of
maxterms.
• Form a maxterm for each combination of the
variables that produces a 0 in the function and
then form AND of those terms
• Boolean function expressed as sum of minterms
or product of maxterms are said to be in canonical
form.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Examples...
• Express F=A+B’C in a sum of minterms.
• F=A+B’C (function must contain all variables)
• =A(B+B’)(C+C’)+B’C(A+A’)
• =ABC+ABC’+AB’C+AB’C’+AB’C+A’B’C
• = ABC+ABC’+AB’C+AB’C’+A’B’C
• =m7+m6+m5+m4+m1
• =m1+m4+m5+m6+m7
• F(A,B,C)=Σ(1,4,5,6,7)
• ANSWER
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Examples...
• Express Boolean function F=xy+x’z in a
product of maxterms.
• Using distributive property {A+BC=(A+B)(A+C)}
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Removing repeated terms we get
Or, conveniently we express it as
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Examples
1.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
2.
3.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Conversion between canonical
forms (minterms & Maxterms)
• Consider
Its complement can be expressed as
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Standard forms (SOP & POS)
• Need not have all literals(variables)
• Has two forms Sum of Products (SOP) and
Product of Sums (POS)
• SOP
• POS 
• Neither POS nor SOP non standard
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Map Method of simplification
• Karnaugh Map Method:
• n-variable 2n squares
• Each square  minterm
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Simplification...
• 3-variable K-map
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Simplification using K-map
• Make suitable K-map2X 2 squares for 2 variable,
4X4 square for 3 variables
• Mark literal value of each square in the corners
• If minterms are given mark 1’s in the given literal
value position in the map
• If maxterms are given  mark 0’s in the given literal
value
• Try to make quadruples by taking Neighbours
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Simplification using K-map
• If some positions are left make pairs of Neighbours
• Make singleton of leftovers
• For each quadruples move horizontally and vertically
and write literal that remains unchanged in require form
(minterm or maxterm)
• If quadruple is verticle or horizontal only (covering a
column or row) both variables in the line will disappear.
• For each pair move horizontally or vertically and write
literal that remains unchanged in required form (minterm
or maxterm)
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Examples...
• Simplify the following function in (a) sum of
products (b) product of sums
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
0 1 3 2
4 5 7 6
12 13 15 14
8 9 11 10
10 11
3
12
4
15
7 6
12 13 15 14
18 19
11
110
AB
Hence
F=A’D’+B’D’+A’BC’
CD 00
00
01
01
11
11 10
10
A’D’
B’D’
A’BC’
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Multiple solutions
10
1
13 12
4
15 17
6
12
113 115
14
18 19 111 110
AB
CD 00
00
01
01
11
11 10
10
B’D’
AB
BD
F=B’D’+CD’+BD+AB
CD’
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Multiple solutions
10
1
13 12
4
15 17
6
12
113 115
14
18 19 111 110
AB
CD 00
00
01
01
11
11 10
10
B’D’
AD’
BD
F=B’D’+CD’+BD+AD’
CD’
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Don’t care conditions
10
1
13 12
4
15 d7
6
d12 113 d15
14
18 19 111 110
AB
CD 00
00
01
01
11
11 10
10
B’D’
AD’
BD
F=B’D’+CD’+BD+AD’
CD’
F=Σ(0,2,3,5,8,9,10,
11,13)+d(7,12,15)
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
NAND and NOR Implementations:
• NAND and NOR Gates
– Universal Gates: Any digital circuit can be
implemented with NAND or NOR gates alone
• Most appropriate Boolean function
implementation:
• Two-level Implementations using NAND or NOR gates:
Less propagation delay and simple structure.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
NAND Gate As Universal Gate:
X
X
F = (X•X)’
= X’+X’
= X’
X
Y
Y
F = ((X•Y)’)’
= (X’+Y’)’
= X’’•Y’’
= X•Y
F = (X’•Y’)’
= X’’+Y’’
= X+Y
X
X
F = X’
X
Y
Y
F
X•Y
F =
X+Y
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
NAND Circuits
• To easily derive a NAND implementation of a
Boolean function:
– Find a simplified SOP
– SOP is an AND-OR circuit
– Change AND-OR circuit to a NAND circuit
– Use the alternative symbols below: Bubbled ORNAND
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
AND-OR (SOP) Two-level implementations
Using NANDs
G=WXY+YZ
a) Original SOP: AND-OR
b) Implementation with NANDs
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
AND-OR (SOP) Two-level implementations
Using NANDs
Verify:
(a) G = WXY + YZ
(b) G = ( (WXY)’ • (YZ)’ )’
= (WXY)’’ + (YZ)’’ = WXY + YZ
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Two-Level NAND Gate Implementation
- Example
F (X,Y,Z) = m(0,6)
1. Express F in SOP form using K-Map:
F = X’Y’Z’ + XYZ’
2. Obtain the AND-OR implementation for F.
3. Add bubbles and inverters to transform AND-
OR to NAND-NAND gates.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Example (cont.)
Two-level implementation with NANDs
F = X’Y’Z’ + XYZ’
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
NOR Gate
• Also a “universal” gate because ANY digital
circuit can be implemented with NOR gates
alone.
• This can be similarly proven as with the NAND
gate.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
NOR Circuits
• To easily derive a NOR implementation of a Boolean
function:
– Find a simplified POS
– POS is an OR-AND circuit
– Change OR-AND circuit to a NOR circuit
– Use the alternative symbols below: Bubbled ANDNOR
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Two-Level NOR Gate Implementation -
Example
F(X,Y,Z) = m(0,6)
1. Express F in POS form using K-Map:
F= (X'+Y)(X+Y')Z'
2. Obtain the OR-AND implementation for F.
3. Add bubbles and inverters to transform OR-AND
implementation to NOR-NOR implementation.
Practice some example to express a function in SOP or POS for
using K-map
Hint- when 0’s are considered we write maxterms and get POS
form of function
-when 1’s are considered we write minterms and get SOP form
of function
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Example (cont.)
Two-level implementation with NORs
F = (F’)' = (X'+Y)(X+Y')Z'
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Practice Problems:
• Assuming that normal and complement inputs
are available, implement following Boolean
function using minimum number of gates
mentioned---
F=AB’+ABD+ABD’+A’C’D’+A’BC’---NAND Gates
only
F=BD+BCD’AB’Ç’D’—NOR gates only
F=(A+D)(A’+B’)(A’+C’)—NAND Gates only
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Summary: Two level implementation
of Boolean Function
Form of Function Basic Implementation Equivalent universal logic
implementation
SOP AND-OR NAND-NAND
POS OR-AND NOR-NOR
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
STORAGE ELEMENTS:
• Maintain a binary state indefinitely as long as
power is delivered to the circuit
• Latches: Binary state changes with signal
levels: Level Triggered
• Flip-flops: Binary state changes with signal
transitions: Edge Triggered
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Core of a Flip-Flop:
The set–reset or SR Latch
• Acts as a simple memory with two stable states at
the two output when S = R = 0
– Q1 and Q2 are the outputs of the S-R latch.
– When Q1 is known as Q and Q2 is also called Q’ or
(spoken as Q bar), meaning that its value is not Q or the
opposite of Q.
Q
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Working of NAND gate...
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Working...
Qt S R Qt+1 Q’t+1 Comment
0 0 0 0 1 No change
0 0 1 0 1 Reset
0 1 0 1 0 Set
0 1 1 1 1 Invalid
1 0 0 1 0 No change
1 0 1 0 1 Reset
1 1 0 1 0 Set
1 1 1 1 1 Invalid
0
0
1
1
1
0
1
0
Q(t+1)=(Q’(t). S’)’=Q(t)+S
Q’(t+1)=(Q(t). R’)’=Q’(t)+R
Q(t) Present state (value)
Q(t+1) Next state (value)
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
S-R Latch
•The latch
-holds (stores) when S = R = 0
-is set (to 1) by bringing S = 1 with R = 0
-is reset (to 0) or cleared by bringing R = 1 with S = 0
•The condition S = R = 1 must be avoided because it leads to an
indeterminate condition, where the output can not be predicted
at any one point in time. This can cause a race condition to
occur when the inputs change to S = R = 0.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
SR Latch with Enable
•The S and R inputs only effect the output states when the
enable input C is high.
– This controls when the latch responds to its inputs.
•The latch holds (retains previous state) its value while the
enable input is low — latches it!
•Any changes in the inputs during the time when enable is high
will affect the output immediately: the circuit is said to be
transparent.
•This circuit still has a major problem: the stored value is
indeterminate if S = R = 1 when the clock goes low
0
1
1
Q
Q’
Q’
Q
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Logic Table
SR Latch
S R Q
0 0 Last Q
0 1 0
1 0 1
1 1 ??
SR Latch with Enable
S R E Q
0 0 1 Last Q
0 1 1 0
1 0 1 1
1 1 1 ???
X X 0 Last Q
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Race condition
Circuit Boolean Logic
• Q1(t+1)=(S’.Q2(t))’
• =S+Q’2(t)
• Q2(t+1)=(R’.Q1(t))’
• =R+Q’1(t)
• When S=R=0; with Q1=Q2=1
• Q1(t+1)=Q’2(t)
• Q2(t+1)=Q’1(t)
• Keep on toggling
01010.... racing
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Timing Diagram
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Timing Diagram
No Initial Condition
Propagation Delay Time
Indeterminate Condition, Q = Q’
Followed by a Race Condition
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Working of NOR gates...
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Latches: SR Latch with NOR gates
The SR latch is a circuit with two cross-coupled NOR gates or
two cross-coupled NAND gates. It has two inputs labeled S
for set and R for reset.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
SR Latch with NAND Gates
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Graphic Symbols for Latches
126
A latch is designated by a rectangular block with inputs on
the left and outputs on the right. One output designates the
normal output, and the other designates the complement
output.
NOR Latch: Active High Inputs NAND Latch: Active Low Inputs
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
SR Latch with Control (Enable) Input
The operation of the basic SR latch can be modified by
providing an additional control input that determines when
the state of the latch can be changed. It consists of the basic
SR latch and two additional NAND gates.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Symbol:
128
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
D-Latch and Symbol:
129
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Flip-Flops
The state of a latch or flip-flop is switched by a change in
the control input. This momentary change is called a trigger
and the transition it cause is said to trigger the flip-flop. The
D latch with pulses in its control input is essentially a flip-flop
that is triggered every time the pulse goes to the logic 1
level. As long as the pulse input remains in the level, any
changes in the data input will change the output and the
state of the latch.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Clock Response in Latch
In Fig (a) a positive level response in the control input
allows changes, in the output when the D input changes
while the clock pulse stays at logic 1.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Clock Response in Flip-Flop
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Latches and Flip Flops
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Edge-Triggered D Flip-Flop
The first latch is called the master and the second the
slave. The circuit samples the D input and changes its output
Q only at the negative-edge of the controlling clock.
CLK 1 0 1 0 1 0
D 1 1 0 0 1 1 …
Y 1 1 0 0 1 1 …
Q ? 1 1 0 0 1 ….
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Graphic Symbol for Edge-Triggered D Flip-Flop
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
JK Flip-Flop
There are four operations that can be performed with a flip-
flop: set it to 1, reset it to 0, no change, complement its
output. The JK flip-flop performs all four operations. The
circuit diagram of a JK flip-flop constructed with a D flip-
flop and gates.
Q=J.Q’+K’.Q
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Operation...
Q=J.Q’+K’.Q
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
JK Flip-Flop
The J input sets the flip-flop to 1, the K input resets it to 0, and
when both inputs are enabled, the output is complemented.
This can be verified by investigating the circuit applied to the
D input:
D = J Q` + K` Q
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
T (Toggle) Flip-Flop
The T flip-flop is a complementing flip-flop and can be
obtained from a JK flip-flop when inputs J and K are tied
together.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
T Flip-Flop
140
The T flip-flop can be constructed with a D flip-flop and an
exclusive-OR gates as shown in Fig. (b). The expression
for the D input is D = T Q = TQ` + T`Q
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Flip-Flop Characteristic
Equations
D flip-flop Characteristic Equations
Q(t + 1) = D
JK flip-flop Characteristic Equations
T flip-flop Characteristic Equations
Q(t + 1) = JQ` + K`Q
Q(t + 1) = T Q = TQ` + T`Q
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Comparison:
142
Flip Flop SR D JK T
No of
Inputs
2 1 2 1
No of
Operations
3 2 4 2
Invalid
State?
Yes No No No
Toggle
State?
No No Yes Yes
Applicatio
n
Set-Reset
Circuit
Controlled
Data
Transfer,
Registers
Counters Counters
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
Lecture Review Questions
1. What is the fundamental difference between combinational and
sequential logic?
2. What inputs should you put on a SR flip-flop to set it (to 1)?
3. Why must S = R = 1 be avoided?
4. Why do sequential logic circuits need a clock?
5. What is meant by the term edge-triggered flip-flop?
6. Describe the operation of a type D flip-flop. For what are they used?
Describe the operation of a JK flip-flop with J = K = 1.
7. Why do some flip-flops have control inputs? In what ways do they differ
from the normal inputs, such as J and K?
8. What is the propagation delay? Why is it important?

More Related Content

What's hot (20)

Complements
ComplementsComplements
Complements
 
Race around and master slave flip flop
Race around and master slave flip flopRace around and master slave flip flop
Race around and master slave flip flop
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
Encoder
EncoderEncoder
Encoder
 
Number system logic gates
Number system logic gatesNumber system logic gates
Number system logic gates
 
Decimal adder
Decimal adderDecimal adder
Decimal adder
 
Bcd
BcdBcd
Bcd
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Number System
Number SystemNumber System
Number System
 
KMAP
KMAPKMAP
KMAP
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexers
 
module1:Introduction to digital electronics
module1:Introduction to digital electronicsmodule1:Introduction to digital electronics
module1:Introduction to digital electronics
 
digital logic design number system
digital logic design number systemdigital logic design number system
digital logic design number system
 
Memory elements
Memory elementsMemory elements
Memory elements
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Introduction to binary
Introduction to binaryIntroduction to binary
Introduction to binary
 
All flipflop
All flipflopAll flipflop
All flipflop
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 

Similar to Digital Electronics and Computer Language

UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptxamudhak10
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptxamudhak10
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfMdJubayerFaisalEmon
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptxGobinathAECEJRF1101
 
Module 4_Digital Electronics till complements.pdf
Module 4_Digital Electronics till complements.pdfModule 4_Digital Electronics till complements.pdf
Module 4_Digital Electronics till complements.pdfmanjunath V Gudur
 
Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:Asif Iqbal
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptxsulekhasaxena2
 
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...Hsien-Hsin Sean Lee, Ph.D.
 
Digital Fundamental Learning for the Students
Digital Fundamental Learning for the StudentsDigital Fundamental Learning for the Students
Digital Fundamental Learning for the Studentsshaival
 
Number_Systems_and_Boolean_Algebra.ppt
Number_Systems_and_Boolean_Algebra.pptNumber_Systems_and_Boolean_Algebra.ppt
Number_Systems_and_Boolean_Algebra.pptVEERA BOOPATHY E
 
Digital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfDigital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfKannan Kanagaraj
 
About the computer of the important field
About the computer               of the important fieldAbout the computer               of the important field
About the computer of the important fieldshubhamgupta7133
 

Similar to Digital Electronics and Computer Language (20)

UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdf
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx
 
Alu1
Alu1Alu1
Alu1
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
 
Module 4_Digital Electronics till complements.pdf
Module 4_Digital Electronics till complements.pdfModule 4_Digital Electronics till complements.pdf
Module 4_Digital Electronics till complements.pdf
 
Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...
 
Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
 
Digital Fundamental Learning for the Students
Digital Fundamental Learning for the StudentsDigital Fundamental Learning for the Students
Digital Fundamental Learning for the Students
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
Number_Systems_and_Boolean_Algebra.ppt
Number_Systems_and_Boolean_Algebra.pptNumber_Systems_and_Boolean_Algebra.ppt
Number_Systems_and_Boolean_Algebra.ppt
 
DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
Digital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfDigital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdf
 
DIGITAL ELECTRONICS.pptx
DIGITAL ELECTRONICS.pptxDIGITAL ELECTRONICS.pptx
DIGITAL ELECTRONICS.pptx
 
digitalelectronics.ppt
digitalelectronics.pptdigitalelectronics.ppt
digitalelectronics.ppt
 
About the computer of the important field
About the computer               of the important fieldAbout the computer               of the important field
About the computer of the important field
 

More from Manthan Chavda

Inventory control (management)
Inventory control (management)Inventory control (management)
Inventory control (management)Manthan Chavda
 
Forecasting of demand (management)
Forecasting of demand (management)Forecasting of demand (management)
Forecasting of demand (management)Manthan Chavda
 
linear transformation and rank nullity theorem
linear transformation and rank nullity theorem linear transformation and rank nullity theorem
linear transformation and rank nullity theorem Manthan Chavda
 
Types of communication
Types of communicationTypes of communication
Types of communicationManthan Chavda
 
Preparing for Interview
Preparing for InterviewPreparing for Interview
Preparing for InterviewManthan Chavda
 
Normal distribution for probability
Normal distribution for probability Normal distribution for probability
Normal distribution for probability Manthan Chavda
 
Ztable for normal distribution
Ztable for normal distribution Ztable for normal distribution
Ztable for normal distribution Manthan Chavda
 
Shear force and bending moment diagram
Shear force and bending moment diagram Shear force and bending moment diagram
Shear force and bending moment diagram Manthan Chavda
 
Book maretial science-callister
Book maretial science-callisterBook maretial science-callister
Book maretial science-callisterManthan Chavda
 
Application of interpolation and finite difference
Application of interpolation and finite differenceApplication of interpolation and finite difference
Application of interpolation and finite differenceManthan Chavda
 
Numbering Metals and Alloy (UNS)ASTM – E 527 - 83
 Numbering Metals and Alloy (UNS)ASTM – E 527 - 83 Numbering Metals and Alloy (UNS)ASTM – E 527 - 83
Numbering Metals and Alloy (UNS)ASTM – E 527 - 83Manthan Chavda
 
ASTM E 209 compression test at elevated temprature with conventional and r...
ASTM E 209 compression test at elevated  temprature  with  conventional and r...ASTM E 209 compression test at elevated  temprature  with  conventional and r...
ASTM E 209 compression test at elevated temprature with conventional and r...Manthan Chavda
 
ASTM E6 : MEASUREMENT & CALIBRATION
ASTM E6 : MEASUREMENT & CALIBRATIONASTM E6 : MEASUREMENT & CALIBRATION
ASTM E6 : MEASUREMENT & CALIBRATIONManthan Chavda
 

More from Manthan Chavda (20)

Inventory control (management)
Inventory control (management)Inventory control (management)
Inventory control (management)
 
Forecasting of demand (management)
Forecasting of demand (management)Forecasting of demand (management)
Forecasting of demand (management)
 
Quality management
Quality managementQuality management
Quality management
 
Project management
Project management Project management
Project management
 
linear transformation and rank nullity theorem
linear transformation and rank nullity theorem linear transformation and rank nullity theorem
linear transformation and rank nullity theorem
 
Types of communication
Types of communicationTypes of communication
Types of communication
 
Preparing for Interview
Preparing for InterviewPreparing for Interview
Preparing for Interview
 
Normal distribution for probability
Normal distribution for probability Normal distribution for probability
Normal distribution for probability
 
Ztable for normal distribution
Ztable for normal distribution Ztable for normal distribution
Ztable for normal distribution
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Theory of probability
Theory of probabilityTheory of probability
Theory of probability
 
Boundary layer theory
Boundary layer theoryBoundary layer theory
Boundary layer theory
 
Shear force and bending moment diagram
Shear force and bending moment diagram Shear force and bending moment diagram
Shear force and bending moment diagram
 
Book maretial science-callister
Book maretial science-callisterBook maretial science-callister
Book maretial science-callister
 
Application of interpolation and finite difference
Application of interpolation and finite differenceApplication of interpolation and finite difference
Application of interpolation and finite difference
 
Ttt cct diagrams
Ttt cct diagramsTtt cct diagrams
Ttt cct diagrams
 
Numbering Metals and Alloy (UNS)ASTM – E 527 - 83
 Numbering Metals and Alloy (UNS)ASTM – E 527 - 83 Numbering Metals and Alloy (UNS)ASTM – E 527 - 83
Numbering Metals and Alloy (UNS)ASTM – E 527 - 83
 
ASTM E 209 compression test at elevated temprature with conventional and r...
ASTM E 209 compression test at elevated  temprature  with  conventional and r...ASTM E 209 compression test at elevated  temprature  with  conventional and r...
ASTM E 209 compression test at elevated temprature with conventional and r...
 
ASTM E6 : MEASUREMENT & CALIBRATION
ASTM E6 : MEASUREMENT & CALIBRATIONASTM E6 : MEASUREMENT & CALIBRATION
ASTM E6 : MEASUREMENT & CALIBRATION
 
ASTM E 190(bend test)
ASTM E 190(bend test)ASTM E 190(bend test)
ASTM E 190(bend test)
 

Recently uploaded

High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 

Recently uploaded (20)

High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 

Digital Electronics and Computer Language

  • 1. Digital Electronics • Number systems (Decimal, Binary, Octal and Hexadecimal) • One’s and two’s complements • Binary codes (weighted and non-weighted codes) • Boolean algebraic theorems • Simplification of Boolean expressions • Logic gates • Implementation of Boolean expressions using logic gates • Standard and canonical forms of Boolean expression, POS and SOP forms • Simplification of Boolean expressions using K-map • Basics of Flip-flops and its applications.
  • 2. • “There are 10 types of people in this world, one who believe in God and another who don’t.”
  • 3. Introduction • 4 types of signals • 1—continuous time-continuous amplitude signal • 2 -- continuous time-discrete amplitude signal(digital signal—binary signals) • 3--- Discrete time-continuous amplitude signal • 4--- Discrete time-Discrete amplitude signal •
  • 4. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Difference between analogue and Digital signals • Analog signal more prone to noise • Analog signal has complete information • Digital signal can produce approximate information. • Processing tool for digital signal are available. • Mathematical operations become simple
  • 5. Number Systems and Binary Arithmetic • Most number systems are order dependent • Decimal 123410 = (1  103) + (2  102) + (3  101) + (4  100) • Binary 11012 = (1  23) + (1  22) + (0  21) + (1  20) • Octal 1238 = (1  82) + (2  81) + (3  80) • Hexadecimal 12316 = (1  162) + (2  161) + (3  160) here we need 16 characters – 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
  • 6. Number conversion – conversion Binary to decimal • add up decimal equivalent of individual digits Example – Convert 110102 to decimal 110102 = (1  24) + (1  23) + (0  22) + (1  21) + (0  20) = 16 + 8 + 0 + 2 + 0 = 2610
  • 7. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Decimal to Binary • repeatedly divide by the base and remember the remainder Example – Convert 2610 to binary Number Remainder Starting point 26  2 13 0  2 6 1  2 3 0  2 1 1  2 0 1 read number from this end =11010
  • 8. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Other number system to Decimal • Any number an-1an-2....a2a1a0 at base r may be represented in decimal number system as • (an-1an-2....a2a1a0 )r= (an-1Xrn-1+an-2Xrn-2+...+ a2 Xr2+a1r1+a0Xr0)10
  • 9. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Decimal to other number system • Any decimal number can be represented in other number system by successively dividing the decimal number by the base of the new number system till quotient becomes zero. Remember the remainder after each division and write them in reverse order. • Decimal number is represented using ten symbols- --0,1,2,....9. • Hexadecimal---0,1,2,....,9,A,B,C,D,E,F. • Octal---0,1,2,...,6,7.
  • 10. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Among Octal, Hexadecimal and Binary • 3 bit of binary are used to represent 1 Octal symbol. (make triplets starting from right most side) • 4 bit of binary are used to represent 1 Hexadecimal symbol. (make quadruples starting from right most side) • OctalBinary Hexadecimal
  • 11. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Exercise • (47)10=(?)2, (2351) 10=(?)16, (612) 10=(?)7 • (1101010) 2 =(?) 7, (101110) 2 =(?) 16, (10011010) 2 =(?) 10 • (147) 7 =(?) 10, (278) 7 =(?) 16, (109) 7 =(?) 2 • (ABC) 16 =(?) 10, (1A0) 16 =(?) 2, (2F1) 16 =(?) 7
  • 12. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Number Representation: Negative Numbers 1. Signed and Magnitude Representation 2. Signed 1’s Complement Representation 3. Signed 2’s Complement Representation Sign Magnitude 1 negative number, 0 positive number
  • 13. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› 1’s complement • 10 and 01 • That is • 1’s complement of x=11001 (25) is calculated as— • 11111 • -11001 • ------------ • 00110 • Or in other word replace 0 by 1 and 1 by 0.
  • 14. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› 1’s complement • Or in other words • 1’s complement of x is 2n-1-x; • That is for 5 bit number on previous slide 1’s complement is 25-1-25=6(00110). • 1’s complement of a positive number is same as binary number
  • 15. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› 2’s complement • Add 1 to 1’s complement • Or start from LSB and upto 1st one (1) dont flip then after that flit the bits. • E. G. 010010 to converted to 2’s complement • Start from LSB and upto 10 no flipping, after that flip (0100) hence we get 1011(10). As 2’s complement. • 2’s complement of a positive number is same as binary number
  • 16. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Arithematic with 1’s complement To perform subtraction • y-x = y+(2n-1-x)-2n +1 • That is add y with 1’s complement of x and bring carry (-2n) back to the result (+1) • E.g. 1101(13)-0110(6)=0111(7) • Take 1’s complement of 0110=>1001 • Add to Augend 1101+1001=(1 carry)0110 • The result is in 1’s complement form
  • 17. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Arithmetic Operations: 1’s Complement Input: two positive integers x & y, 1. We represent the operands in one’s complement. 2. We sum up the two operands. 3. We delete 2n-1 if there is carry out at left. 4. The result is the solution in one’s complement. Arithmetic 1’s complement x + y x + y x - y x + (2n -1- y) = 2n-1+(x-y) x – y(y>x) (2n -1-y) + x =2n-1-(y-x)=2n-1-z=1’s comp no carry -x - y (2n -1-x) + (2n -1-y) = 2n-1+(2n-1-(x+y))
  • 18. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› 18 Arithmetic Operations: Example: 4 – 3 = 1 0100 (4 in decimal ) + 1100 (12 in decimal or 15-3 ) 1,0000 (16 in decimal or 15+1 ) 0001(after deleting 2n-1) 410 = 01002 310 = 00112 -310 11002 in one’s complement We discard the extra 1 at the left which is 2n and add one at the first bit.
  • 19. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› 19 Arithmetic Operations: Example: -4 +3 = -1 1011 ( 11 in decimal or 15-4 ) + 0011 ( 3 in decimal ) 1110 ( 14 in decimal or 15-1 ) 410 = 01002 -410  Using one’s comp. 10112 (Invert bits)310 = 00112 If the left-most bit is 1, it means that we have a negative number.
  • 20. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› 20 Example: – 4 – 3 = – 7 4 in binary = 0100. Flipping the bits, you get –4 (1011) in binary. 3 in binary = 0011. Flipping the bits, you get –3 (1100) in binary. 1011 (11 in decimal, or 15-4) + 1100 (12 in decimal, or 15-3) ----------------------------------------- 1,0111 (23 in decimal (15+15-7)) So now take the extra 1 and remove it from the 5th spot and add it to the remainder 0111 + 1 ------------------------------------------ 1000 (-7 in 1’s comp) One’s Complement
  • 21. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Arithmetic in 2’s complement When both nos. Positive 4+3=7 4=0100 3=0011 0100 +0011 --------- 0111 --------
  • 22. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Arithmetic in 2’s complement When first > second 4-3=1 4=0100 3=0011 -3=1101 Hence 0100 +1101 --------- 1)0001 Discard carry
  • 23. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› When first < second -4+3=-1 +4=0100 -4=1100 3=0011 Hence 1100 +0011 --------- 1111 1st bit is 1 negative no. (in 2’s complement form) Take 2’s complement again to get the magnitude Arithmetic in 2’s complement
  • 24. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Arithmetic in 2’s complement When both nos. negative -4-3=-7 +4=0100 -4=1100 +3=0011 -3=1101 Hence 1100 +1101 --------- 1)1001(2’s complement of 7) discard carry 1st bit is 1 negative no. (in 2’s complement form) Take 2’s complement again to get the magnitude
  • 25. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Over flow detection in 1’s and 2’s complement •If the sum of two positive numbers yields a negative result, the sum has overflowed. •If the sum of two negative numbers yields a positive result, the sum has overflowed. •Otherwise, the sum has not overflowed. •Is there a carry into sign bit position? •Is there a carry out of sign bit position? •If step 2 and step 3 results are not equal then the overflow condition is detected.
  • 26. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› -7-7 01111001(2’s compl) Hence 1001 +1001 -------- 1)0010 (carry into sign bit =0 and out of it=1) Example -7-7 01111000(1’s compl) Hence 1000 +1000 -------- 1)0000 (carry into sign bit =0 and out of it=1)
  • 27. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Signed Magnitude •Two representations of zero inefficiency and confusion •+ve and –ve numbers need to be processed separately
  • 28. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› 1’s complement •Two representations of zero inefficiency and confusion •+ve and –ve numbers need to be processed separately
  • 29. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Signed 2’s complement
  • 30. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Comparison Parameter Signed magnitude Signed 1’s complement Signed 2’s complement Representation Only sign bit is kept different for +ve and –ve no. -ve no is obtained by flipping the bit in magnitude part Is obtained by adding 1 to 1’s complement Range(total n bits) -(2n-1-1) to +(2n-1-1) -(2n-1-1) to +(2n-1-1) -2n-1 to +(2n-1-1) Representation of Zero Two different representations Two different representations Only one representation Processing of +ve and –ve nos. Different Different Same Arithmetic Complex Complex Simple Overflow detection From carry into sign bit From carry into and out of carry bit From carry into and out of carry bit
  • 31. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› 31 1's Compliment Let f(x) = 2n -1 -x Theorem: f(f(x)) = x Proof: f (f(x)) = f (2n - 1 - x) = 2n - 1 - (2n -1 - x) = x Recovery of the Numbers 2's Compliment Let g(x) = 2n - x Theorem: g(g(x)) = x Proof: g(g(x)) = g(2n - x) = 2n - (2n - x) = x
  • 32. Numeric and Alphanumeric Codes • Binary code – by far the most common way of representing numeric information – has advantages of simplicity and efficiency of storage BinaryDecimal 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 etc. 0 1 2 3 4 5 6 7 8 9 10 11 12 etc.
  • 33. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Binary Coded Decimal (BCD code) • Each digit is represented by 4 bit binary code • 23 is represented as • 0010 0011 • 67 is represented as • 0110 0111 • Some bit are unused • Easy for human understanding
  • 34. Numeric and Alphabetic Codes  Binary-coded decimal code  formed by converting each digit of a decimal number individually into binary  requires more digits than conventional binary  has advantage of very easy conversion to/from decimal  used where input and output are in decimal form BinaryDecimal 0 1 10 11 100 101 110 111 1000 1001 10000 10001 10010 etc. 0 1 2 3 4 5 6 7 8 9 10 11 12 etc.
  • 35. Numeric and Alphabetic Codes • ASCII code – American Standard Code for Information Interchange – an alphanumeric code – each character represented by a 7-bit code • gives 128 possible characters • codes defined for upper and lower-case alphabetic characters, digits 0 – 9, punctuation marks and various non-printing control characters (such as carriage-return and backspace)
  • 36. Numeric and Alphabetic Codes • Error detecting and correcting codes – adding redundant information into codes allows the detection of transmission errors • examples include the use of parity bits and checksums – adding additional redundancy allows errors to be not only detected but also corrected • such techniques are used in CDs, mobile phones and computer disks
  • 37. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Numeric and Alphabetic Codes Excess -3 code • Obtained by adding 3 in the number • Excess-3 code is also known as self complimenting code or reflective code, as 1′s compliment of any number (0-9) is available within these 10 numbers. Decimal Number Excess-3 Equivalent 0 0011 1 0100 2 0101 3 0110 4 0111 5 1000 6 1001 7 1010 8 1011 9 1100
  • 38. Binary Quantities and Variables • A binary quantity is one that can take only 2 states A simple binary arrangement S L OPEN OFF CLOSED ON S L 0 0 1 1 A truth table
  • 39. • A binary arrangement with two switches in series L = S1 AND S2
  • 40. • A binary arrangement with two switches in parallel L = S1 OR S2
  • 41. • Three switches in series L = S1 AND S2 AND S3
  • 42. • Three switches in parallel L = S1 OR S2 OR S3
  • 43. • A series/parallel arrangement L = S1 AND (S2 OR S3)
  • 44. • Representing an unknown network
  • 45. Logic Gates • The building blocks used to create digital circuits are logic gates • There are three elementary logic gates and a range of other simple gates • Each gate has its own logic symbol which allows complex functions to be represented by a logic diagram • The function of each gate can be represented by a truth table or using Boolean notation
  • 46. • The AND gate
  • 47. • The OR gate
  • 48. • The NOT gate (or inverter)
  • 49. • A logic buffer gate
  • 50. • The NAND gate
  • 51. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • The NOR gate
  • 52. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • The Exclusive OR gate
  • 53. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • The Exclusive NOR gate
  • 54. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Gray code • Only one bit differs for consecutive number representation • Easy to transmit data • Lesser no. of bits required • Error detection and correction easier • a3a2a1a0a3(a3 XOR a2) (a2 XOR a1)(a1 XOR a0) • 11011(1 XOR 1)(1 XOR 0)(0 XOR 1) –1011
  • 55. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Gray codes Decimal Binary Gray 0 0000 0000 1 0001 0001 2 0010 0011 3 0011 0010 4 0100 0110 5 0101 0111 6 0110 0101 7 0111 0100 8 1000 1100 9 1001 1101 10 1010 1111 11 1011 1110 12 1100 1010 13 1101 1011 14 1110 1001 15 1111 1000
  • 56. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Boolean Algebra • Boolean Constants – these are ‘0’ (false) and ‘1’ (true) • Boolean Variables – variables that can only take the vales ‘0’ or ‘1’ • Boolean Functions – each of the logic functions (such as AND, OR and NOT) are represented by symbols as described above • Boolean Theorems – a set of identities and laws.
  • 57. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • Boolean identities AND Function OR Function NOT function 00=0 0+0=0 01=0 0+1=1 10=0 1+0=1 11=1 1+1=1 A0=0 A+0=A 0A=0 0+A=A A1=A A+1=1 1A=A 1+A=1 AA=A A+A=A 0 AA 1 AA 10  01  AA 
  • 58. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Commutative law Absorption law Distributive law De Morgan’s law Associative law Note also • Boolean laws ABBA BAAB   ))(( )( CABABCA BCABCBA   CBACBA CABBCA   )()( )()( ABAA AABA   )( BABA BABA   ABBAA BABAA   )(
  • 59. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› DeMorgan’s Theorem BABA BABA   . .)(
  • 60. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Combinational Logic • Digital systems may be divided into two broad categories: – combinational logic • where the outputs are determined solely by the current states of the inputs – sequential logic • where the outputs are determined not only by the current inputs but also by the sequence of inputs that led to the current state
  • 61. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • Implementing a function from a Boolean expression Example – Implement the function CBAX 
  • 62. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • Implementing a function from a Boolean expression Example – Implement the function DCBAY 
  • 63. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • Generating a Boolean expression from a logic diagram
  • 64. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Example (continued) – work progressively from the inputs to the output adding logic expressions to the output of each gate turn
  • 65. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • Implementing a logic function from a description Example – The operation of the Exclusive OR gate can be stated as: “The output should be true if either of its inputs are true, but not if both inputs are true.” This can be rephrased as: “The output is true if A OR B is true, AND if A AND B is NOT true.” We can write this in Boolean notation as )()( ABBAX 
  • 66. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Example (continued) The logic function can then be implemented as before )()( ABBAX 
  • 67. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • Implementing a logic function from a truth table Example – Implement the function of the following truth table A B C X 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 0 – first write down a Boolean expression for the output – then implement as before – in this case – By looking at when X=1 CBACBACBAX 
  • 68. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Example (continued) The logic function can then be implemented as before CBACBACBAX 
  • 69. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • In some cases it is possible to simplify logic expressions using the rules of Boolean algebra Example – can be simplified to hence the following circuits are equivalent CAACBCAABCX  ABCX 
  • 70. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Boolean expression simplefication • Prove that x+yz=(x+y)(x+z) • RHS=(x+y)(x+z) • =x.x+x.z+y.x+y.z; using distributive property • =x+x.z+x+y.x+y.z; x+x=x • =x(1+z)+x(1+y)+y.z; taking common • =x+x+y.z; as 1+x=x • =x+y.z • proved
  • 71. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Contd... • Prove that x(x’+y)=xy • LHS=x(x’+y) • =x.x’+x.y • =x.y; as x.x’=0. • proved
  • 72. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Contd... • Simplify f(x,y,z)=x’y’z+ x’yz+ xy’ • x’y’z+ x’yz+ xy’ • =x’z(y’+y)+xy’ • =x’z+xy’; As y+y’=1 • Answer
  • 73. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Contd... • Simplify f(x,y,z)=xy+x’z+yz • xy+x’z+yz • = xy+x’z+yz(x+x’) • = xy+x’z+yzx+yzx’ • =xy(1+z)+x’z(1+y) • =xy+x’z; as 1+z=1 • Answer
  • 74. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Contd... • Prove that (x+y)(x’+z)(y+z)=(x+y)(x’+z) • LHS=(x+y)(x’+z)(y+z)=(xx’+xz+yx’+yz)(y+z) • =xyz+yx’+yz+xz+x’yz+yz; as xx’=0, xx=x • =xx’+xyz+yz+xyz+xz+yx’+x’yz+yz; adding xx’=0 and xyz • =xx’+yz(1+x)+xz(1+y)+yx’+yz(1+x’) • =xx’+yz+xz+yx’+yz; • =xx’+yz+xz+yx’; removing extra yz • =(x+y)(x’+z)
  • 75. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Exercise... • Simplify... • 1. x’y’+xy+x’y • 2. (x+y)(x+y’) • 3. x’y+xy’+xy+x’y’ • 4. x’+xy+xz’+xy’z’ • 5. xy’+y’z’+x’z’ • 6. x’yz+xz • 7. (x+y)’(x’+y’)
  • 76. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Key Points • It is common to represent the two states of a binary variable by ‘0’ and ‘1’ • Logic circuits are usually implemented using logic gates • Circuits in which the output is determined solely by the current inputs are termed combinational logic circuits • Logic functions can be described by truth tables or using Boolean algebraic notation • Binary digits may be combined to form digital words • Digital words can be processed using binary arithmetic • Several codes can be used to represent different forms of information
  • 77. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Minterms • Variables x, y • x.y, x’.y, x.y’, x’.y’ 4 possible combinations • Called minterms • For n variables 2n minterms • Each minterm is obtained from AND of n- variables • Minterm for 010 binary variable value is x’.y.z’. • Primed variable for 0 and un-primed for 1.
  • 78. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Maxterms • Variables x, y • X+y, x’+y,x+y’, x’+y’ possible combinations • Called maxterms • For n variables 2n maxterms • Each maxterm is obtained from OR of n-variables • Maxterm for 010 binary variable value is x+y’+z. • Primed variable for 1 and un-primed for 0. • Maxterm and minterms are primed of each other
  • 79. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
  • 80. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Function in terms of minterms and maxterms +equivalent to ORing .equivalent to ANDing
  • 81. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› • Any Boolean function can be written as sum of minterms • f1’ is sum of minterms corresponding to 0 value of f1. If we take complement of it again
  • 82. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Canonical Form • Hence any Boolean function can be written as sum of minterms. • Any Boolean function can be written as product of maxterms. • Form a maxterm for each combination of the variables that produces a 0 in the function and then form AND of those terms • Boolean function expressed as sum of minterms or product of maxterms are said to be in canonical form.
  • 83. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Examples... • Express F=A+B’C in a sum of minterms. • F=A+B’C (function must contain all variables) • =A(B+B’)(C+C’)+B’C(A+A’) • =ABC+ABC’+AB’C+AB’C’+AB’C+A’B’C • = ABC+ABC’+AB’C+AB’C’+A’B’C • =m7+m6+m5+m4+m1 • =m1+m4+m5+m6+m7 • F(A,B,C)=Σ(1,4,5,6,7) • ANSWER
  • 84. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Examples... • Express Boolean function F=xy+x’z in a product of maxterms. • Using distributive property {A+BC=(A+B)(A+C)}
  • 85. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Removing repeated terms we get Or, conveniently we express it as
  • 86. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Examples 1.
  • 87. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› 2. 3.
  • 88. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Conversion between canonical forms (minterms & Maxterms) • Consider Its complement can be expressed as
  • 89. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#›
  • 90. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Standard forms (SOP & POS) • Need not have all literals(variables) • Has two forms Sum of Products (SOP) and Product of Sums (POS) • SOP • POS  • Neither POS nor SOP non standard
  • 91. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Map Method of simplification • Karnaugh Map Method: • n-variable 2n squares • Each square  minterm
  • 92. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Simplification... • 3-variable K-map
  • 93. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Simplification using K-map • Make suitable K-map2X 2 squares for 2 variable, 4X4 square for 3 variables • Mark literal value of each square in the corners • If minterms are given mark 1’s in the given literal value position in the map • If maxterms are given  mark 0’s in the given literal value • Try to make quadruples by taking Neighbours
  • 94. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Simplification using K-map • If some positions are left make pairs of Neighbours • Make singleton of leftovers • For each quadruples move horizontally and vertically and write literal that remains unchanged in require form (minterm or maxterm) • If quadruple is verticle or horizontal only (covering a column or row) both variables in the line will disappear. • For each pair move horizontally or vertically and write literal that remains unchanged in required form (minterm or maxterm)
  • 95. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Examples... • Simplify the following function in (a) sum of products (b) product of sums
  • 96. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› 0 1 3 2 4 5 7 6 12 13 15 14 8 9 11 10 10 11 3 12 4 15 7 6 12 13 15 14 18 19 11 110 AB Hence F=A’D’+B’D’+A’BC’ CD 00 00 01 01 11 11 10 10 A’D’ B’D’ A’BC’
  • 97. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Multiple solutions 10 1 13 12 4 15 17 6 12 113 115 14 18 19 111 110 AB CD 00 00 01 01 11 11 10 10 B’D’ AB BD F=B’D’+CD’+BD+AB CD’
  • 98. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Multiple solutions 10 1 13 12 4 15 17 6 12 113 115 14 18 19 111 110 AB CD 00 00 01 01 11 11 10 10 B’D’ AD’ BD F=B’D’+CD’+BD+AD’ CD’
  • 99. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Don’t care conditions 10 1 13 12 4 15 d7 6 d12 113 d15 14 18 19 111 110 AB CD 00 00 01 01 11 11 10 10 B’D’ AD’ BD F=B’D’+CD’+BD+AD’ CD’ F=Σ(0,2,3,5,8,9,10, 11,13)+d(7,12,15)
  • 100. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› NAND and NOR Implementations: • NAND and NOR Gates – Universal Gates: Any digital circuit can be implemented with NAND or NOR gates alone • Most appropriate Boolean function implementation: • Two-level Implementations using NAND or NOR gates: Less propagation delay and simple structure.
  • 101. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› NAND Gate As Universal Gate: X X F = (X•X)’ = X’+X’ = X’ X Y Y F = ((X•Y)’)’ = (X’+Y’)’ = X’’•Y’’ = X•Y F = (X’•Y’)’ = X’’+Y’’ = X+Y X X F = X’ X Y Y F X•Y F = X+Y
  • 102. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› NAND Circuits • To easily derive a NAND implementation of a Boolean function: – Find a simplified SOP – SOP is an AND-OR circuit – Change AND-OR circuit to a NAND circuit – Use the alternative symbols below: Bubbled ORNAND
  • 103. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› AND-OR (SOP) Two-level implementations Using NANDs G=WXY+YZ a) Original SOP: AND-OR b) Implementation with NANDs
  • 104. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› AND-OR (SOP) Two-level implementations Using NANDs Verify: (a) G = WXY + YZ (b) G = ( (WXY)’ • (YZ)’ )’ = (WXY)’’ + (YZ)’’ = WXY + YZ
  • 105. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Two-Level NAND Gate Implementation - Example F (X,Y,Z) = m(0,6) 1. Express F in SOP form using K-Map: F = X’Y’Z’ + XYZ’ 2. Obtain the AND-OR implementation for F. 3. Add bubbles and inverters to transform AND- OR to NAND-NAND gates.
  • 106. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Example (cont.) Two-level implementation with NANDs F = X’Y’Z’ + XYZ’
  • 107. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› NOR Gate • Also a “universal” gate because ANY digital circuit can be implemented with NOR gates alone. • This can be similarly proven as with the NAND gate.
  • 108. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› NOR Circuits • To easily derive a NOR implementation of a Boolean function: – Find a simplified POS – POS is an OR-AND circuit – Change OR-AND circuit to a NOR circuit – Use the alternative symbols below: Bubbled ANDNOR
  • 109. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Two-Level NOR Gate Implementation - Example F(X,Y,Z) = m(0,6) 1. Express F in POS form using K-Map: F= (X'+Y)(X+Y')Z' 2. Obtain the OR-AND implementation for F. 3. Add bubbles and inverters to transform OR-AND implementation to NOR-NOR implementation. Practice some example to express a function in SOP or POS for using K-map Hint- when 0’s are considered we write maxterms and get POS form of function -when 1’s are considered we write minterms and get SOP form of function
  • 110. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Example (cont.) Two-level implementation with NORs F = (F’)' = (X'+Y)(X+Y')Z'
  • 111. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Practice Problems: • Assuming that normal and complement inputs are available, implement following Boolean function using minimum number of gates mentioned--- F=AB’+ABD+ABD’+A’C’D’+A’BC’---NAND Gates only F=BD+BCD’AB’Ç’D’—NOR gates only F=(A+D)(A’+B’)(A’+C’)—NAND Gates only
  • 112. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Summary: Two level implementation of Boolean Function Form of Function Basic Implementation Equivalent universal logic implementation SOP AND-OR NAND-NAND POS OR-AND NOR-NOR
  • 113. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› STORAGE ELEMENTS: • Maintain a binary state indefinitely as long as power is delivered to the circuit • Latches: Binary state changes with signal levels: Level Triggered • Flip-flops: Binary state changes with signal transitions: Edge Triggered
  • 114. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Core of a Flip-Flop: The set–reset or SR Latch • Acts as a simple memory with two stable states at the two output when S = R = 0 – Q1 and Q2 are the outputs of the S-R latch. – When Q1 is known as Q and Q2 is also called Q’ or (spoken as Q bar), meaning that its value is not Q or the opposite of Q. Q
  • 115. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Working of NAND gate...
  • 116. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Working... Qt S R Qt+1 Q’t+1 Comment 0 0 0 0 1 No change 0 0 1 0 1 Reset 0 1 0 1 0 Set 0 1 1 1 1 Invalid 1 0 0 1 0 No change 1 0 1 0 1 Reset 1 1 0 1 0 Set 1 1 1 1 1 Invalid 0 0 1 1 1 0 1 0 Q(t+1)=(Q’(t). S’)’=Q(t)+S Q’(t+1)=(Q(t). R’)’=Q’(t)+R Q(t) Present state (value) Q(t+1) Next state (value)
  • 117. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› S-R Latch •The latch -holds (stores) when S = R = 0 -is set (to 1) by bringing S = 1 with R = 0 -is reset (to 0) or cleared by bringing R = 1 with S = 0 •The condition S = R = 1 must be avoided because it leads to an indeterminate condition, where the output can not be predicted at any one point in time. This can cause a race condition to occur when the inputs change to S = R = 0.
  • 118. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› SR Latch with Enable •The S and R inputs only effect the output states when the enable input C is high. – This controls when the latch responds to its inputs. •The latch holds (retains previous state) its value while the enable input is low — latches it! •Any changes in the inputs during the time when enable is high will affect the output immediately: the circuit is said to be transparent. •This circuit still has a major problem: the stored value is indeterminate if S = R = 1 when the clock goes low 0 1 1 Q Q’ Q’ Q
  • 119. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Logic Table SR Latch S R Q 0 0 Last Q 0 1 0 1 0 1 1 1 ?? SR Latch with Enable S R E Q 0 0 1 Last Q 0 1 1 0 1 0 1 1 1 1 1 ??? X X 0 Last Q
  • 120. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Race condition Circuit Boolean Logic • Q1(t+1)=(S’.Q2(t))’ • =S+Q’2(t) • Q2(t+1)=(R’.Q1(t))’ • =R+Q’1(t) • When S=R=0; with Q1=Q2=1 • Q1(t+1)=Q’2(t) • Q2(t+1)=Q’1(t) • Keep on toggling 01010.... racing
  • 121. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Timing Diagram
  • 122. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Timing Diagram No Initial Condition Propagation Delay Time Indeterminate Condition, Q = Q’ Followed by a Race Condition
  • 123. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Working of NOR gates...
  • 124. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Latches: SR Latch with NOR gates The SR latch is a circuit with two cross-coupled NOR gates or two cross-coupled NAND gates. It has two inputs labeled S for set and R for reset.
  • 125. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› SR Latch with NAND Gates
  • 126. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Graphic Symbols for Latches 126 A latch is designated by a rectangular block with inputs on the left and outputs on the right. One output designates the normal output, and the other designates the complement output. NOR Latch: Active High Inputs NAND Latch: Active Low Inputs
  • 127. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› SR Latch with Control (Enable) Input The operation of the basic SR latch can be modified by providing an additional control input that determines when the state of the latch can be changed. It consists of the basic SR latch and two additional NAND gates.
  • 128. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Symbol: 128
  • 129. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› D-Latch and Symbol: 129
  • 130. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Flip-Flops The state of a latch or flip-flop is switched by a change in the control input. This momentary change is called a trigger and the transition it cause is said to trigger the flip-flop. The D latch with pulses in its control input is essentially a flip-flop that is triggered every time the pulse goes to the logic 1 level. As long as the pulse input remains in the level, any changes in the data input will change the output and the state of the latch.
  • 131. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Clock Response in Latch In Fig (a) a positive level response in the control input allows changes, in the output when the D input changes while the clock pulse stays at logic 1.
  • 132. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Clock Response in Flip-Flop
  • 133. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Latches and Flip Flops
  • 134. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Edge-Triggered D Flip-Flop The first latch is called the master and the second the slave. The circuit samples the D input and changes its output Q only at the negative-edge of the controlling clock. CLK 1 0 1 0 1 0 D 1 1 0 0 1 1 … Y 1 1 0 0 1 1 … Q ? 1 1 0 0 1 ….
  • 135. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Graphic Symbol for Edge-Triggered D Flip-Flop
  • 136. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› JK Flip-Flop There are four operations that can be performed with a flip- flop: set it to 1, reset it to 0, no change, complement its output. The JK flip-flop performs all four operations. The circuit diagram of a JK flip-flop constructed with a D flip- flop and gates. Q=J.Q’+K’.Q
  • 137. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Operation... Q=J.Q’+K’.Q
  • 138. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› JK Flip-Flop The J input sets the flip-flop to 1, the K input resets it to 0, and when both inputs are enabled, the output is complemented. This can be verified by investigating the circuit applied to the D input: D = J Q` + K` Q
  • 139. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› T (Toggle) Flip-Flop The T flip-flop is a complementing flip-flop and can be obtained from a JK flip-flop when inputs J and K are tied together.
  • 140. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› T Flip-Flop 140 The T flip-flop can be constructed with a D flip-flop and an exclusive-OR gates as shown in Fig. (b). The expression for the D input is D = T Q = TQ` + T`Q
  • 141. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Flip-Flop Characteristic Equations D flip-flop Characteristic Equations Q(t + 1) = D JK flip-flop Characteristic Equations T flip-flop Characteristic Equations Q(t + 1) = JQ` + K`Q Q(t + 1) = T Q = TQ` + T`Q
  • 142. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Comparison: 142 Flip Flop SR D JK T No of Inputs 2 1 2 1 No of Operations 3 2 4 2 Invalid State? Yes No No No Toggle State? No No Yes Yes Applicatio n Set-Reset Circuit Controlled Data Transfer, Registers Counters Counters
  • 143. Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 9.‹#› Lecture Review Questions 1. What is the fundamental difference between combinational and sequential logic? 2. What inputs should you put on a SR flip-flop to set it (to 1)? 3. Why must S = R = 1 be avoided? 4. Why do sequential logic circuits need a clock? 5. What is meant by the term edge-triggered flip-flop? 6. Describe the operation of a type D flip-flop. For what are they used? Describe the operation of a JK flip-flop with J = K = 1. 7. Why do some flip-flops have control inputs? In what ways do they differ from the normal inputs, such as J and K? 8. What is the propagation delay? Why is it important?

Editor's Notes

  1. 2018/3/2
  2. 2018/3/2
  3. 2018/3/2
  4. 2018/3/2
  5. 2018/3/2
  6. 2018/3/2
  7. 2018/3/2
  8. 2018/3/2
  9. 2018/3/2
  10. 2018/3/2
  11. 2018/3/2
  12. Left: Simulation started with S = R = 0, but no last Q had been defined. Propagation delay time can be seen as Q and Q’ change 21.5ns after S and R change. Right: Q and Q’ are both equal to 1 when S = R=1. This results in a race condition when the input changes to S = R = 0. Again, the propagation delay time can be seen in the period of the oscillations.