Implementing a Divider Circuit - A Guide

  • Thread starter Thread starter EvLer
  • Start date Start date
  • Tags Tags
    Circuit
Click For Summary

Discussion Overview

The discussion revolves around the implementation of a divider circuit, specifically focusing on dividing binary numbers. Participants explore methods for dividing by specific values, such as 4, and discuss the implications of carry bits in division compared to multiplication.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about implementing a divider circuit after covering adders and multipliers, expressing uncertainty about the process of division in binary.
  • Another participant suggests that dividing by 4 can be achieved simply through a right shift of 2 bits, while noting that dividing by other numbers may require K-map optimization.
  • A participant questions the necessity of the carry bit in division, particularly when dividing by 4, and whether it is needed in a general case.
  • One participant explains that multiplication and division in binary follow similar principles to those learned in early education, emphasizing the need for carry in addition and subtraction processes during these operations.
  • Another participant expresses relief that their task only required omitting 2 least significant bits (LSBs) for division, indicating that a more complex implementation was not necessary.

Areas of Agreement / Disagreement

Participants express differing views on the necessity of the carry bit in division, and while some agree on the simplicity of dividing by 4, there is no consensus on the general case of division or the complexity of implementing a divider circuit.

Contextual Notes

Participants discuss the limitations of their current understanding and the specific context of their task, which only required a straightforward approach to division rather than a comprehensive solution.

EvLer
Messages
454
Reaction score
0
How can i implement a divider circuit?
we have covered adders and multipliers, but I'm not sure how to implement a divider... i know from programming that i would be shifting to the opposite side of multiplication, but... how...?
basically i need to divide the result (a sum of binary digits for which i have a series of adders) by 4 (taking average of 4 3-bit wide binary strings)
 
Engineering news on Phys.org
Divide by 4 is easy, it's just a right shift by 2 bits. Divide by 7 or other non-binary numbers would require a K-map optimization.
 
in multiplication circuit, in my notes, they also take into account the carry-bit, but is it necessary in division, i don't see the need for the carry (in/out) bit. It seems to work out fine w/t carry, but in my case i divide by 4 only, so would i have to care about carry bit for general case?
 
Last edited:
Multiplying and dividing in binary is, in general, done in the same way that we learned to do it in the third (or whatever) grade. The only difference is the fact that we don't have to remember any lengthy multiplication tables. Otherwise, it is the same. Look at what you learned those years ago and apply the same to binary. To multiply, we continually add values (when multiplying by "1", otherwise ignore it) then shift (right to left) and repeat it. If you are dividing, subtract then shift (left to right), and repeat until finished. Obviously we have to use the carry, because we are adding (or subtracting). [If you have hardware "subtractors" you need to use a borrow; otherwise you just 'complement and add'.]

Just FYI: The above is the way we normally multiply (and divide) in software. Some processors and controllers also have 'microinstructions' to do it this way. The drawback here is the fact that this process is slow; it involves a lot of sequential steps. For that reason, high-end processors generally have 'coprocessors' and the like, to do the operations faster. Here, we get back to multiplying by amounts wider than one bit at a time. It could be by four-bit 'nibbles', or eight-bit 'bytes' or whatever. This, however gets us back to having to know our multiplication tables again (in hex or whatever). This can be done with 'ROM' tables or hard logic - - - but the circuitry gets complex. We trade that for speed. As an example, if we wanted to map out a hardware circuit to multiply two four-bit nibbles (at a time), we would need to use eight, eight-term K-Maps (yes, you can make them that big). [Four output bits would be the product, and four would be the carry.] Then, we would need what is essentially a new two-level adder, because the carry is wider.

KM
 
thanks for explanation and some extra info!
fortunately all we had to do is to omit 2 LSBs, which meant they did not expect us to implement a general case of division.
 

Similar threads

  • · Replies 45 ·
2
Replies
45
Views
4K
  • · Replies 2 ·
Replies
2
Views
13K
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
12
Views
4K
  • · Replies 12 ·
Replies
12
Views
11K
  • · Replies 16 ·
Replies
16
Views
2K
Replies
31
Views
7K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K