1 of 20

Combinational Logic Circuits

Adders

2 of 20

Objectives

  • Discuss and design a half adder and create its truth table
  • Implement a full adder using half adder
  • Design a truth table for a full adder

3 of 20

Gates and Integrated Circuits

  • Gates (AND gate, OR gate, Not gate) are not sold individually
  • They are sold in units called integrated circuits (ICs).
  • A chip is a small electronic device consisting of the necessary electronic components (transistors, resistors, and capacitors) to implement various gates.

4 of 20

Logic circuits

  • Digital logic chips are combined to produce circuits.
  • Logic circuits can be categorized as either
    • combinational logic
    • or sequential logic

This lesson covers combinational logic.

5 of 20

Combinational Logic Circuit

  • Combining a number of basic logic gates in a larger circuit to produce more complex logical operations
  • A combinational logic circuit consists of logic gates whose outputs at any time are determined directly from the present combination of inputs without regard to previous inputs
  • Combinational circuit is a circuit in which we combine the different gates in the circuit, for example encoder, decoder, multiplexer and demultiplexer. 
  • Combinational logic is used to build circuits that contain basic Boolean operators, inputs, and outputs. In a combinational circuit, an output is always based entirely on the given inputs.

6 of 20

Combinational Logic Circuit

  • Recall that Boolean algebra allows us to analyze and design digital circuits.
  • The output of a combinational circuit is a function of its inputs, and the output is uniquely determined by the values of the inputs at any given time
  • The following are some of the combinational circuits that we will discuss:

7 of 20

Classification of Combinational Logic

  • There are three main types of combinational logic circuits:
    1. Arithmetic and logical combinational circuits: These include Adders, Subtractors, Multipliers, Comparators.
    2. Data handling combinational circuits – These include Multiplexers, Demultiplexers, priority encoders, decoders.
    3. Code converting combinational circuits – These include Binary to Gray, Gray to Binary, Binary to Excess 3, seven-segment, etc.

8 of 20

Adders

  • An adder is a digital circuit that performs addition of numbers.
  • In many computers and other processors, adders are used in the arithmetic logic units or ALU.
  • Additionally, adders are used in different parts of the processor, such as in calculating addresses, table indices, incrementing and decrementing, and similar operations.

9 of 20

Types of Adders

  • There are two main types of adders:
    1. half adders
    2. full adders.

  • Half adders can add two binary digits or bits.
  • Full adders can add three binary digits or bits.

10 of 20

Review on Binary Addition

  • Binary addition is much like our normal everyday addition (decimal addition), except that it carries on a value of 2 instead of a value of 10.
  • There are four rules of binary addition:�0 + 0 = 0�0 + 1 = 1�1 + 0 = 1�1 + 1 = 10 (which is 0 carry 1)

11 of 20

Example 1

  • 1 + 11 = ?
  • Solution

1

+ 11

If we take the first column from the right, we get the binary addition of 1 and 1, which is: 1 + 1 = 10 = sum is 0 and carry 1

The rightmost digit of our answer is therefore 0.

  • The second column from the right becomes: 0 + 1 + 1 (from the carry). In binary addition: 0 + 1 + 1 = 10 = 0 carry 1
  • The second rightmost digit is a 0 and a 1 is carried to the next column. The next column doesn't exist (there are no numbers), therefore the 1 drops into the next slot of the answer. So our answer is: 1 0 0

12 of 20

Class Activity

  • 1010 + 11 = ?
  • 100101 + 10101 = ?

13 of 20

Half-adder

  • A half-adder is a very simple combinational logic circuit with two inputs and two outputs
  • The half-adder only adds two single bits together
  • The half adder adds two single binary digits A and B. It has two outputs, sum (S) and carry (C)
  • Consider adding two binary digits together: The three things to remember when adding binary digits are:
    • 0 + 0 = 0
    • 0 + 1 = 1 + 0 = 1
    • 1 + 1 = 10.
  • In the above there is a sum and carry at the outputs. Sum is an XOR. The Carry output is equivalent to that of an AND gate

14 of 20

Half-adder

  • The simplest half-adder design incorporates an XOR gate for Sum and an AND gate for Carry.

15 of 20

�Truth Table for a Half-Adder

16 of 20

Full-adder

  • Full-adder is composed of two half-adders and an OR gate.
  • The full-adder is a three input and two output combinational circuit.
  • The first two inputs are A and B and the third input is an input carry as C-IN.
  • The output carry is designated as C-OUT and the normal output is designated as S which is SUM.
  • A full adder adds binary numbers and accounts for values carried in as well as out.

17 of 20

A Truth Table for a Full-Adder

18 of 20

A Logic Diagram for a Full-Adder

19 of 20

Adders Summary

  • Adders are very important circuits—a computer would not be very useful if it could not add numbers

20 of 20

Reading

  • Hennessy and Patterson Chapter 8.3 (Appendix B)