10-Functions of Combinational Logic
10-Functions of Combinational Logic
Agenda
Basic Adders
Adders
computers other types of digital systems in which numerical data are processed
2/7/2012
The Half-Adder
The Half-Adder
The half-adder accepts two binary digits on its inputs and produces two binary digits on its outputs, a sum bit and a carry bit.
The Full-Adder
Full-Adder Logic
The full-adder accepts two input bits and an input carry and generates a sum output and an output carry.
2/7/2012
The Full-Adder
Two or more full adders are connected to form parallel binary adders.
To add two binary numbers, a full-adder is required for each bit in the numbers. So, for 2-bit numbers, two adders are needed.
The carry output of each adder is connected to the carry input of the next higher-order adder.
A group of 4 bits is called a nibble. A basic 4-bit parallel adder is implemented with four full-adder stages as shown.
2/7/2012
The carry output of each adder is connected to the carry input of the next higher-order adder as indicated. These are called internal carries.
Carry generation occurs when an output carry is produced (generated) internally by the full-adder.
Cg=AB
A carry is generated only when both input bits are 1s. The generated carry, Cg, is expressed as the AND function of the two input bits, A and B.
2/7/2012
Carry propagation occurs when the input carry is rippled to become the output carry.
An input carry may be propagated by the fulladder when either or both of the input bits are 1s. The propagated carry, Cp, is expressed as the OR function of the two input bits.
2/7/2012
Comparators
Comparators
To compare the magnitude of two binary quantities to determine the relationship of those quantities.
The simplest form a comparator ckt determines whether two numbers are equal.
2/7/2012
Equality
Inequality
Many IC comparators provide additional outputs that indicate which of the two binary numbers being compared is the larger.
Inequality
To determine an inequality of binary numbers A and B, you first examine the highest-order bit in each number:
If A3=1 and B3=0 number A is greater than number B If A3=0 and B3=1 number A is less than number B If A3=B3 you must examine the next lower bit position for an equality
Decoders
2/7/2012
Decoders
A decoder detects the presence of a specified combination of bits (code) on its inputs and indicates the presence of that code by a specified output level.
Suppose we need to determine when a binary 1001 occurs on the inputs of a digital ckt.
In its general form, a decoder has n input lines to handle n bits and forms one to 2n output lines to indicate the presence of one or more n-bit combinations.
In order to decode all possible combinations of four bits, 16 decoding gates are required (24=16). This type of decoder is commonly called either:
Decoding functions and truth table for a 4line-to-16-line decoder with active-LOW outputs see the next slide.
2/7/2012
The BCD-todecimal converts each BCD code into one of ten possible decimal digit indications. Called 4line-to-10-line decoder or 1of-10 decoder
The BCD-to-7segment decoder accepts the BCD code on its inputs and provides outputs to drive 7-segment display devices to produce a decimal readout.
2/7/2012
Encoders
Encoders
An encoder is a combinational logic ckt that essentially performs a reverse decoder function. An encoder accepts an active level on one of its inputs representing a digit, such as a decimal or octal digit, and converts it to a coded output such as BCD or binary. Encoders can also be devised to encode various symbols and alphabetic characters.
10
2/7/2012
NOTE: A 0-digit input is not needed because the BCD outputs are all LOW when there are no HIGH input.
Code Converters
Code Converters
11
2/7/2012
Multiplexers
A MUX is a device that allows digital information from several sources to be routed onto a single line for data transmission over that line to a common destination. The basic MUX has several data-input lines and a single output line. It also has data-select inputs, which permit digital data on any one of the inputs to be switched to the output line.
12
2/7/2012
Demultiplexers
Demultiplexers
Demultiplexers
It takes digital information from one line and distributes it to a given number of output lines.
13