Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Division of binary numbers logic circuit

+1
−0

If we want to divide two numbers I have problem implementing this logic.I am posting 1 images with 2 different steps to the solution.

In example a) the most significant digits of the divident >= divisor we subtract the divisor from those 2 digits.

hello

In b)the most significant digits of the divident<divisor so we move down the next digit of the divident(which happens to be the last) and we put a 0 in the quotient and do the subtraction.

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 and depending on the results does a different function

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

2 answers

+1
−0

You're thinking of a digital comparator, "a hardware electronic device that takes two numbers as input in binary form and determines whether one number is greater than, less than or equal to the other number."

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

I know that.Is there a way to use the comparator(s) as 'effeciently' as possible(no loops,storage of... (3 comments)
+1
−0
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 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:

  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.

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.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »