Unit 4 - Notes

ECE249

Unit 4: Introduction to Combinational Logic Circuits

1. Overview of Combinational Logic Circuits

A combinational logic circuit is a digital system where the output at any instant depends only on the present combination of inputs. Unlike sequential circuits, combinational circuits have no memory element, feedback loops, or clock signals.

Key Characteristics:

  • Speed: Generally faster than sequential circuits (limited only by propagation delay).
  • Building Blocks: Logic gates (AND, OR, NOT, NAND, NOR, XOR).
  • Function: Defined by Boolean equations or Truth Tables.
  • Block Diagram: input variables Logic Circuit output variables.

2. Arithmetic Circuits: Adders

Adders are combinational circuits used to perform binary addition.

2.1 Half Adder

A Half Adder adds two single binary digits ( and ) and produces two outputs: Sum () and Carry ().

  • Inputs:
  • Outputs: (Sum), (Carry)

Truth Table:

Input A Input B Carry (C) Sum (S)
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

Boolean Expressions:

  • Sum (): (XOR operation)
  • Carry (): (AND operation)

Logic Implementation:

  • 1 XOR gate for the Sum.
  • 1 AND gate for the Carry.

2.2 Full Adder

A Half Adder cannot handle the carry coming from a previous lower significant bit. A Full Adder adds three bits: input bits and , and a Carry Input ().

  • Inputs:
  • Outputs: (Sum), (Carry Out)

Truth Table:

A B 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:

  • Sum ():
  • Carry (): (Majority function)

Implementation using Half Adders:
A Full Adder can be constructed using two Half Adders and one OR gate.


3. Arithmetic Circuits: Subtractors

Subtractors perform binary subtraction.

3.1 Half Subtractor

Used to subtract one bit () from another (). It produces a Difference () and a Borrow ().

  • Operation:
  • Inputs: (Minuend), (Subtrahend)
  • Outputs: (Difference), (Borrow)

Truth Table:

A B Borrow () Difference (D)
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0

Boolean Expressions:

  • Difference ():
  • Borrow (): (NOT A AND B)

3.2 Full Subtractor

Performs subtraction involving three bits: (Minuend), (Subtrahend), and (Borrow from the previous stage).

  • Inputs:
  • Outputs: (Difference), (Borrow Out)

Boolean Expressions:

  • Difference ():
  • Borrow (): OR simpler form:

4. Multiplexers (MUX)

A Multiplexer is a Data Selector. It selects one of the many input lines and directs it to a single output line based on the status of select lines.

  • Inputs: data inputs ( to ).
  • Select Lines: selection lines ( to ).
  • Output: 1 output line ().
  • Analogy: A rotary switch.

4:1 Multiplexer

  • Data Inputs: (, so ).
  • Select Lines: .
  • Output: .

Function Table:

Output (Y)
0 0
0 1
1 0
1 1

Boolean Expression:


5. De-multiplexers (DEMUX)

A De-multiplexer is a Data Distributor. It takes a single input and distributes it over several outputs. It is the reverse process of a MUX.

  • Inputs: 1 data input ().
  • Select Lines: selection lines.
  • Outputs: output lines.

1:4 De-multiplexer

  • Input:
  • Select Lines:
  • Outputs:

Logic Function:

  • If , (Others 0)
  • If , (Others 0)
  • If , (Others 0)
  • If , (Others 0)

Boolean Expressions:


6. Decoders

A Decoder converts binary information from input lines to a maximum of unique output lines. It detects the presence of a specific binary code.

  • Inputs:
  • Outputs:
  • Enable Pin (E): Usually included to activate the chip.

2-to-4 Line Decoder

  • Inputs:
  • Outputs:
  • Logic: Only one output is High (1) for a given input combination (assuming Active High outputs).

Truth Table (Active High):

Enable A B
0 X X 0 0 0 0
1 0 0 0 0 0 1
1 0 1 0 0 1 0
1 1 0 0 1 0 0
1 1 1 1 0 0 0

(Note: In commercial ICs like 74138, outputs are often Active Low, meaning the selected output goes to 0 while others stay at 1).


7. Encoders

An Encoder performs the inverse operation of a decoder. It converts an active input signal into a coded binary output signal.

  • Inputs: (Only one input is high at a time).
  • Outputs: binary lines.

Octal-to-Binary Encoder (8-to-3 Encoder)

  • Inputs: to (corresponding to Octal digits).
  • Outputs: (Binary representation).

Boolean Logic:

  • (LSB) =
  • =
  • (MSB) =

Drawback of Standard Encoders:
If two inputs are high simultaneously (e.g., and ), the output is invalid. This is resolved using a Priority Encoder, which encodes only the input with the highest priority.


8. Digital Comparators (Magnitude Comparators)

A comparator compares two binary numbers ( and ) and determines their relative magnitudes.

Standard Outputs:

  1. (A is greater than B)
  2. (A is equal to B)
  3. (A is less than B)

8.1 1-Bit Comparator

Compares single bits and .

Logic Equations:

  • Equality (): High if both are 0 or both are 1.
    • (XNOR gate)
  • Greater Than (): High if and .
  • Less Than (): High if and .

8.2 2-Bit Comparator

Compares two 2-bit numbers: and .
Here, are the Most Significant Bits (MSB) and are the Least Significant Bits (LSB).

Logic for Equality ():
Both bit positions must be equal.


Let and .
Equation:

Logic for Greater Than ():
is greater than if:

  1. The MSB of is greater than the MSB of ().
  2. OR, the MSBs are equal () AND the LSB of is greater than the LSB of ().

Equation:

Logic for Less Than ():
is less than if:

  1. The MSB of is less than the MSB of ().
  2. OR, the MSBs are equal () AND the LSB of is less than the LSB of ().

Equation: