0% found this document useful (0 votes)
15 views52 pages

Ch1 DLD 123

Uploaded by

kebron.romina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views52 pages

Ch1 DLD 123

Uploaded by

kebron.romina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Digital Logic Design

Chapter 1 – Introduction to Digital Systems

Alemu W.
[email protected]
05 October 2017 EC.
Contents

 Digital Systems
 Digital and Analogue Quantities
 Binary Digit Logic Level
 Digital Waveform

Chapter 1 – Introduction to Digital Systems 2


Digital Systems

 Digital systems are electronic systems that use digital signals to


represent and transmit information
 These systems operate using discrete values or symbols, typically
represented as binary numbers.
 Example: computers, digital cameras, smartphone, …
 Digital Logic Design – the process of designing digital systems
using logic gates.
 Logic gates are the building blocks of digital circuits which
implement Boolean logic operations
 Digital circuits are composed of interconnected logic gates that
perform specific tasks based on the input signals they receive
 In digital logic design, there are two types of signals that can be
used in electronic circuit: Digital and Analog quantities

Chapter 1 – Introduction to Digital Systems 3


Digital and Analogue Quantities

 Digital quantities are discrete signals that can only take on


specific values
 Typically represented by the binary digits 0 and 1
 Used in digital circuits such as computer chips and microcontrollers
 Represent information or perform calculations electronically
 Examples: Light Switch (ON/OFF), a keyboard (Button Pressed or Not) …
 Analog quantities are continues signals that can vary over a
range of values
 Used in analog circuits such as audio amplifiers to process/transmit info
 Examples: Radio Broadcast, Music Recording, Battery Voltage level
 Implementation:
 Thes two signals are implemented separately into different circuits to avoid
interference between them.
 They can be implemented as DAC and ADC
Chapter 1 – Introduction to Digital Systems 4
Digital and Analogue Quantities

 A common approach is to use an analog-to-digital converter


(ADC) to convert an analog signal into a digital signal for
processing in digital circuit
 Conversely, a digital-to-analog-converter (DAC) can be used to
convert a digital signal into an analog signal for output to an
analog circuit

Chapter 6 Sequential Circuits - Alemu W. 5


Binary Digit Logic Level and Digital Waveform

 Binary Digit Logic Level refers to the state of digital signal in


terms of its voltage or current level
 Binary signals have two states: 1 or 0 can be represented as [High or Low]
 It affects the behavior of the digital system
 Digital waveform refers to the graphical representation of the
binary signal voltage or current variation with respect to time
 It shows how the digital signal changes over time.
 Useful in analyzing and understanding the behavior of the digital system
 Provide an abstract representation of the actual signals in real-time
electronic circuits
 Helps to visualize signal characteristics such as frequency, amplitude and
phases

Chapter 1 – Introduction to Digital Systems 6


Digital Logic Design

Chapter 2 – Number Systems and Codes

Alemu W.
[email protected]
05 October 2017 EC.
Contents

 Decimal Number
 Binary Number
 Binary Conversation
 Hexadecimal Number
 Octal Number
 1’s and 2’s Compliment
 BCD

Chapter 2 – Number Systems and Codes 8


Number Systems

 A number system is a way of expressing numbers using symbols


or digits.
 Each number system may use weighted or unweighted systems
of the digits in the given number
 Each number is represented by a string of digits in which each
digit position i has an associated weight ri, where r is the radix,
or base, of the number system.
 The general form of a number in such a system with radix r is
( . . . a3a2a1a0.a-1a-2a-3 . . . )r where the value of any digit ai is an
integer in the range 0 < ai < r.
 The dot between a0 and a-1 is called the radix point.
 Different number systems use different bases, which means how
many symbols or digits they have.
 Examples: Decimal, Binary, Octal and Hexadecimal number system
Chapter 2 – Number Systems and Codes 9
Number Systems

 Decimal Number System:


 Has a base of 10 and uses 10 symbols from 0 to 9
 Each digit in the number is multiplied by 10 raised to a power
corresponding to that digit’s position
 Example: The number 83 means eight tens plus three: 83 = (8 * 10) + 3 =
(8 * 101) + (3 * 100)
 The same principle holds for decimal fractions, but negative powers of 10
are used.
 The decimal fraction 0.256 = 0.256 = (2 * 10-1) + (5 * 10-2) + (6 * 10-3)
 It is a positional number system and Most significant digit is the leftmost
digit (carries the highest value) and Least significant digit the rightmost
digit (carries the lowest value)

Chapter 2 – Number Systems and Codes 10


Number Systems

 Binary Number System:


 It has only two digits, 1 and 0
 Represented to the base 2
 The digits 1 and 0 in binary notation have the same meaning as in decimal
notation:
• 02 = 010 and 12 = 110
 To represent larger numbers each digit in a binary number has a value
depending on its position:
• 102 = (1 * 21) + (0 * 20) = 210
• 112 = (1 * 21) + (1 * 20) = 310
• 1002 = (1 * 22) + (0 * 21) + (0 * 20) = 410
 Fractional values are represented with negative powers of the radix:
• 1001.101 = 23 + 20 + 2-1 + 2-3 = 9.62510

Chapter 2 – Number Systems and Codes 11


Number Systems

 Octal Number System


 The base or radix of octal number system is 8
 The numbers ranging from 0 to 7 are used in this number system
 Successive positions to the left of the octal point having weights of 80, 81,
82, 83 and so on.
 Similarly, the successive positions to the right of the octal point having
weights of 8-1, 8-2, 8-3 and so on.
 Each position has specific weight, which is power of base 8.
 Example: 1457.236 = (1*83) + (4*82) + (5*81) + (7*80) + (2*8-1) + (3*8-2)
+ (6*8-3)
 After simplifying the right hand side terms, we will get a decimal number,
which is an equivalent of octal number on left hand side.

Chapter 2 – Number Systems and Codes 12


Number Systems

 Hexadecimal Number System


 The base or radix of Hexa-decimal number system is 16.
 The numbers ranging from 0 to 9 and the letters from A to F are used
 The decimal equivalent of Hexa-decimal digits from A to F are 10 to 15
 Successive positions to the left of the Hexa-decimal point having weights
of 160, 161, 162, and 163 and so on
 Similarly, the successive positions to the right of the Hexa-decimal point
having weights of 16-1, 16-2, 16-3 and so on
 That means, each position has specific weight, which is power of base 16
 Example:
A05.2C4 = (1*163) + (10*162) + (0 *161) + (5*160) + (2*16-1) + (12*16-2)
+ (4*16-3)

Chapter 2 – Number Systems and Codes 13


Number Systems Conversion

 Converting Between Binary and Decimal


 Binary notation to decimal notation: Multiply each binary digit by the
appropriate power of 2 and add the results
 Decimal notation to binary notation: Integer and fractional parts are
handled separately
 In binary notation, an integer represented by bm-1bm-2 . . . b2b1b0 where bi =
0 or 1 and has the value (bm-1 * 2m-1) + (bm-2 * 2 m-2) + . . . + (b1 * 21) + b0
 Suppose it is required to convert a decimal integer N into binary form.
• If we divide N by 2, in the decimal system, and obtain a quotient N1 and a
remainder R0, we may write N = 2 * N1 + R0, R0 = 0 or 1
• Next, we divide the quotient N1 by 2. Assume that the new quotient is N2 and
the new remainder R1. Then N1 = 2 * N2 + R1, R1 = 0 or 1
• So that N = 2(2N2 + R1) + R0 = (N2 * 22) + (R1 * 21) + R0
• If next N2 = 2N3 + R2 we have N = (N3 * 23) + (R2 * 22) + (R1 * 21) + R0
 Because N >N1 > N2 . . . , continuing this sequence will eventually
produce a quotient Nm-1 = 1 (except for the decimal integers 0 and 1,
whose binary equivalents are 0 and 1, respectively) and a remainder Rm-2,
which is 0 or 1. Chapter 2 – Number Systems and Codes 14
Number Systems Conversion
 Then N = (1 * 2m-1) + (Rm-2 * 2m-2) + . . . + (R2 * 22) + (R1 * 21) + R0
which is the binary form of N. Hence, we convert from base 10 to base 2
by repeated divisions by 2. The remainders and the final quotient, 1, give
us, in order of increasing significance, the binary digits of N.

Quotient Remainder
Quotient Remainder 21 = 10 1
11 = 5 1 2
2
10 = 5 0
5 = 2
2 1
2
5 = 2 1
2 = 2
1 0
2 2 = 1 0
2
1 = 0 1
2 1 = 0 1
10112 = 1110 2
101012 = 2110
(a) 1110
(b) 21 10

Chapter 2 – Number Systems and Codes 15


Number Systems Conversion

 Binary to Octal Conversion


 Three bits of binary number is equivalent to one octal digit, since 23 = 8
 Steps for converting a binary number into its equivalent octal number:
• Start from the binary point and make the groups of 3 bits on both sides of
binary point
• If one or two bits are less while making the group of 3 bits, then include
required number of zeros on extreme sides
• Write the octal digits corresponding to each group of 3 bits
 Example: Consider the binary number 101110.01101 = 101 110 . 011 010
= 56.328
 The process of converting an octal number to an equivalent binary number
is just opposite to that of binary to octal conversion.
 By representing each octal digit with 3 bits, we will get the equivalent
binary number.
 Example: 145.238 = 001 100 101 . 010 011

Chapter 2 – Number Systems and Codes 16


Number Systems Conversion

 Binary to Hexa-Decimal Conversion


 4 bits of binary number is equivalent to one Hexa-decimal digit, 24=16
 Steps for converting a binary number into its equivalent Hexa-decimal
number:
• Start from the binary point and make the groups of 4 bits on both sides of
binary point
• If one or two bits are less while making the group of 4 bits, then include
required number of zeros on extreme sides
• Write the octal digits corresponding to each group of 4 bits
• Example: Consider the binary number 101110.01101 = 0010 1110 . 0110 1000
= 2E.6816
• The process of converting Hexa-decimal number into its equivalent binary
number is just opposite to that of binary to Hexa-decimal conversion.
• By representing each Hexa-decimal a-decimal digit with 4 bits, we will get the
equivalent binary number.
• Example: 65.4C16 = 0110 0101 . 0100 1100

Chapter 2 – Number Systems and Codes 17


Binary Numbers Representation

 Binary numbers can be represented as Unsigned numbers and


Signed numbers.
 Unsigned Numbers:
 Contain only magnitude of the number
 They don’t have any sign – all unsigned binary numbers are positive
 As in decimal number system, the placing of positive sign in front of the
number is optional for representing positive numbers
 Therefore, all positive numbers including zero can be treated as unsigned
numbers if positive sign is not assigned in front of the number
 Signed Numbers
 Contain both sign and magnitude of the number
 The sign is placed in front of number
 Consider the + sign for positive numbers and - sign for negative numbers
 Similarly, If sign bit is zero, which indicates the binary number is positive
and if sign bit is one, which indicates the binary number is negative.
Chapter 2 – Number Systems and Codes 18
Binary Numbers Representation

 Representation of Signed Binary Numbers


 There are three types of representations for signed binary numbers
• Sign-Magnitude form
• 1’s complement form
• 2’s complement form
 Representation of a positive number in all these 3 forms is same.
 Sign-Magnitude form
 The MSB is used for representing sign of the number and the remaining
bits represent the magnitude of the number
 Example: Consider the negative decimal number -108.
• The magnitude of this number is 108.and its unsigned binary representation is
1101100
• It has 7 bits, all these bits represent the magnitude
• Since it is negative, the sign bit is 1, placed on left most side of the magnitude
−108 10= 111011002

Chapter 2 – Number Systems and Codes 19


Binary Numbers Representation

 1’s complement form


 Obtained by complementing all the bits of signed binary number
 1’s complement of positive number gives a negative number
 Similarly, 1’s complement of negative number gives a positive number.
 Example: Consider the negative decimal number -108
• The magnitude of this number is 108 and the signed binary representation is
01101100
• Complement of zero is one and vice-versa. So, replace zeros by ones and ones
by zeros in order to get the negative number - −10810 = 100100112
 2’s complement form
 Obtained by adding one to the 1’s complement of signed binary number
 2’s complement of positive number gives a negative number. Similarly, 2’s
complement of negative number gives a positive number
 Example: Consider the negative decimal number -108
• 1’s complement of 10810 is 100100112

Chapter 2 – Number Systems and Codes 20


Binary Numbers Representation
 2’s compliment of 10810 = 1’s compliment of 10810+ 1
=10010011+1
=10010100
 Exercises on Two’s Complement

Chapter 2 – Number Systems and Codes 21


Signed Binary Arithmetic

 Addition of two Signed Binary Numbers


 Consider the two signed binary numbers A & B, which are represented in
2’s complement form.
 We can perform the addition of these two numbers, which is similar to the
addition of two unsigned binary numbers.
 But, if the resultant sum contains carry out from sign bit, then discard
ignore it in order to get the correct value.
 If resultant sum is positive, you can find the magnitude of it directly. But, if
the resultant sum is negative, then take 2’s complement of it in order to get
the magnitude
 Example: Addition of two decimal numbers +7 and +4 using 2’s
complement method
• +710 + +410 = 001112 + 001002 = 010112
• The resultant sum contains 5 bits - there is no carry out from sign bit.
• The sign bit ‘0’ indicates that the sum is positive and the magnitude is 11 in
decimal number system.
• Therefore, addition of two positive numbers will give another positive number
Chapter 2 – Number Systems and Codes 22
Signed Binary Arithmetic

 Let us perform the addition of two decimal numbers -7 and -4 using 2’s
complement method
• The 2’s complement representation of -7 and -4 with 5 bits: −710= 110012 and
−410 =111002
• The addition of these two numbers is −710 + −410 =110012 + 111002
−710 +−410 =1101012
• The resultant sum contains 6 bits. In this case, carry is obtained from sign bit.
So, we can remove it
• The resultant sum after removing carry is −710 + −410 = 101012
• The sign bit ‘1’ indicates that the resultant sum is negative. So, by taking 2’s
complement of it we will get the magnitude of resultant sum as 11 in decimal
number system.
 Therefore, addition of two negative numbers will give another negative
number.

Chapter 2 – Number Systems and Codes 23


Signed Binary Arithmetic

 Subtraction of two Signed Binary Numbers


 Consider the two signed binary numbers A & B, which are represented in
2’s complement form
 Whenever we have to subtract a number B from number A, then take 2’s
complement of B and add it to A
 So, mathematically we can write it as A - B = A + 2’s complement of B
 Similarly, if we have to subtract the number A from number B, then take 2’s
complement of A and add it to B, and mathematically we can write it as
B - A = B + 2’s complement of A
 So, the subtraction of two signed binary numbers is similar to the addition
of two signed binary numbers.
 But, we have to take 2’s complement of the number, which is supposed to
be subtracted. This is the advantage of 2’s complement technique.\
 Example:
• Let us perform the subtraction of two decimal numbers +7 and +4 using 2’s
complement method.
Chapter 2 – Number Systems and Codes 24
Signed Binary Arithmetic
 The subtraction of these two numbers is:
• +710 - +410 = +710 + -410
• The 2’s complement representation of +7 and -4 with 5: 00111 and 11100
00111 + 11100 = 00011
• Here, the carry obtained from sign bit. So, we can remove it

Chapter 2 – Number Systems and Codes 25


Alphanumeric, Error Detection and Correction Codes

 In the coding, when numbers or letters are represented by a


specific group of symbols, it is said to be that number or letter is
being encoded and the group of symbols is called as code.
 The digital data is represented, stored and transmitted as group
of bits. This group of bits is also called as binary code.
 Binary codes can be classified into two types.
 Weighted codes
 Unweighted codes
 If the code has positional weights, then it is said to be weighted
code. Otherwise, it is an unweighted code.
 Weighted codes can be further classified as positively weighted
codes and negatively weighted codes.

Chapter 2 – Number Systems and Codes 26


Alphanumeric, Error Detection and Correction Codes

 Binary Codes for Decimal digits


Decimal 8421 Code 2421 Code 84-2-1 Code Excess 3 Code
Digit
0 0000 0000 0000 0011
1 0001 0001 0111 0100
2 0010 0010 0110 0101
3 0011 0011 0101 0110
4 0100 0100 0100 0111
5 0101 1011 1011 1000
6 0110 1100 1010 1001
7 0111 1101 1001 1010
8 1000 1110 1000 1011
9 1001 1111 1111 1100

Chapter 2 – Number Systems and Codes 27


Alphanumeric, Error Detection and Correction Codes

 8 4 2 1 code
 The weights of this code are 8, 4, 2 and 1.
 This code has all positive weights. So, it is a positively weighted code.
 This code is also called as natural BCD code
 2 4 2 1 code
 The weights of this code are 2, 4, 2 and 1
 This code has all positive weights. So, it is a positively weighted code.
 It is an unnatural BCD code. Sum of weights of unnatural BCD codes is
equal to 9.
 It is a self-complementing code. Self-complementing codes provide the 9’s
complement of a decimal number, just by interchanging 1’s and 0’s in its
equivalent 2421 representation.

Chapter 2 – Number Systems and Codes 28


Alphanumeric, Error Detection and Correction Codes

 8 4 -2 -1 code
 The weights of this code are 8, 4, -2 and -1
 This code has negative weights along with positive weights. So, it is a
negatively weighted code
 It is an unnatural BCD code
 It is a self-complementing code
 Excess 3 code
 This code doesn’t have any weights. So, it is an un-weighted code.
 We will get the Excess 3 code of a decimal number by adding three to the
binary equivalent of that
 decimal number. Hence, it is called as Excess 3 code.
 It is a self-complementing code

Chapter 2 – Number Systems and Codes 29


Alphanumeric, Error Detection and Correction Codes

 Gray Code
 This code doesn’t have any weights. So, it is an un-weighted code.
 In the above table, the successive Gray codes are differed in one bit
position only. Hence, this code is called as unit distance code
Decimal Binary Gray Decimal Binary Gray
0 0000 0000 9 1001 1101
1 0001 0001 10 1010 1111
2 0010 0011 11 1011 1110
3 0011 0010 12 1100 1010
4 0100 0110 13 1101 1011
5 0101 0111 14 1110 1001
6 0110 0101 15 1111 1000
7 0111 0100
8 1000 1100

Chapter 2 – Number Systems and Codes 30


Alphanumeric, Error Detection and Correction Codes

 Binary code to Gray Code Conversion


 Consider the given binary code and place a zero to the left of MSB.
 Compare the successive two bits starting from zero. If the 2 bits are same,
then the output is zero. Otherwise, output is one.
 Repeat the above step till the LSB of Gray code is obtained
 Error Detection & Correction Codes
 During transmission of binary data from one system to the other, the noise
may also be added. Due to this, there may be errors in the received data at
other system
 That means a bit 0 may change to 1 or a bit 1 may change to 0. We can’t
avoid the interference of noise. But, we can get back the original data first
by detecting whether any error s present and then correcting those errors.
For this purpose, we can use the following codes.
• Error detection codes
• Error correction codes

Chapter 2 – Number Systems and Codes 31


Alphanumeric, Error Detection and Correction Codes

 Parity Code
 It is easy to include append one parity bit either to the left of MSB or to the
right of LSB of original bit stream.
 There are two types of parity codes, namely even parity code and odd
parity code based on the type of parity being chosen.
 Even Parity Code: The value of even parity bit should be zero, if even
number of ones present in the binary code. Otherwise, it should be one.
Even parity code contains the data bits and even parity bit.
Binary Code Even Parity Bit Even Parity Code
0000 0 0000
0001 1 0011
0010 1 0101
0011 0 0110
 Even parity bit is useful only for detection of error in the received parity
code. But, it is not sufficient to correct the error

Chapter 2 – Number Systems and Codes 32


Alphanumeric, Error Detection and Correction Codes

 Odd Parity Code


 The value of odd parity bit should be zero, if odd number of ones present in
the binary code. Otherwise, it should be one.
 So that, odd number of ones present in odd parity code. Odd parity code
contains the data bits and odd parity bit.
Binary Code Even Parity Bit Even Parity Code
0000 1 0001
0001 0 0010
0010 0 0100
0011 1 0111
0100 0 1000
0101 1 1011
0110 1 1101
0111 0 1110

Chapter 2 – Number Systems and Codes 33


Alphanumeric, Error Detection and Correction Codes

 Error detection codes are used to detect the error present in


the received data bit stream.
 These codes contain some bits, which are included appended to the original
bit stream.
 These codes detect the error, if it is occurred during transmission of the
original data bit stream.
 Example − Parity code, Hamming code.
 Error correction codes are used to correct the error present in
the received data bit stream so that, we will get the original data.
 Error correction codes also use the similar strategy of error detection codes.
 Example − Hamming code.
 Therefore, to detect and correct the errors, additional bit s are
appended to the data bits at the time of transmission.

Chapter 2 – Number Systems and Codes 34


Digital Logic Design

Chapter 3 – Logic Gates

Alemu W.
[email protected]
05 October 2017 EC.
Contents

 The inverter
 The AND gate
 The OR gate
 The NAND gate
 The NOR gate
 The Exclusive OR and Exclusive NOR gates

Chapter 3 – Logic Gates 36


Logic Gates

 The basic elements of a digital computer must perform data


storage, movement, processing, and control functions.
 Only two fundamental types of components are required: gates
and memory cells.
 A gate is a device that implements a simple Boolean or logical
function.
 For example, an AND gate with inputs A and B and output C implements
the expression IF A AND B ARE TRUE THEN C IS TRUE.
 Such devices are called gates because they control data flow in much the
same way that canal gates control the flow of water.
 The memory cell is a device that can store one bit of data; that is,
the device can be in one of two stable states at any time.
 By interconnecting large numbers of these fundamental devices,
we can construct a computer.
Chapter 3 – Logic Gates 37
Logic Gates

 We can relate this to our four basic functions as follows:


 Data storage: Provided by memory cells.
 Data processing: Provided by gates.
 Data movement: The paths among components are used to move data from
memory to memory and from memory through gates to memory.
 Control: The paths among components can carry control signals.
 Binary information is represented in digital computers by
physical quantities called signals.
 Electrical signals such as voltages exist throughout the
computer in either one of two recognizable states: 1 or 0.
 Binary logic deals with binary variables and with operations that
assume a logical meaning.
 It is used to describe, in algebraic or tabular form, the
manipulation and processing of binary information.
Chapter 3 – Logic Gates 38
Logic Gates

 Gates are blocks of hardware that produce signals of binary 1 or


0 when input logic requirements are satisfied.
 Each gate has a distinct graphic symbol and its operation can be
described by means of an algebraic expression.
 The basic gates used in digital logic are AND, OR, NOT, NAND,
& NOR.
 We have also XOR gate for defining Boolean algebra with other
gates.

Chapter 3 – Logic Gates 39


NOT Gate:

 Performs a basic logic function called inversion or


complementation
 The purpose of this gate to change one logic level (High/Low)
to the opposite logic level.
 Application:
 It is used in CMOS inverters to generate waveforms
 Used in temperature control circuits
 Extensively used in control circuits
Example
 Algebraic Notation: X= Ā
 Logic symbol of NOT gate:
 Truth Table: A Ā
1 0
0 1
Chapter 3 – Logic Gates 40
OR Gate:

 Composed of two or more inputs and a single output


 It gives a high output if one or more of its inputs are high
 Performs Logical addition
 The logical operation of the OR gate:
 The output is HIGH (1) when any of the inputs are HIGH, otherwise it is
LOW (0)
 A plus (+) is used to show the OR operation
 The total number of combinations possible for a logical gate is
always determined by the formula [N=2n]
 Application:
 The most common application of OR gate is an intrusion detection and an
alarm system.
 The system can be used in a home, office, etc.
Chapter 3 – Logic Gates
OR Gate:

 Practical Examples:
 The sensors of the alarm detection system produce a HIGH voltage when
open and a LOW voltage when closed.
 As long as the windows and doors are closed, the switches are also closed
which means there is no intrusion and so the system is secure. And all the
inputs are therefore LOW. When any one of the windows or doors is
opened, a HIGH input is given and a HIGH output results and hence it
activates the alarm system.
 Algebraic Notation: Z= X+Y
 Logic symbol of OR gate:
 Truth Table: X Y Z

0 0 0
0 1 1
1 0 1
1 1 1

Chapter 3 – Logic Gates


AND Gate:

 Composed of two or more inputs and a single output


 Performs logical multiplication
 The logical operation of the AND gate:
 The output is HIGH (1) when all the input are HIGH
 Otherwise it is LOW (0).
 A dot (.) is used to show the AND operation.
 The total number of combinations possible for a logical gate is
always determined by the formula [N=2n]
 Algebraic Notation: Z= X*Y
 Logic symbol of NOT gate:
 Truth Table:

Chapter 3 – Logic Gates


AND Gate:

 Application:
 It allows and inhibits the passage of the signal at certain times
• That is we can say that the AND gate works as an enable gate at certain times
and the Inhibitor gate at other times.
 The main AND gate application is in digital electronics and in data
transmission. Where AND gate helps for allowing or not allowing the data
through a channel.
 Automatic temperature-regulating circuits
 Freezer warning buzzer devices

Chapter 3 – Logic Gates


Combination of Logic Gates

 Using combination of logic gates, complex operation can be


performed.
 Some basic combinations of gates include:
 NAND gate
 NOR gate
 Exclusive-OR(XOR)
 Exclusive-NOR(XNOR)

Chapter 3 – Logic Gates


NAND Gate

 NAND gate in digital electronics serves as a universal gate


 Can be used in combination with any of the basic gates And Or Not.
 As the term implies, NAND stands for NOT and AND
 Known for inverting the values or the output given by And gate
 The logical operation of the NAND gate is such that the output
is LOW (0) only when all the inputs are HIGH (1).
 Application:
 The 1st and foremost application of using the Nand gate is to get the desired
output by combining it with other gates, and the most common real-life
example of it is a burglar alarm.
 During a closed switch, either of the input to NAND gate is false i.e. LOW.
Hence the output is high, and the buzzer rings. When the switch is open,
both the inputs are High, thus producing a low output, and the buzzer does
not ring.
Chapter 3 – Logic Gates
NAND Gate:

 Algebraic Notation: Z= (X*Y)’


 Logic symbol of NOT gate:
 Truth Table: X Y Z
0 0 1
0 1 1
1 0 1
1 1 0

Chapter 3 – Logic Gates


NOR Gate

 A combination of logical OR gate and the logical NOT gate.


 It gives a false output when either of its inputs is HIGH (1)
 It does produce a High (binary 1) output when all of its inputs
are Low (binary 0)
 To sum up, the principle of the NOR gate is as follows…
 The output for a 2 input Nor gate is Low (binary 0) if either input or both
the input is HIGH and is HIGH if both are Low.
 Application:
 Half adders and Full adders:
 The half adder is used to add only two numbers.
 The full adder is used to add three 1-bit binary numbers A, B, and carry C.
 Multipliers: A binary multiplier is an electronic circuit used in digital
electronics, such as a computer, to multiply two binary numbers.
 Ripple carry adders
Chapter 3 – Logic Gates
NOR Gate:

 Algebraic Notation: Z= (X*Y)’


 Logic symbol of NOT gate:
X Y Z
 Truth Table: 0 0 1
0 1 0
1 0 0
1 1 0

Chapter 3 – Logic Gates


XOR Gate

 Exclusive OR Gate, also known as EX OR Gate or XOR Gate


 The output of an XOR gate is true only when exactly one of its
inputs is true.
 If both of an XOR gate's inputs are false, or if both of its inputs
are true, then the output of the XOR gate is false.
 If an XOR gate has more than two inputs, then its behavior
depends on its implementation.
 In the vast majority of cases, an XOR gate will output true if an
odd number of its inputs is true.
 Algebraic Notation: Z= (X Y)
 Logic symbol of NOT gate:
 Truth Table:
Chapter 3 – Logic Gates 50
Exclusive–NOR (XNOR) Gate

 Also known as a XORN’T, ENOR, EXNOR or NXOR)


 Its function is the logical complement of the exclusive OR gate
 Logically, XNOR gate is a NOT gate followed by an XOR gate
 That means the output of the XOR gate is inverted in the XNOR gate.
 The output is 0 when only one input is 0, and the output is 1
when both inputs are the same (i.e. either two 0’s or two 1’s).
 Algebraic Notation: Z= (X Y)
 Logic symbol of NOT gate:
 Truth Table:
X Y Z
0 0 1
0 1 0
1 0 0
1 1 1
Chapter 3 – Logic Gates 51
Logic Gates – Summery

Chapter 3 – Logic Gates 52

You might also like