You are on page 1of 5

UNIT II

COMBINATIONAL BUILDING BLOCKS


Truth Table for Half-adder INPUT OUTPUT A B Carry (Cout) Sum (S) 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 Boolean expressions for Carry (C) and Sum (S): Cout = AB S = AB + AB = A B Thus the digital circuit for half adder will be:

INTRODUCTION The construction of most digital systems is a large task. Disciplined designers in any field will subdivide the original task into manageable subunits known as building blocks and will use the standard subunits wherever possible. In digital hardware, the building blocks have such names as adders, registers, and multiplexers. Some of the common operations that digital designers wish to perform are: (a) Moving data from one part of the machine to another. (b) Selecting data from one of several sources. (c) Routing data from a source to one of several destinations. (d) Transforming data from one representation to another. (e) Comparing data arithmetically with other data. (f) Manipulating data arithmetically or logically, for example, summing two binary numbers. We can perform all these operations with suitable arrangements of AND, OR, and NOT gates, but always designing at this level would be difficult, lengthy, and error-prone. Instead, we need to develop building blocks to perform standard digital system operations. The building blocks will allow us to suppress much irrelevant detail and design at a higher level. The digital circuits that have no internal storage capacity, or memory and whose outputs that depend only on the present values of the inputs, are called combinational logic circuits. ADDER An adder is a combinational circuit that performs addition of two binary numbers. Half-adder: It is a combinational circuit that performs addition of two binary digits (bits). It has two inputs, A (augend) and B (addend) and two outputs Cout (carry) and S (sum).

Full-adder: It is a combinational circuit that performs addition of three binary digits (bits).

Block diagram of 1-bit full-adder

Truth Table for Full-adder INPUT OUTPUT A B C Carry (Cout) Sum (S) 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 Boolean expressions for Carry (Cout) and Sum (S): Cout = ABC + ABC + ABC + ABC S = ABC + ABC + ABC + ABC Reducing these expressions results to: Cout = ABC + ABC + ABC + ABC Cout = (AB + AB) C + AB (C + C) Cout = (A B) C + AB

AR Institute of Management & Technology, Meerut

S = ABC + ABC + ABC + ABC S = ABC + ABC + ABC + ABC S = (AB + AB) C + (AB + AB) C S = (A B) C + (A B) C S = (A B) C + (A B) C S = (A B) C Thus the digital circuit for full-adder will be:

Parallel-adder: Parallel adders are digital circuits that compute the addition of variable binary strings of equivalent or different size in parallel. The schematic diagram of a parallel adder is shown in the figure below.

Above figure shows an example of a 4-bit ripple-carry parallel adder. It is composed of four full adders. The augends bits of Ai are added to the addend bits of Bi respectfully of their binary position. Each bit addition creates a sum (Si) and a carry out (Ci). The carry out is then transmitted to the carry in (Cin) of the next higher-order bit. The final result creates a sum of four bits plus a carry out (Cout). Even though this is a simple adder and can be used to add unrestricted bit length numbers, it is however not very efficient when large bit numbers are used. One of the most serious drawbacks of this adder is that the delay increases linearly with the bit length. Each full adder has to wait for the carry out of the previous stage to output steady-state result. Therefore even if the adder has a value at its output terminal, it has to wait for the propagation of the carry before the output reaches a correct value as shown in figure below.

Ripple Carry Adder: The ripple carry adder is constructed by cascading full adders (FA) blocks in series. One full adder is responsible for the addition of two binary digits at any stage of the ripple carry. The carryout of one stage is fed directly to the carry-in of the next stage. A number of full adders may be added to the ripple carry adder or ripple carry adders of different sizes may be cascaded in order to accommodate binary vector strings of larger sizes. For an n-bit parallel adder, it requires n computational elements (FA).

Taking again the example in previous figure, the addition of A4 and B4 cannot reach steady state until C4 becomes available. In turn, C4 has to wait for C3, and so on down to C1. If one full adder takes Tfa seconds to complete its operation, the final result will reach its steady-state value only after 4Tfa seconds.

Combinational Building Blocks

SUBTRACTOR A subtractor is a combinational circuit that performs subtraction of two binary numbers.
Half-subtractor: The half-subtractor is a combinational circuit which is used to perform subtraction of two bits. It has two inputs, A (minuend) and B (subtrahend) and two outputs D (difference) and Bo (borrow). Truth Table for Half-subtractor INPUT OUTPUT 1 A B Borrow (Bo) Difference (D) 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 Boolean expressions for Borrow (Bo) and Difference (D): Bo = AB D = AB + AB = A B Thus the digital circuit for half subtractor will be:

Boolean expressions for Borrow (Bo) and Difference (D): Bo = ABC + ABC + ABC + ABC D = ABC + ABC + ABC + ABC Reducing these expressions results to: Bo = ABC + ABC + ABC + ABC Bo = A (BC + BC) + (A + A) BC Bo = A (B C) +BC D = ABC + ABC + ABC + ABC D = A (BC + BC) + A (BC + BC) D = A (B C) + A (B C) D = A (B C) + A (B C) D = A (B C) MULTIPLEXER A multiplexer is a device for selecting one of several possible input signals and presenting that signal to an output terminal. It is analogous to a mechanical switch, such as the selector switch of a stereo amplifier.

Full-subtractor: The full-subtractor is a combinational circuit which is used to perform subtraction of three bits. It has three inputs, A (minuend), B (subtrahend) and C (subtrahend) and two outputs D (difference) and Bo (borrow). Truth Table for Full-subtractor INPUT OUTPUT A B C Borrow2 (Bo) Difference (D) 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 0 0 1 1 1 1 1
1 2

A Mechanical Selector Switch

The amplifier switch is used for selecting the input that will drive the speaker. Except for the moving hand, the electronic analog is easily constructed.

A Two-Position Mechanical Switch

Bo = 1 if A < B Bo = 1 if A < B + C

We use Boolean variables instead of mechanical motion to select a given input. Consider a twoposition switch with inputs A and B and output Y. Introduce a variable S (select input) to

AR Institute of Management & Technology, Meerut

describe the position of the switch and let S = 0 if the switch is up and S = 1 if the switch is down. A Boolean equation for the output Y is: Y = A.S + B.S

select lines S1 and S0, the pair S1, S0 represents a binary number that may identify one of four possible inputs:

Implementation of Electronic Switch Y = A.S + B.S

Commercial MSI devices correspond to the more complex switch shown in figure below. The right-hand switch, called an enable (or strobe), acts as a Boolean AND function. If we call the closed position of the enable switch G and the open position G, then Y = G.(A.S + B.S)

Commercial integrated circuits provide 2-, 4-, 8-, and 16-input multiplexers, with a variety of inverted and non-inverted outputs, separate and common enable inputs, and so on. DEMULTIPLEXER A demultiplexer sends data from a single source to one of several destinations. Whereas the multiplexer is a data selector, the demultiplexer is a data distributor or data router. A mechanical analog is the switch used to route the power amplifier output of an automobile radio either to a front or a rear speaker, as illustrated in Fig. 3-11. This switch is the same type of two-position mechanical switch shown in figure below.

An Enabled Selector Switch

A Mechanical Distributor Switch

An Enabled Two-Position Electronic Selector Switch

Mixed Logic Multiplexer Notation

If we desire to select an output from among more than two inputs, the multiplexer must have more than one select input. The select inputs to a mux form a binary code that identifies the selected data input. One select line has 21 = 2 possible values; two select lines allow the specification of 22 = 4 different values. For instance, if we have

A mechanical switch can transmit a signal in either direction, whereas the electronic analog can transmit data in only one direction. Since we cannot use a multiplexer in the reverse direction, we are forced to provide a demultiplexer to handle this operation. The Boolean equations for the switch in figure above are: Front Speaker = OUT.S Rear Speaker = OUT.S Just as the multiplexer has a binary code for the selection of an input, the demultiplexer has a similar code for selecting a particular output.

A One-to-Four Demultiplexer

Combinational Building Blocks

Truth Table for a 4-output Demultiplexer

The logic equations for the outputs follow either from the truth table or from the description of the operation of the demultiplexer:

You might also like