SlideShare a Scribd company logo
1 of 37
Functions of Combinational
Logic
• Basic Adders
– Important in computers and many types of
digital systems to process numerical data
– Basic adder operations are fundamental to
the study of digital systems

IS 151 Digital Circuitry

1
The Half Adder
• Basic rules of binary addition
–0+0=0
–0+1=1
–1+0=1
– 1 + 1 = 10

• A half-adder accepts 2 binary digits on its
inputs and produces two binary digits on
its outputs – a sum bit and a carry bit
IS 151 Digital Circuitry

2
The Half Adder
• Logic symbol for the half-adder

• Truth table for the half adder
A

B

Cout

Sum

0

0

0

0

0

1

0

1

1

0

0

1

1

1

1

0
IS 151 Digital Circuitry

3
The Half Adder
• Derive expressions for the Sum and Cout
as functions of inputs A and B
• From the truth table:
– Cout is a 1 only when both A and B are 1s:
Cout = AB
– Sum is a 1 only if A and B are not equal:
Sum = A B

IS 151 Digital Circuitry

4
The Half Adder
• Half-adder logic diagram

IS 151 Digital Circuitry

5
The Full Adder
• Accepts 3 inputs including an input carry
and generates a sum output and an
output carry
• Difference between half and full-adder
– the full adder has three inputs (including an
input carry) while a half adder has only two
inputs (without the input carry)

IS 151 Digital Circuitry

6
The Full Adder
Logic symbol for a full adder

IS 151 Digital Circuitry

7
The Full Adder
• Full adder truth table
A

B

Cin

Cout

Sum

0

0

0

0

0

0

0

1

0

1

0

1

0

0

1

0

1

1

1

0

1

0

0

0

1

1

0

1

1

0

1

1

0

1

0

1

1

1

1

1

IS 151 Digital Circuitry

8
The Full Adder
• Derive expressions for the Sum and Cout
as functions of inputs A, B and Cin from the
truth table
• Alternatively, using knowledge from the
half adder:
– Sum = inputs exclusively-ORed
• Sum = (A

B) Cin

– Cout = inputs ANDed
• AB + (A B)Cin
IS 151 Digital Circuitry

9
The Full Adder
• From the truth table:
– Sum = A’B’C + A’BC’+ AB’C’ + ABC
–
= A’B’C + ABC + A’BC’ + AB’C’
–
= C(A’B’ + AB) + C’(A’B + AB’)
–
= C(AexB)’ + C’(AexB)
–
= CexAexB
–
= AexBexC

IS 151 Digital Circuitry

10
The Full Adder
• Also from the truth table:
– Carry out = A’BC + AB’C ABC’ + ABC
–
= C(A’B + AB’) + AB(C’ + C)
–
= C(AexB) + AB
–
= AB + (AexB)C

IS 151 Digital Circuitry

11
The Full Adder
• Logic circuit for full-adder

IS 151 Digital Circuitry

12
The Full Adder - Exercise
• Determine an alternative method for
implementing the full-adder
– Write SoP expressions from the truth table for
Sum and Cout
– Map the expressions on K-maps and write
simplified expressions if any
– Implement/draw the circuit diagram for the
full-adder

IS 151 Digital Circuitry

13
Parallel Binary Adders
• A single full adder is capable of adding two 1- bit
numbers and an input carry
• To add binary numbers with more than one bit,
additional full-adders must be used.
• Example, for a 2-bit number, 2 full adders are
used, 4-bit numbers, 4 full-adders are used, etc.
• The carry output of each adder is connected to
the carry input of the next higher-order adder

IS 151 Digital Circuitry

14
Parallel Binary Adders
• Block diagram of a basic 2-bit parallel
adder
General format, addition of
two 2-bit numbers

A2

B2

A1

B1

A

B Cin

A

B Cin

A2A1
+ B2B1
Σ3Σ2Σ1

Cout

(MSB) Σ3

Σ

Σ2

Cout

Σ

Σ1 (LSB)

IS 151 Digital Circuitry

15
Parallel Binary Adders
• Block diagram of a basic 4-bit parallel
adder
A4

B4

A3

B3

A2

B2

A1

B1

A

B Cin

A

B Cin

A

B Cin

A

B Cin

(MSB)

(LSB)

Cout

Σ

Cout

Σ

Cout

Σ

Cout

Σ

C4

Σ4

Σ3

IS 151 Digital Circuitry

Σ2

Σ1

16
Comparators
• Basic function – to compare the magnitudes
of two binary quantities to determine the
relationship of those quantities
• Comparators determine whether two
numbers are equal or not

IS 151 Digital Circuitry

17
Comparators
• Basic comparator operations
The input bits are equal

The input bits are not equal

The input bits are equal

IS 151 Digital Circuitry

18
Comparators
• To compare binary numbers containing 2
bits each, an additional Ex-OR gate is
required

IS 151 Digital Circuitry

19
Comparators
• The two LSBs of the two numbers are compared
by gate G1, and the MSBs are compared by gate
G2
– Binary number A = A1A0
– Binary number B = B1B0

• If the two numbers are equal, their
corresponding bits are the same, and the output
of each Ex-OR gate is a 0
• The 0s are inverted using the inverter, producing
1s
• The 1s are ANDed, producing a 1, which
indicates equality
IS 151 Digital Circuitry

20
Comparators
• If the corresponding sets of bits are not equal,
i.e. A0≠B0, or A1≠B1, a 1 occurs on that Ex-OR
gate output (G1 or G2)
• In order to produce a single output indicating an
equality or inequality of two numbers, two
inverters and an AND gate are used
• When the two inputs are not equal, a 1,0 or 0,1
appears on the inputs of the AND gate,
producing a 0, indicating inequality
IS 151 Digital Circuitry

21
Comparators - Examples
• Determine whether A and B are equal (or
not) by following the logic levels through
the circuit
– a) A0 = 1, B0 = 0 and A1 = 1, B1 = 0
– b) A0 = 1, B0 = 1 and A1 = 1, B1 = 0

IS 151 Digital Circuitry

22
4-bit Comparators
• To determine if two numbers are equal
• If not, determine which one is greater or
less than the other
• Numbers
– A = A3A2A1A0
– B = B3B2B1B0

IS 151 Digital Circuitry

23
4-bit Comparators
• Determine the inequality by examining
highest-order bit in each other
– If A3 = 1 and B3 = 0; A > B
– If A3 = 0 and B3 = 1; A < B
– If A3 = B3, examine the next lower bit position
for an inequality (i.e. A2 with B2)

IS 151 Digital Circuitry

24
4-bit Comparators
• The three observations are valid for each
bit position in the numbers
• Check for an inequality in a bit position,
starting with the highest order bits
• When such an inequality is found, the
relationship of the two numbers is
established, and any other inequalities in
lower-order bit positions are ignored
IS 151 Digital Circuitry

25
Comparators - Example
• Implement a circuit to compare the relationship
between A and B
A

B

A>B

A=B

A<B

0

0

0

1

0

0

1

0

0

1

1

0

1

0

0

1

1

0

1

For A > B (G): G = AB’
For A = B (E): E = A’B’ + AB
For A < B (L): L = A’B

0

IS 151 Digital Circuitry

26
Decoders
• Function – to detect the presence of a
specified combination of bits (code) on
inputs and to indicate the presence of that
code by a specified output level
• n-input lines (to handle n bits)
• 1 to 2n output lines to indicate the
presence of 1 or more n-bit combinations

IS 151 Digital Circuitry

27
Decoders
• Example: determine when a binary 1001 occurs on the
inputs of a digital circuit
• Use AND gate; make sure that all of the inputs to the AND
gate are HIGH when the binary number 1001 occurs

IS 151 Digital Circuitry

28
Decoders
• Exercise: develop the logic required to
detect the binary code 10010 and produce
an active-LOW output (0)

IS 151 Digital Circuitry

29
Decoders - Application
• BCD-to-Decimal decoder
– Converts each BCD code into one of 10 possible decimal
digits
Decimal
Digit

BCD Code
A3 A2 A1 A0

BCD Decoding Function

0

0

0

0

0

A3’ A2’ A1’ A0’

1

0

0

0

1

2

0

0

1

0

3

0

0

1

1

4

0

1

0

0

5

0

1

0

1

6

0

1

1

0

7

0

1

1

1

8

1

0

0

0

9

1

0

0

1

IS 151 Digital Circuitry

30
Encoders
• A combinational logic circuit that performs
a reverse decoder function
• Accepts an active level on one of its inputs
(e.g. a decimal or octal digit) and converts
it to a coded output, e.g. BCD or binary

IS 151 Digital Circuitry

31
Encoders
• The Decimal-to-BCD Encoder (10-line-to-4-line encoder)
– Ten inputs (one for each decimal digit)
– Four outputs corresponding to the BCD code
• Logic symbol for a decimal-to-BCD encoder

Decimal
Input

DEC/BCD
0
1
2
3
1
4
2
5
4
6
8
7
8
9

BCD
Output

IS 151 Digital Circuitry

32
Encoders
• From the BCD/Decimal table, determine
the relationship between each BCD bit and
the decimal digits in order to analyse the
logic.
– Example
–
–
–
–

A3 = 8 + 9
A2 = 4 + 5 + 6 + 7
A1 = 2 + 3 + 6 + 7
A0 = 1 + 3 + 5 + 7 + 9

IS 151 Digital Circuitry

33
Encoders
• Example: if input line 9 is HIGH (assume
all others are LOW), it will produce a HIGH
on A3 and A0, and a LOW on A1and A2 –
which is 1001, meaning decimal 9.

IS 151 Digital Circuitry

34
Encoders - Exercise
• Implement the
logic circuit for the
10-line-to-4-line
encoder using the
logic expressions
for the BCD
codes A3 to A0
and inputs 0 to 9

IS 151 Digital Circuitry

35
Logic Functions Exercise
(Lab 3)
• Design and test a circuit to implement the
function of the full adder (refer to lecture)

IS 151 Digital Circuitry

36
• End of Lecture

IS 151 Digital Circuitry

37

More Related Content

What's hot

MicroProgrammed Explained .
MicroProgrammed Explained .MicroProgrammed Explained .
MicroProgrammed Explained .Muhammad Umar
 
Computer organisation Module 1.ppt
Computer organisation Module 1.pptComputer organisation Module 1.ppt
Computer organisation Module 1.pptSoulReaper21
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051SARITHA REDDY
 
8051 Addressing Modes
8051 Addressing Modes8051 Addressing Modes
8051 Addressing ModesSenthil Kumar
 
COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)Sairam Adithya
 
Multiplexers and Demultiplexers
Multiplexers and DemultiplexersMultiplexers and Demultiplexers
Multiplexers and DemultiplexersGargiKhanna1
 
Nand and nor as a universal gates
Nand and nor as a universal gatesNand and nor as a universal gates
Nand and nor as a universal gatesKaushal Shah
 
SUMMING AMPLIFIER
SUMMING AMPLIFIERSUMMING AMPLIFIER
SUMMING AMPLIFIERAK138
 
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...Asst.prof M.Gokilavani
 
OSCILATORS introduction & ring oscillator
OSCILATORS introduction & ring oscillator OSCILATORS introduction & ring oscillator
OSCILATORS introduction & ring oscillator NandanavanamRajesh1
 
0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architectureaamc1100
 
8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijay8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijayVijay Kumar
 
Full custom digital ic design of priority encoder
Full custom digital ic design of priority encoderFull custom digital ic design of priority encoder
Full custom digital ic design of priority encoderVishesh Thakur
 
Unit 5 I/O organization
Unit 5   I/O organizationUnit 5   I/O organization
Unit 5 I/O organizationchidabdu
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorMOHIT AGARWAL
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexersUnsa Shakir
 

What's hot (20)

MicroProgrammed Explained .
MicroProgrammed Explained .MicroProgrammed Explained .
MicroProgrammed Explained .
 
Computer organisation Module 1.ppt
Computer organisation Module 1.pptComputer organisation Module 1.ppt
Computer organisation Module 1.ppt
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
8051 Addressing Modes
8051 Addressing Modes8051 Addressing Modes
8051 Addressing Modes
 
Interrupts
InterruptsInterrupts
Interrupts
 
COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)
 
Input output module
Input output moduleInput output module
Input output module
 
Multiplexers and Demultiplexers
Multiplexers and DemultiplexersMultiplexers and Demultiplexers
Multiplexers and Demultiplexers
 
Nand and nor as a universal gates
Nand and nor as a universal gatesNand and nor as a universal gates
Nand and nor as a universal gates
 
SUMMING AMPLIFIER
SUMMING AMPLIFIERSUMMING AMPLIFIER
SUMMING AMPLIFIER
 
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
 
OSCILATORS introduction & ring oscillator
OSCILATORS introduction & ring oscillator OSCILATORS introduction & ring oscillator
OSCILATORS introduction & ring oscillator
 
0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architecture
 
8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijay8254 Programmable Interval Timer by vijay
8254 Programmable Interval Timer by vijay
 
Program control
Program controlProgram control
Program control
 
Full custom digital ic design of priority encoder
Full custom digital ic design of priority encoderFull custom digital ic design of priority encoder
Full custom digital ic design of priority encoder
 
Unit 5 I/O organization
Unit 5   I/O organizationUnit 5   I/O organization
Unit 5 I/O organization
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexers
 
Programmable Timer 8253/8254
Programmable Timer 8253/8254Programmable Timer 8253/8254
Programmable Timer 8253/8254
 

Viewers also liked

IS 151 Lecture 2
IS 151 Lecture 2IS 151 Lecture 2
IS 151 Lecture 2wajanga
 
IS 151 Lecture 11
IS 151 Lecture 11IS 151 Lecture 11
IS 151 Lecture 11wajanga
 
02 combinational logic
02 combinational logic02 combinational logic
02 combinational logicZainab Noor
 
Comparison among Different Adders
Comparison among Different Adders Comparison among Different Adders
Comparison among Different Adders iosrjce
 
3Sem-Logic Design Notes-Unit4-Design and Analysis of Combinational Logic
 3Sem-Logic Design Notes-Unit4-Design and Analysis of Combinational Logic 3Sem-Logic Design Notes-Unit4-Design and Analysis of Combinational Logic
3Sem-Logic Design Notes-Unit4-Design and Analysis of Combinational LogicDr. Shivananda Koteshwar
 
Copy of 7.digital basicsa
Copy of 7.digital basicsaCopy of 7.digital basicsa
Copy of 7.digital basicsaChethan Nt
 
9.sequential+circuits part+1
9.sequential+circuits part+1 9.sequential+circuits part+1
9.sequential+circuits part+1 liran1018
 
IS 151 - Lecture 3
IS 151 - Lecture 3IS 151 - Lecture 3
IS 151 - Lecture 3wajanga
 
Lecture11 combinational logic dynamics
Lecture11 combinational logic dynamicsLecture11 combinational logic dynamics
Lecture11 combinational logic dynamicsvidhya DS
 
different logic full adders
different logic full addersdifferent logic full adders
different logic full addersGuna Sekhar
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor LogicDiwaker Pant
 
CMOS Topic 6 -_designing_combinational_logic_circuits
CMOS Topic 6 -_designing_combinational_logic_circuitsCMOS Topic 6 -_designing_combinational_logic_circuits
CMOS Topic 6 -_designing_combinational_logic_circuitsIkhwan_Fakrudin
 
Introduction to VLSI
Introduction to VLSI Introduction to VLSI
Introduction to VLSI illpa
 

Viewers also liked (16)

IS 151 Lecture 2
IS 151 Lecture 2IS 151 Lecture 2
IS 151 Lecture 2
 
IS 151 Lecture 11
IS 151 Lecture 11IS 151 Lecture 11
IS 151 Lecture 11
 
02 combinational logic
02 combinational logic02 combinational logic
02 combinational logic
 
Comparison among Different Adders
Comparison among Different Adders Comparison among Different Adders
Comparison among Different Adders
 
vlsi
vlsivlsi
vlsi
 
3Sem-Logic Design Notes-Unit4-Design and Analysis of Combinational Logic
 3Sem-Logic Design Notes-Unit4-Design and Analysis of Combinational Logic 3Sem-Logic Design Notes-Unit4-Design and Analysis of Combinational Logic
3Sem-Logic Design Notes-Unit4-Design and Analysis of Combinational Logic
 
Copy of 7.digital basicsa
Copy of 7.digital basicsaCopy of 7.digital basicsa
Copy of 7.digital basicsa
 
9.sequential+circuits part+1
9.sequential+circuits part+1 9.sequential+circuits part+1
9.sequential+circuits part+1
 
IS 151 - Lecture 3
IS 151 - Lecture 3IS 151 - Lecture 3
IS 151 - Lecture 3
 
Lecture11 combinational logic dynamics
Lecture11 combinational logic dynamicsLecture11 combinational logic dynamics
Lecture11 combinational logic dynamics
 
different logic full adders
different logic full addersdifferent logic full adders
different logic full adders
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
 
Analog vlsi
Analog vlsiAnalog vlsi
Analog vlsi
 
CMOS Topic 6 -_designing_combinational_logic_circuits
CMOS Topic 6 -_designing_combinational_logic_circuitsCMOS Topic 6 -_designing_combinational_logic_circuits
CMOS Topic 6 -_designing_combinational_logic_circuits
 
Introduction to VLSI
Introduction to VLSI Introduction to VLSI
Introduction to VLSI
 
Pass transistor logic
Pass transistor logicPass transistor logic
Pass transistor logic
 

Similar to IS 151 Lecture 9

FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsFYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsArti Parab Academics
 
18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptx18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptxtakix43466
 
Comparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.pptComparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.pptHardikGupta400524
 
DLD Lecture No 20 Look Ahead Carry Generator, Binary Subtractors and BCD Add...
DLD Lecture No 20 Look Ahead Carry Generator, Binary Subtractors and  BCD Add...DLD Lecture No 20 Look Ahead Carry Generator, Binary Subtractors and  BCD Add...
DLD Lecture No 20 Look Ahead Carry Generator, Binary Subtractors and BCD Add...SaveraAyub2
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIEr. Nawaraj Bhandari
 
DLD Lecture No 19 Binary adders.pptx
DLD Lecture No 19  Binary adders.pptxDLD Lecture No 19  Binary adders.pptx
DLD Lecture No 19 Binary adders.pptxSaveraAyub2
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).pptThanmayiKumar
 
Arithmetic Microoperation.pdf
Arithmetic Microoperation.pdfArithmetic Microoperation.pdf
Arithmetic Microoperation.pdfHarshitJ4
 
I semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptxI semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptxMayank Pandey
 
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...UmerKhan147799
 
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECESeshaVidhyaS
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logicDeepak John
 
Unit 4 combinational circuit
Unit 4 combinational circuitUnit 4 combinational circuit
Unit 4 combinational circuitKalai Selvi
 

Similar to IS 151 Lecture 9 (20)

Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsFYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
 
18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptx18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptx
 
Comparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.pptComparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.ppt
 
DLD Lecture No 20 Look Ahead Carry Generator, Binary Subtractors and BCD Add...
DLD Lecture No 20 Look Ahead Carry Generator, Binary Subtractors and  BCD Add...DLD Lecture No 20 Look Ahead Carry Generator, Binary Subtractors and  BCD Add...
DLD Lecture No 20 Look Ahead Carry Generator, Binary Subtractors and BCD Add...
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 
DLD Chapter-4.pdf
DLD Chapter-4.pdfDLD Chapter-4.pdf
DLD Chapter-4.pdf
 
DLD Lecture No 19 Binary adders.pptx
DLD Lecture No 19  Binary adders.pptxDLD Lecture No 19  Binary adders.pptx
DLD Lecture No 19 Binary adders.pptx
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 
Arithmetic Microoperation.pdf
Arithmetic Microoperation.pdfArithmetic Microoperation.pdf
Arithmetic Microoperation.pdf
 
I semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptxI semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptx
 
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
 
COA(Unit_3.pptx)
COA(Unit_3.pptx)COA(Unit_3.pptx)
COA(Unit_3.pptx)
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Unit 4 combinational circuit
Unit 4 combinational circuitUnit 4 combinational circuit
Unit 4 combinational circuit
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Fulll Adder
Fulll AdderFulll Adder
Fulll Adder
 

More from wajanga

IS 151 Lecture 3
IS 151 Lecture 3IS 151 Lecture 3
IS 151 Lecture 3wajanga
 
IS 151 Lecture 1
IS 151 Lecture 1IS 151 Lecture 1
IS 151 Lecture 1wajanga
 
IS 151 Outline 2014
IS 151 Outline 2014IS 151 Outline 2014
IS 151 Outline 2014wajanga
 
IS 139 Assignment 3
IS 139 Assignment 3IS 139 Assignment 3
IS 139 Assignment 3wajanga
 
IS 139 Lecture 7
IS 139 Lecture 7IS 139 Lecture 7
IS 139 Lecture 7wajanga
 
IS 139 Lecture 6
IS 139 Lecture 6IS 139 Lecture 6
IS 139 Lecture 6wajanga
 
IS 139 Assignment 2
IS 139 Assignment 2IS 139 Assignment 2
IS 139 Assignment 2wajanga
 
IS 139 Lecture 5
IS 139 Lecture 5IS 139 Lecture 5
IS 139 Lecture 5wajanga
 
IS 139 Lecture 4
IS 139 Lecture 4IS 139 Lecture 4
IS 139 Lecture 4wajanga
 
IS 139 Assignment 1
IS 139 Assignment 1IS 139 Assignment 1
IS 139 Assignment 1wajanga
 
IS 139 Lecture 3
IS 139 Lecture 3IS 139 Lecture 3
IS 139 Lecture 3wajanga
 
IS 139 Lecture 1
IS 139 Lecture 1IS 139 Lecture 1
IS 139 Lecture 1wajanga
 
IS 139 Lecture 2
IS 139 Lecture 2IS 139 Lecture 2
IS 139 Lecture 2wajanga
 
IS 151 Lecture 10
IS 151 Lecture 10IS 151 Lecture 10
IS 151 Lecture 10wajanga
 
IS 151 Lecture 8
IS 151 Lecture 8IS 151 Lecture 8
IS 151 Lecture 8wajanga
 
IS 151 Lecture 7
IS 151 Lecture 7IS 151 Lecture 7
IS 151 Lecture 7wajanga
 
IS 151 Lecture 6
IS 151 Lecture 6IS 151 Lecture 6
IS 151 Lecture 6wajanga
 
IS 151 Lecture 6
IS 151 Lecture 6IS 151 Lecture 6
IS 151 Lecture 6wajanga
 
IS 151 Lecture 5
IS 151 Lecture 5IS 151 Lecture 5
IS 151 Lecture 5wajanga
 
IS 151 lecture 4
IS 151   lecture 4IS 151   lecture 4
IS 151 lecture 4wajanga
 

More from wajanga (20)

IS 151 Lecture 3
IS 151 Lecture 3IS 151 Lecture 3
IS 151 Lecture 3
 
IS 151 Lecture 1
IS 151 Lecture 1IS 151 Lecture 1
IS 151 Lecture 1
 
IS 151 Outline 2014
IS 151 Outline 2014IS 151 Outline 2014
IS 151 Outline 2014
 
IS 139 Assignment 3
IS 139 Assignment 3IS 139 Assignment 3
IS 139 Assignment 3
 
IS 139 Lecture 7
IS 139 Lecture 7IS 139 Lecture 7
IS 139 Lecture 7
 
IS 139 Lecture 6
IS 139 Lecture 6IS 139 Lecture 6
IS 139 Lecture 6
 
IS 139 Assignment 2
IS 139 Assignment 2IS 139 Assignment 2
IS 139 Assignment 2
 
IS 139 Lecture 5
IS 139 Lecture 5IS 139 Lecture 5
IS 139 Lecture 5
 
IS 139 Lecture 4
IS 139 Lecture 4IS 139 Lecture 4
IS 139 Lecture 4
 
IS 139 Assignment 1
IS 139 Assignment 1IS 139 Assignment 1
IS 139 Assignment 1
 
IS 139 Lecture 3
IS 139 Lecture 3IS 139 Lecture 3
IS 139 Lecture 3
 
IS 139 Lecture 1
IS 139 Lecture 1IS 139 Lecture 1
IS 139 Lecture 1
 
IS 139 Lecture 2
IS 139 Lecture 2IS 139 Lecture 2
IS 139 Lecture 2
 
IS 151 Lecture 10
IS 151 Lecture 10IS 151 Lecture 10
IS 151 Lecture 10
 
IS 151 Lecture 8
IS 151 Lecture 8IS 151 Lecture 8
IS 151 Lecture 8
 
IS 151 Lecture 7
IS 151 Lecture 7IS 151 Lecture 7
IS 151 Lecture 7
 
IS 151 Lecture 6
IS 151 Lecture 6IS 151 Lecture 6
IS 151 Lecture 6
 
IS 151 Lecture 6
IS 151 Lecture 6IS 151 Lecture 6
IS 151 Lecture 6
 
IS 151 Lecture 5
IS 151 Lecture 5IS 151 Lecture 5
IS 151 Lecture 5
 
IS 151 lecture 4
IS 151   lecture 4IS 151   lecture 4
IS 151 lecture 4
 

Recently uploaded

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Recently uploaded (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

IS 151 Lecture 9

  • 1. Functions of Combinational Logic • Basic Adders – Important in computers and many types of digital systems to process numerical data – Basic adder operations are fundamental to the study of digital systems IS 151 Digital Circuitry 1
  • 2. The Half Adder • Basic rules of binary addition –0+0=0 –0+1=1 –1+0=1 – 1 + 1 = 10 • A half-adder accepts 2 binary digits on its inputs and produces two binary digits on its outputs – a sum bit and a carry bit IS 151 Digital Circuitry 2
  • 3. The Half Adder • Logic symbol for the half-adder • Truth table for the half adder A B Cout Sum 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 IS 151 Digital Circuitry 3
  • 4. The Half Adder • Derive expressions for the Sum and Cout as functions of inputs A and B • From the truth table: – Cout is a 1 only when both A and B are 1s: Cout = AB – Sum is a 1 only if A and B are not equal: Sum = A B IS 151 Digital Circuitry 4
  • 5. The Half Adder • Half-adder logic diagram IS 151 Digital Circuitry 5
  • 6. The Full Adder • Accepts 3 inputs including an input carry and generates a sum output and an output carry • Difference between half and full-adder – the full adder has three inputs (including an input carry) while a half adder has only two inputs (without the input carry) IS 151 Digital Circuitry 6
  • 7. The Full Adder Logic symbol for a full adder IS 151 Digital Circuitry 7
  • 8. The Full Adder • Full adder truth table A B Cin Cout Sum 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 IS 151 Digital Circuitry 8
  • 9. The Full Adder • Derive expressions for the Sum and Cout as functions of inputs A, B and Cin from the truth table • Alternatively, using knowledge from the half adder: – Sum = inputs exclusively-ORed • Sum = (A B) Cin – Cout = inputs ANDed • AB + (A B)Cin IS 151 Digital Circuitry 9
  • 10. The Full Adder • From the truth table: – Sum = A’B’C + A’BC’+ AB’C’ + ABC – = A’B’C + ABC + A’BC’ + AB’C’ – = C(A’B’ + AB) + C’(A’B + AB’) – = C(AexB)’ + C’(AexB) – = CexAexB – = AexBexC IS 151 Digital Circuitry 10
  • 11. The Full Adder • Also from the truth table: – Carry out = A’BC + AB’C ABC’ + ABC – = C(A’B + AB’) + AB(C’ + C) – = C(AexB) + AB – = AB + (AexB)C IS 151 Digital Circuitry 11
  • 12. The Full Adder • Logic circuit for full-adder IS 151 Digital Circuitry 12
  • 13. The Full Adder - Exercise • Determine an alternative method for implementing the full-adder – Write SoP expressions from the truth table for Sum and Cout – Map the expressions on K-maps and write simplified expressions if any – Implement/draw the circuit diagram for the full-adder IS 151 Digital Circuitry 13
  • 14. Parallel Binary Adders • A single full adder is capable of adding two 1- bit numbers and an input carry • To add binary numbers with more than one bit, additional full-adders must be used. • Example, for a 2-bit number, 2 full adders are used, 4-bit numbers, 4 full-adders are used, etc. • The carry output of each adder is connected to the carry input of the next higher-order adder IS 151 Digital Circuitry 14
  • 15. Parallel Binary Adders • Block diagram of a basic 2-bit parallel adder General format, addition of two 2-bit numbers A2 B2 A1 B1 A B Cin A B Cin A2A1 + B2B1 Σ3Σ2Σ1 Cout (MSB) Σ3 Σ Σ2 Cout Σ Σ1 (LSB) IS 151 Digital Circuitry 15
  • 16. Parallel Binary Adders • Block diagram of a basic 4-bit parallel adder A4 B4 A3 B3 A2 B2 A1 B1 A B Cin A B Cin A B Cin A B Cin (MSB) (LSB) Cout Σ Cout Σ Cout Σ Cout Σ C4 Σ4 Σ3 IS 151 Digital Circuitry Σ2 Σ1 16
  • 17. Comparators • Basic function – to compare the magnitudes of two binary quantities to determine the relationship of those quantities • Comparators determine whether two numbers are equal or not IS 151 Digital Circuitry 17
  • 18. Comparators • Basic comparator operations The input bits are equal The input bits are not equal The input bits are equal IS 151 Digital Circuitry 18
  • 19. Comparators • To compare binary numbers containing 2 bits each, an additional Ex-OR gate is required IS 151 Digital Circuitry 19
  • 20. Comparators • The two LSBs of the two numbers are compared by gate G1, and the MSBs are compared by gate G2 – Binary number A = A1A0 – Binary number B = B1B0 • If the two numbers are equal, their corresponding bits are the same, and the output of each Ex-OR gate is a 0 • The 0s are inverted using the inverter, producing 1s • The 1s are ANDed, producing a 1, which indicates equality IS 151 Digital Circuitry 20
  • 21. Comparators • If the corresponding sets of bits are not equal, i.e. A0≠B0, or A1≠B1, a 1 occurs on that Ex-OR gate output (G1 or G2) • In order to produce a single output indicating an equality or inequality of two numbers, two inverters and an AND gate are used • When the two inputs are not equal, a 1,0 or 0,1 appears on the inputs of the AND gate, producing a 0, indicating inequality IS 151 Digital Circuitry 21
  • 22. Comparators - Examples • Determine whether A and B are equal (or not) by following the logic levels through the circuit – a) A0 = 1, B0 = 0 and A1 = 1, B1 = 0 – b) A0 = 1, B0 = 1 and A1 = 1, B1 = 0 IS 151 Digital Circuitry 22
  • 23. 4-bit Comparators • To determine if two numbers are equal • If not, determine which one is greater or less than the other • Numbers – A = A3A2A1A0 – B = B3B2B1B0 IS 151 Digital Circuitry 23
  • 24. 4-bit Comparators • Determine the inequality by examining highest-order bit in each other – If A3 = 1 and B3 = 0; A > B – If A3 = 0 and B3 = 1; A < B – If A3 = B3, examine the next lower bit position for an inequality (i.e. A2 with B2) IS 151 Digital Circuitry 24
  • 25. 4-bit Comparators • The three observations are valid for each bit position in the numbers • Check for an inequality in a bit position, starting with the highest order bits • When such an inequality is found, the relationship of the two numbers is established, and any other inequalities in lower-order bit positions are ignored IS 151 Digital Circuitry 25
  • 26. Comparators - Example • Implement a circuit to compare the relationship between A and B A B A>B A=B A<B 0 0 0 1 0 0 1 0 0 1 1 0 1 0 0 1 1 0 1 For A > B (G): G = AB’ For A = B (E): E = A’B’ + AB For A < B (L): L = A’B 0 IS 151 Digital Circuitry 26
  • 27. Decoders • Function – to detect the presence of a specified combination of bits (code) on inputs and to indicate the presence of that code by a specified output level • n-input lines (to handle n bits) • 1 to 2n output lines to indicate the presence of 1 or more n-bit combinations IS 151 Digital Circuitry 27
  • 28. Decoders • Example: determine when a binary 1001 occurs on the inputs of a digital circuit • Use AND gate; make sure that all of the inputs to the AND gate are HIGH when the binary number 1001 occurs IS 151 Digital Circuitry 28
  • 29. Decoders • Exercise: develop the logic required to detect the binary code 10010 and produce an active-LOW output (0) IS 151 Digital Circuitry 29
  • 30. Decoders - Application • BCD-to-Decimal decoder – Converts each BCD code into one of 10 possible decimal digits Decimal Digit BCD Code A3 A2 A1 A0 BCD Decoding Function 0 0 0 0 0 A3’ A2’ A1’ A0’ 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1 IS 151 Digital Circuitry 30
  • 31. Encoders • A combinational logic circuit that performs a reverse decoder function • Accepts an active level on one of its inputs (e.g. a decimal or octal digit) and converts it to a coded output, e.g. BCD or binary IS 151 Digital Circuitry 31
  • 32. Encoders • The Decimal-to-BCD Encoder (10-line-to-4-line encoder) – Ten inputs (one for each decimal digit) – Four outputs corresponding to the BCD code • Logic symbol for a decimal-to-BCD encoder Decimal Input DEC/BCD 0 1 2 3 1 4 2 5 4 6 8 7 8 9 BCD Output IS 151 Digital Circuitry 32
  • 33. Encoders • From the BCD/Decimal table, determine the relationship between each BCD bit and the decimal digits in order to analyse the logic. – Example – – – – A3 = 8 + 9 A2 = 4 + 5 + 6 + 7 A1 = 2 + 3 + 6 + 7 A0 = 1 + 3 + 5 + 7 + 9 IS 151 Digital Circuitry 33
  • 34. Encoders • Example: if input line 9 is HIGH (assume all others are LOW), it will produce a HIGH on A3 and A0, and a LOW on A1and A2 – which is 1001, meaning decimal 9. IS 151 Digital Circuitry 34
  • 35. Encoders - Exercise • Implement the logic circuit for the 10-line-to-4-line encoder using the logic expressions for the BCD codes A3 to A0 and inputs 0 to 9 IS 151 Digital Circuitry 35
  • 36. Logic Functions Exercise (Lab 3) • Design and test a circuit to implement the function of the full adder (refer to lecture) IS 151 Digital Circuitry 36
  • 37. • End of Lecture IS 151 Digital Circuitry 37