Post History
I dont understand how to make a logic circuit which does that job:check if the divisors is greater and equal or less than the most left digits of the divident So think about it. Break it down int...
Answer
#2: Post edited
- <blockquote>I dont understand how to make a logic circuit which does that job:check if the divisors is greater and equal or less than the most left digits of the divident</blockquote>
- So <i>think</i> about it. Break it down into small chunks. Let's ignore the reason behind your question and try to make a digital block that compares two unsigned binary numbers and tells you either A > B, A = B, or A < B.
- Start with the highest bit. There are four possible cases. Write a truth table to show the action in each possible case:
- <pre>
- A B action
- --- --- ----------------
- 0 0 can't tell, need to look at lower bits.
- 0 1 A < B, done.
- 1 0 A > B, done.
- 1 1 can't tell, need to look at lower bits.
- </pre>
- You should be able to see how this per-bit logic can be chained, starting from the highest bit down to the lowest bit. At any point where the middle two cases in the truth table above are found, the process terminates with a definitive answer. Or, you could say that the result of comparing that bit overrides any output from the results of comparing lower bits.
- If you get all the way to the end without a definitive answer, then the two values are equal.
Joel Reyes Noche has already told you this is a standard block called a "comparator". Personally, I've seen this called a "magnitude comparator". That may help you search for more material on it out there.
- <blockquote>I dont understand how to make a logic circuit which does that job:check if the divisors is greater and equal or less than the most left digits of the divident</blockquote>
- So <i>think</i> about it. Break it down into small chunks. Let's ignore the reason behind your question and try to make a digital block that compares two unsigned binary numbers and tells you either A > B, A = B, or A < B.
- Start with the highest bit. There are four possible cases. Write a truth table to show the action in each possible case:
- <pre>
- A B action
- --- --- ----------------
- 0 0 can't tell, need to look at lower bits.
- 0 1 A < B, done.
- 1 0 A > B, done.
- 1 1 can't tell, need to look at lower bits.
- </pre>
- You should be able to see how this per-bit logic can be chained, starting from the highest bit down to the lowest bit. At any point where the middle two cases in the truth table above are found, the process terminates with a definitive answer. Or, you could say that the result of comparing that bit overrides any output from the results of comparing lower bits.
- If you get all the way to the end without a definitive answer, then the two values are equal.
- Joel Reyes Noche has already told you this is a standard block called a "digital comparator". Personally, I've seen this called a "magnitude comparator". That may help you search for more material on it out there.
#1: Initial revision
<blockquote>I dont understand how to make a logic circuit which does that job:check if the divisors is greater and equal or less than the most left digits of the divident</blockquote> So <i>think</i> about it. Break it down into small chunks. Let's ignore the reason behind your question and try to make a digital block that compares two unsigned binary numbers and tells you either A > B, A = B, or A < B. Start with the highest bit. There are four possible cases. Write a truth table to show the action in each possible case: <pre> A B action --- --- ---------------- 0 0 can't tell, need to look at lower bits. 0 1 A < B, done. 1 0 A > B, done. 1 1 can't tell, need to look at lower bits. </pre> You should be able to see how this per-bit logic can be chained, starting from the highest bit down to the lowest bit. At any point where the middle two cases in the truth table above are found, the process terminates with a definitive answer. Or, you could say that the result of comparing that bit overrides any output from the results of comparing lower bits. If you get all the way to the end without a definitive answer, then the two values are equal. Joel Reyes Noche has already told you this is a standard block called a "comparator". Personally, I've seen this called a "magnitude comparator". That may help you search for more material on it out there.