Welcome!
...
News
2023 4thQ

Part 2: Logic IC Replacement

4min

Lead In

One of the advantages of a logic IC is that the logic function is implemented in hardware. This makes it much simpler. To use the inputs, you tie them up and apply the right input conditions to trigger the output. In the micro implementation, there is a bit more work.

Implementing The Logic Function

By the logic function, we are referring to the logic equation. For example, as the table shows below for an AND gate. The only time the gate will go high is when both A and B are high. Therefore the code only needs to evaluate the equation for that outcome.

Document image
๏ปฟ

Code Sample

In the simplified code sample below, the equation A.B = Q is implemented. There is no need to check for the other conditions because they are implied.

c
๏ปฟ

In other words, there would be no need to implement code to test for each condition in the truth table as shown below. The only time that evaluation would be implemented is if that is a condition you are expecting.

C
๏ปฟ

Lead Out

Now that we have our code, we can implement the hardware.