11.3 Combinational Circuits

COS2621 - Computer Organisation · 11. Digital Logic

Combinational Circuits

Introduction to Combinational Circuits

Combinational circuits are digital circuits whose output is a function of the current inputs only. They do not have memory and do not depend on past inputs. Examples of combinational circuits include adders, subtractors, multiplexers, and decoders.

Basic Components of Combinational Circuits

Combinational circuits are built using logic gates. The most common logic gates are AND, OR, and NOT gates. Each gate performs a basic logical function:

  • AND Gate: Outputs true (1) only if all inputs are true.
  • OR Gate: Outputs true if at least one input is true.
  • NOT Gate: Outputs the inverse of the input.

Example: Simple Combinational Circuit

Consider a circuit that adds two binary digits (bits) and produces a sum and a carry. This can be represented using an XOR gate for the sum and an AND gate for the carry.

Sum = A XOR B
Carry = A AND B

For example, if A = 1 and B = 0:

  • Sum = 1 XOR 0 = 1
  • Carry = 1 AND 0 = 0

Designing Combinational Circuits

To design a combinational circuit, follow these steps:

  1. Define the problem and identify inputs and outputs.
  2. Choose the appropriate logic gates.
  3. Create a truth table to outline the relationship between inputs and outputs.
  4. Simplify the Boolean expressions if necessary.
  5. Draw the circuit diagram.

Example: Full Adder Circuit

A full adder adds three bits: two significant bits and a carry bit from the previous addition. The output consists of a sum and a carry. The truth table for a full adder is as follows:

ABCarry-in (C_in)SumCarry-out (C_out)
00000
00110
01010
01101
10010
10101
11001
11111

The Boolean expressions derived from this table are:

Sum = A XOR B XOR C_in
C_out = (A AND B) OR (C_in AND (A XOR B))

Common Mistakes

Watch out: Ensure you do not confuse the carry output with the sum output. They are distinct and serve different purposes in the circuit.

Summary

  • Combinational circuits depend only on current inputs.
  • They are designed using logic gates like AND, OR, and NOT.
  • Truth tables help in defining the relationships between inputs and outputs.
  • Common examples include adders and multiplexers.

Check your understanding

  • What is the difference between a sum and a carry in a full adder?
  • How would you design a circuit that functions as a multiplexer?
  • What logic gates would you use to create a simple AND gate?

Test yourself

4 quick questions on this lesson. Pick an answer to see if you're right.

  1. 1. In a full adder, what is the output of the sum when A = 1, B = 1, and Carry-in = 0?

  2. 2. Which logic gate outputs true only if all its inputs are true?

  3. 3. What is the purpose of a truth table in designing combinational circuits?

  4. 4. What is the primary function of a combinational circuit?