I have been attempting to make a digital comparator but I am struggling to get in more than one input. The idea is that I have 2 sets of 2 numbers (4 inputs total) and I want to have the output take all 4 numbers into account rather than just 2. Here is what I roughly have so far:
What I want the circuit to do is have the two inputs in the two sets treated as separately. Any ideas on how to achieve this would be very welcome.
Answer
The starting point for a problem like this is to draw out a truth table of the logic that you intend to have the circuit synthesize. Your intention is still somewhat vague even after the comments.
If we guess that the input pairs c:d and b:a are actually representing two 2-bit binary numbers then the following truth table shows the output for when c:d == b:a.
You can then add additional output columns to the table to represent the other outputs you may desire.
This should get you started. I won't present the whole final solution because you learn little from that. The mechanics for reducing the table shown for one output can be done following one of a number of known procedures including Karnaugh Maps.
No comments:
Post a Comment