# digital algorithm to perform division

Discussion in 'General Electronics Chat' started by yagyasen, Jul 3, 2013.

1. ### yagyasen Thread Starter New Member

Jun 18, 2013
11
0
We wanted a digital circuit that can perform division(other than power of 2) e.g. divide by 5 or divide by 3 to maximum accuracy.

2. ### WBahn Moderator

Mar 31, 2012
18,077
4,906
You need to be more specific in what you want.

Do you want to divide an variable integer by a fixed integer or do you want to divide one variable integer by another variable integer?

Do you want an integer result, or a fixed point result, or a floating point result?

What is the width of the dividend and the divisor?

Do you need this to be purely combinational, or can it be sequential?

How are you planning on implementing it? Discrete gates, programmable logic, what?

yagyasen likes this.
3. ### yagyasen Thread Starter New Member

Jun 18, 2013
11
0
1. variable integer divided by another variable integer.
2.floating point result required.
3.dividend 5bit,divisor3 bit.
4.purely combinational logic
5.implementation : programmable logic

4. ### MrChips Moderator

Oct 2, 2009
12,622
3,451
I don't think you will be able to find an easy solution.

5. ### blueroomelectronics AAC Fanatic!

Jul 22, 2007
1,758
98
Use a microcontroller. Unless this is a school assignment which it probably is.

Feb 24, 2006
10,338
1,850
7. ### MrChips Moderator

Oct 2, 2009
12,622
3,451
This is a job for a math coprocessor. I have tons of Intel 8087 and you can have one if you wish.

8. ### WBahn Moderator

Mar 31, 2012
18,077
4,906
So what is the floating point representation you need?

Are both the dividend and the divisor signed integers? If so, what representation?

With a 5-bit and 3-bit operands, you only have 256 possible results. Use a lookup table.