Digital Electronics. Functions of Combinational Logic

Similar documents
CHW 261: Logic Design

Digital Fundamentals

2 Building Blocks. There is often the need to compare two binary values.

COMBINATIONAL CIRCUIT

Combinational Logic Circuits. Combinational Logic

UNIT-IV Combinational Logic

Module 4: Design and Analysis of Combinational Circuits 1. Module-4. Design and Analysis of Combinational Circuits

Digital Electronics 8. Multiplexer & Demultiplexer

Function Table of an Odd-Parity Generator Circuit

FUNCTION OF COMBINATIONAL LOGIC CIRCUIT

Unit 3. Logic Design

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Function Table of 74LS138, 3-to-8 Decoder +5V 6 G1 4 G2A 5 G2B. 4-to-16 Decoder using two 74LS139, 3-to-8 Decoder

Combinational Circuits DC-IV (Part I) Notes

EXPERIMENT NO 1 TRUTH TABLE (1)

TABLE 3-2 Truth Table for Code Converter Example

DELD UNIT 3. Question Option A Option B Option C Option D Correct Option A B C

Laboratory Manual CS (P) Digital Systems Lab

Digital Applications (CETT 1415) Credit: 4 semester credit hours (3 hours lecture, 4 hours lab) Prerequisite: CETT 1403 & CETT 1405

LOGIC DIAGRAM: HALF ADDER TRUTH TABLE: A B CARRY SUM. 2012/ODD/III/ECE/DE/LM Page No. 1

Combinational Circuits: Multiplexers, Decoders, Programmable Logic Devices

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

SRV ENGINEERING COLLEGE SEMBODAI RUKMANI VARATHARAJAN ENGINEERING COLLEGE SEMBODAI

Number system: the system used to count discrete units is called number. Decimal system: the number system that contains 10 distinguished

Digital Logic and Design (Course Code: EE222) Lecture 14: Combinational Contd.. Decoders/Encoders

LIST OF EXPERIMENTS. KCTCET/ /Odd/3rd/ETE/CSE/LM

Digital Logic Design ELCT 201

Topic Notes: Digital Logic

Fan in: The number of inputs of a logic gate can handle.

Department of Electronics and Communication Engineering

Department of Electrical and Electronics Engineering Logic Circuits Laboratory EXPERIMENT-5 COMBINATIONAL LOGIC CIRCUITS

LOGIC GATES AND LOGIC CIRCUITS A logic gate is an elementary building block of a Digital Circuit. Most logic gates have two inputs and one output.


Experiment # 4. Binary Addition & Subtraction. Eng. Waleed Y. Mousa

DM Segment Decoder/Driver/Latch with Constant Current Sink Outputs

Digital Applications (CETT 1415) Credit: 4 semester credit hours (3 hours lecture, 4 hours lab) Prerequisite: CETT 1403 & CETT 1405

16 Multiplexers and De-multiplexers using gates and ICs. (74150, 74154)

COLLEGE OF ENGINEERING, NASIK

COMBINATIONAL LOGIC CIRCUIT First Class. Dr. AMMAR ABDUL-HAMED KHADER

MSI Design Examples. Designing a circuit that adds three 4-bit numbers

Logic Symbols with Truth Tables INVERTER A B NAND A B C NOR C A B A B C XNOR A B C A B Digital Logic 1

UNIT III. Designing Combinatorial Circuits. Adders

DM Segment Decoder/Driver/Latch with Constant Current Sink Outputs

CONTENTS Sl. No. Experiment Page No

Sr. No. Instrument Specifications. TTL (Transistor-Transistor Logic) based on bipolar junction transistors

Practical Workbook Logic Design & Switching Theory

Winter 14 EXAMINATION Subject Code: Model Answer P a g e 1/28

Satish Chandra, Assistant Professor, P P N College, Kanpur 1

Electronics. Digital Electronics

Programmable Logic Arrays (PLAs)

IES Digital Mock Test

Synthesis of Combinational Logic

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) SUMMER-16 EXAMINATION Model Answer

CS302 - Digital Logic Design Glossary By

Odd-Prime Number Detector The table of minterms is represented. Table 13.1

Logic Circuit Design

Chapter 3 Combinational Logic Design

(a) (b) (c) (d) (e) (a) (b) (c) (d) (e)

Lab 2: Combinational Circuits Design

Programmable Logic Arrays (PLAs)

Subtractor Logic Schematic

Combinational Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

Gates and and Circuits

Experiment # 3 Combinational Circuits (I) Binary Addition and Subtraction

Lecture 15 Analysis of Combinational Circuits

Homework Problem Set: Combinational Devices & ASM Charts. Answer all questions on this sheet. You may attach additional pages if necessary.

DIGITAL LOGIC COMPUTER SCIENCE

University of Technology

(CSC-3501) Lecture 6 (31 Jan 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

In this lecture: Lecture 8: ROM & Programmable Logic Devices

Solutions. ICS 151 Final. Q1 Q2 Q3 Q4 Total Credit Score. Instructions: Student ID. (Last Name) (First Name) Signature

Analog-to-Digital Converter (ADC) And Digital-to-Analog Converter (DAC)

ICS 151 Final. (Last Name) (First Name)

Code No: R Set No. 1

Combinational logic. ! Regular logic: multiplexers, decoders, LUTs and FPGAs. ! Switches, basic logic and truth tables, logic functions

Lecture 3: Logic circuit. Combinational circuit and sequential circuit

COMPUTER ARCHITECTURE AND ORGANIZATION

EXPERIMENT 12: DIGITAL LOGIC CIRCUITS

I. Computational Logic and the Five Basic Logic Gates 1

DO NOT COPY DO NOT COPY

Analog to Digital Conversion

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

DESIGN OF BINARY MULTIPLIER USING ADDERS

CSE 370 Winter Homework 5 Solutions

Lecture 2. Digital Basics

Digital Fundamentals

GATE Online Free Material

JEFFERSON COLLEGE COURSE SYLLABUS ETC255 INTRODUCTION TO DIGITAL CIRCUITS. 6 Credit Hours. Prepared by: Dennis Eimer

Encoders. Lecture 23 5

EECS 150 Homework 4 Solutions Fall 2008

Lecture 6: Digital/Analog Techniques

WEEK 4.1. ECE124 Digital Circuits and Systems Page 1

Chapter 4 Logic Functions and Gates

Combinational Logic. Combinational Logic Design Process, Three State Buffers, Decoders, Multiplexers, Encoders, Demultiplexers, Other Considerations

Linear & Digital IC Applications (BRIDGE COURSE)

A Highly Efficient Carry Select Adder

Adder Comparator 7 segment display Decoder for 7 segment display D flip flop Analysis of sequential circuits. Sequence detector

Gates and Circuits 1

Digital Fundamentals 8/25/2016. Summary. Summary. Floyd. Chapter 1. Analog Quantities

Gujarat University B. Sc. Electronics Semester I: ELE (Effective from: )

Transcription:

Digital Electronics Functions of Combinational Logic

Half-dder Basic rules of binary addition are performed by a half adder, which has two binary inputs ( and B) and two binary outputs (Carry out and Sum). The inputs and outputs can be summarized on a truth table. Inputs Outputs B C out The logic symbol and equivalent circuit are: B C out B Cout Slide Set 6 ELEC

Full-dder By contrast, a full adder has three binary inputs (, B, and Carry in) and two binary outputs (Carry out and Sum). The truth table summarizes the operation. full-adder can be constructed from two half adders as shown: B B Cin C out B C out Sum Cout Inputs B B C in C in Outputs C out C out Symbol Slide Set 6 ELEC

Full-dder Sum For the given inputs, determine the intermediate and final outputs of the full adder. B C out B C out The first half-adder has inputs of and ; therefore the Sum = and the Carry out =. The second half-adder has inputs of and ; therefore the Sum = and the Carry out =. The OR gate has inputs of and, therefore the final carry out =. Cout Slide Set 6 ELEC 4

Slide Set 6 ELEC 5 Full-dder Outputs Inputs B C out C in B C out B C out Sum Cout Notice that the result from the previous example can be read directly on the truth table for a full adder.

Parallel dders Full adders are combined into parallel adders that can add binary numbers with multiple bits. 4-bit adder is shown. 4 B4 B B B C B C in B C in B C in B C in C out C out C out C out c4 4 c c c The output carry (C 4 ) is not ready until it propagates through all of the full adders. This is called ripple carry, delaying the addition process. Slide Set 6 ELEC 6

Parallel dders The logic symbol for a 4-bit parallel adder is shown. This 4-bit adder includes a carry in (labeled (C ) and a Carry out (labeled C 4 ). Binary number Binary number B Input carry 4 4 4 C C 4 4-bit sum Output carry The 74LS8 is an example. It features look-ahead carry, which adds logic to minimize the output carry delay. For the 74LS8, the maximum delay to the output carry is 7 ns. Slide Set 6 ELEC 7

Comparators The function of a comparator is to compare the magnitudes of two binary numbers to determine the relationship between them. In the simplest form, a comparator can test for equality using XNOR gates. How could you test two 4-bit numbers for equality? ND the outputs of four XNOR gates. B B B 4 B4 Output Slide Set 6 ELEC 8

Comparators IC comparators provide outputs to indicate which of the numbers is larger or if they are equal. The bits are numbered starting at, rather than as in the case of adders. Cascading inputs are provided to expand the comparator to larger numbers. Cascading inputs B B B B COMP > B > B = B = B < B < B B Outputs The IC shown is the 4-bit 74LS85. Slide Set 6 ELEC 9

Comparators IC comparators can be expanded using the cascading inputs as shown. The lowest order comparator has a HIGH on the = B input. LSBs MSBs +5. V B B B B COMP > B > B = B = B < B < B B 4 5 6 7 B4 B5 B6 B7 COMP > B > B = B = B < B < B B Outputs Slide Set 6 ELEC

Decoders decoder is a logic circuit that detects the presence of a specific combination of bits at its input. Two simple decoders that detect the presence of the binary code are shown. The first has an active HIGH output; the second has an active LOW output. X X ctive HIGH decoder for ctive LOW decoder for Slide Set 6 ELEC

Decoders ssume the output of the decoder shown is a logic. What are the inputs to the decoder? = = = = Slide Set 6 ELEC

Decoders IC decoders have multiple outputs to decode any combination of inputs. For example the binary-to-decimal decoder shown here has 6 outputs one for each combination of binary inputs. For the input shown, what is the output? 4 - b i t b i n a r y i n p u t B i n / D e c 4 5 6 7 8 9 4 5 D e c i m a l o u t p u t s Slide Set 6 ELEC

Decoders specific integrated circuit decoder is the 74HC54 (shown as a 4-to-6 decoder). It includes two active LOW chip select lines which must be at the active level to enable the outputs. These lines can be used to expand the decoder to larger inputs. 4 8 X/Y 4 5 6 7 8 9 CS CS & EN 4 5 74HC54 Slide Set 6 ELEC 4

Decoders BCD-to-decimal decoders accept a binary coded decimal input and activate one of ten possible decimal digit indications. ssume the inputs to the 74HC4 decoder are the sequence,,, and. Describe the output. (5) (4) () () 4 8 BCD/DEC 74HC4 4 5 6 7 8 9 () () () (4) (5) (6) (7) (9) () () ll lines are HIGH except for one active output, which is LOW. The active outputs are 5, 6,, and in that order. Slide Set 6 ELEC 5

BCD Decoder/Driver nother useful decoder is the 74LS47. This is a BCD-toseven segment display with active LOW outputs. V CC (6) The a-g outputs are designed for much higher current than most devices (hence the word driver in the name). BCD inputs LT RBI (7) () () (6) () (5) BCD/7-seg 4 8 LT RBI BI/RBO a b c d e f g (4) () () () () (9) (5) (4) BI/RBO Outputs to seven segment device 74LS47 (8) Slide Set 6 ELEC 6 GND

BCD Decoder/Driver Here the 7447 is an connected to an LED seven segment display. Notice the current limiting resistors, required to prevent overdriving the LED display. BCD input. kω +5. V 74LS47 6 BCD/7-seg V C C LT BI/RBO RBI B C D GND R's = Ω a 4 b 5 c 6 d 8 e 9 7 f 5 7 g 4 8 a b c d e f g +5. V MN7, 9, 4 Slide Set 6 ELEC 7

BCD Decoder/Driver The 74LS47 features leading zero suppression, which blanks unnecessary leading zeros but keeps significant zeros as illustrated here. The BI/RBO output is connected to the RBI input of the next decoder. RBI LT 8 4 RBI LT 8 4 RBI LT 8 4 RBI LT 8 4 74LS47 74LS47 74LS47 74LS47 g f e d c b a BI/RBO g f e d c b a BI/RBO g f e d c b a BI/RBO g f e d c b a BI/RBO Blanked Blanked Depending on the display type, current limiting resistors may be required. Slide Set 6 ELEC 8

BCD Decoder/Driver Trailing zero suppression blanks unnecessary trailing zeros to the right of the decimal point as illustrated here. The RBI input is connected to the BI/RBO output of the following decoder. RBI LT 8 4 RBI LT 8 4 RBI LT 8 4 RBI LT 8 4 74LS47 74LS47 74LS47 74LS47 g f e d c b a BI/RBO g f e d c b a BI/RBO g f e d c b a BI/RBO g f e d c b a BI/RBO Decimal point Blanked Blanked Slide Set 6 ELEC 9

Encoders n encoder accepts an active logic level on one of its inputs and converts it to a coded output, such as BCD or binary. The decimal to BCD is an encoder with an input for each of the ten decimal digits and four outputs that represent the BCD code for the active digit. The basic logic diagram is shown. There is no zero input because the outputs are all LOW when the input is zero. 4 5 6 7 8 9 Slide Set 6 ELEC

Encoders Show how the decimal-to-bcd encoder converts the decimal number into a BCD. The top two OR gates have ones as indicated with the red lines. Thus the output is. 4 5 6 7 8 9 Slide Set 6 ELEC

Encoders The 74HC47 is an example of an IC encoder. It is has ten active-low inputs and converts the active input to an active-low BCD output. V CC This device offers additional flexibility in that it is a priority encoder. This means that if more than one input is active, the one with the highest order decimal digit will be active. Decimal input () () () () () () (4) (5) () (6) HPRI/BCD 4 5 6 7 8 9 4 8 (9) (7) (6) (4) BCD output The next slide shows an application 74HC47 (8) GND Slide Set 6 ELEC

Encoders V CC R 7 R 8 R 9 Keyboard encoder 7 8 9 HPRI/BCD 4 R 4 R 5 R 6 5 6 4 5 6 7 8 9 4 8 BCD complement of key press R R R 74HC47 R The zero line is not needed by the encoder, but may be used by other circuits to detect a key press. Slide Set 6 ELEC

Code converters There are various code converters that change one code to another. Two examples are the four bit binary-to-gray converter and the Gray-to-binary converter. Show the conversion of binary to Gray and back. LSB LSB MSB MSB Binary-to-Gray Gray-to-Binary Slide Set 6 ELEC 4

Multiplexers multiplexer (MUX) selects one data line from two or more input lines and routes data from the selected line to the output. The particular data line that is selected is determined by the select inputs. Two select lines are shown here to choose any of the four data inputs. Which data line is selected if S S =? D Data select Data inputs S S D D D D MUX Data output Slide Set 6 ELEC 5

Demultiplexers demultiplexer (DEMUX) performs the opposite function from a MUX. It switches data from one input line to two or more data lines depending on the select inputs. The 74LS8 was introduced previously as a decoder but can also serve as a DEMUX. When connected as a DEMUX, data is applied to one of the enable inputs, and routed to the selected output line depending on the select variables. Note that the outputs are active-low as illustrated in the following example Data select lines Enable inputs G G G DEMUX B 74LS8 Y Y Y Y Y 4 Y 5 Y 6 Y 7 Data outputs Slide Set 6 ELEC 6

Demultiplexers Determine the outputs, given the inputs shown. The output logic is opposite to the input because of the active-low convention. (Red shows the selected line). G G LOW G B LOW Y Data select lines Enable inputs G G G DEMUX B Y Y Y Y Y 4 Y 5 Y 6 Y 7 Data outputs Y Y Y Y 4 Y 5 Y 6 74LS8 Y 7 Slide Set 6 ELEC 7

Parity Generators/Checkers Parity is an error detection method that uses an extra bit appended to a group of bits to force them to be either odd or even. In even parity, the total number of ones is even; in odd parity the total number of ones is odd. The SCII letter S is. Show the parity bit for the letter S with odd and even parity. S with odd parity = S with even parity = Slide Set 6 ELEC 8

Parity Generators/Checkers The 74LS8 can be used to generate a parity bit or to check an incoming data stream for even or odd parity. Checker: The 74LS8 can test codes with up to 9 bits. The even output will normally be HIGH if the data lines have even parity; otherwise it will be LOW. Likewise, the odd output will normally be HIGH if the data lines have odd parity; otherwise it will be LOW. Generator: To generate even parity, the parity bit is taken from the odd parity output. To generate odd parity, the output is taken from the even parity output. Data inputs (8) (9) () () () () () () (4) B C D E F G H I 74LS8 (5) (6) Even Odd Slide Set 6 ELEC 9

Selected Key Terms Full-adder Cascading Ripple carry Look-ahead carry digital circuit that adds two bits and an input carry bit to produce a sum and an output carry. Connecting two or more similar devices in a manner that expands the capability of one device. method of binary addition in which the output carry from each adder becomes the input carry of the next higher order adder. method of binary addition whereby carries from the preceding adder stages are anticipated, thus eliminating carry propagation delays.

Selected Key Terms Decoder Encoder Priority encoder Multiplexer (MUX) Demultiplexer (DEMUX) digital circuit that converts coded information into a familiar or noncoded form. digital circuit that converts information into a coded form. n encoder in which only the highest value input digit is encoded and any other active input is ignored. circuit that switches digital data from several input lines onto a single output line in a specified time sequence. circuit that switches digital data from one input line onto a several output lines in a specified time sequence.

. For the full-adder shown, assume the input bits are as shown with =, B =, Cin =. The Sum and C will be a. Sum = Cout = b. Sum = Cout = c. Sum = Cout = d. Sum = Cout = B C out B C out Sum Cout

. The output will be LOW if a. < B b. > B c. both a and b are correct d. = B B B B 4 B4 Output

. If you expand two 4-bit comparators to accept two 8-bit numbers, the output of the least significant comparator is a. equal to the final output b. connected to the cascading inputs of the most significant comparator c. connected to the output of the most significant comparator d. not used

4. ssume you want to decode the binary number with an active-low decoder. The missing gate should be a. an ND gate b. an OR gate c. a NND gate d. a NOR gate? X

5. ssume you want to decode the binary number with an active-high decoder. The missing gate should be a. an ND gate b. an OR gate c. a NND gate d. a NOR gate? X

6. The 748 is a -to-8 decoder. Together, two of these ICs can be used to form one 4-to-6 decoder. To do this, connect a. one decoder to the LSBs of the input; the other decoder to the MSBs of the input b. all chip select lines to ground c. all chip select lines to their active levels d. one chip select line on each decoder to the input MSB

7. The decimal-to-binary encoder shown does not have a zero input. This is because a. when zero is the input, all lines should be LOW b. zero is not important c. zero will produce illegal logic levels d. another encoder is used for zero 4 5 6 7 8 9

8. If the data select lines of the MUX are SS =, the output will be a. LOW b. HIGH c. equal to D d. equal to D Data select Data inputs S S D D D D MUX Data output

9. The 748 decoder can also be used as a. an encoder b. a DEMUX c. a MUX d. none of the above

. The 74LS8 can generate even or odd parity. It can also be used as a. an adder b. a parity tester c. a MUX d. an encoder 9 Pearson Education