# Part 1: Logic IC Replacement

Logic ICs are semiconductor devices that implement a basic logical operation that is performed on one or more digital input signals (represented by 1 and 0 or Hi and Lo to produce a digital output signal.

There are a number of types of logic gates, and they can be implemented using a physical IC. These can be found in the CD4000 or the 74HC series. When building these circuits, the boolean equation is implemented in hardware. For example, if the logic operation of A OR B = Q is implemented, the logic IC with its two inputs would implement the operation. However, if the operation changed to A and B, the logic circuit is no longer valid.

The outcome of a logic equation can be represented by its truth table. In the example below, the OR gate's logical operation for 2 inputs is displayed. The outcome is basically HI or 1 if either of the inputs goes high.

A | B | Q |

0 | 0 | 0 |

0 | 1 | 1 |

1 | 0 | 1 |

1 | 1 | 1 |

The problem with implementing logic operations in hardware is that if the equation changes, the hard which is set in PCB cannot be changed. The only way to change it would be to redo the PCB.

If for example, the equation changes to A AND B (A.B), then the following truth table would apply. While that maths may look simple when you consider the table of ICs below

A | B | Q |

0 | 0 | 0 |

0 | 1 | 0 |

1 | 0 | 0 |

1 | 1 | 1 |

As shown below, not all the 2 input gates have the same pinout, and things get more complicated if an additional input is needed. While the 7408 could function as a drop-in replacement for the 7432, implementing the change in software can be more intuitive.

When using a physical logic IC, you would need to consider the number of inputs required and then source an IC that suits the equation. This may not be possible when an odd number of input gates is needed. The gates left unused would need to be implemented to ensure that they don't interfere with the logic equation.

Implementing in software is more versatile in that you control directly the number of inputs needed. You implement the equation directly.

In the next section, we will demonstrate a software implementation using a PIC VS a Logic IC.