Binary Division Circuit

preview_player
Показать описание
----Info for the imaginary People who's watching this----------
unfortunately the pictures hosted online expired, and I no longer have screenshots of the various parts of the circuit :(

I've finally made a division circuit capable of dividing any 8 bit number with an equal or lesser (why? see bottom paragraph) 8 bit number, this circuit has 16 main inputs, one reset and 16 outputs, most of the logic is made only with basic ports, but to save me from "OUT OF MEMORY" errors, I've decided to use some pre-made components like the SIPO register and JK ports.

the hole circuit operates atm @50KHz and it have the option of being operated manually for debugging.

So far the only problem with this design is that if you divide 34 with 9 then it wont stop until the shift register has overflown and adding 1 to the SIPO register for every clock until sum=FF...

it works by subtracting the divisor from the dividend and shifting it right:

circuit logic in text form:
A= dividend
B= divisor

shift B to the left until MSB of B is on 8th bit place
(if B was 00000010 then B becomes 10000000)
now
if B is equal or smaller than A then add 1 to sum and update A to the new value
shift B right and repeat:
(B is now 01000000 so on and so on)
else if B is greater than A add a 0 to sum
shift B right
endif
end when LSB of B is on the 1th bit place
(when B = B original)

This whole circuit was designed by me without any help from the internet. That's because I haven't found any good explanation on how to build a division circuit or any explanation for that mater... when I do a search fro Binary division I get "how to divide binary" and when I search for circuits I get nothing that helps at all.
If anybody has good info I would love to read it.

Inside the circuit Photos

New circuit:
8 Pictures
Рекомендации по теме
Комментарии
Автор

Duude THANKS!!

I don't know how I manage it, but every time I tried to write 100111 or 39 I all ways wrote 10111.
I don't know how many damn hours I've tried to fix it, but thanks to your question I tried to make something simpler, but I got stuck, and needed to see the original circuit, and then I tried 39/9 and I wrote 23 but I spotted it :D
Thank you! now i works, it all ways did :)
and now it even have signed bits, witch were the simplest part of it all 4 ports for cary bit and sing bit :)

svampebob
Автор

hehehehe :D happy you figured it out mate!
this is an important feature as 2s complement sub/add circuitry is very common within digital systems, congratulations!

AeonFlexMusic
Автор

Every division where A>=B works, and now I can rest :)
Thanks a million time :)

svampebob
Автор

This circuit is an old design.
If you want I can show you a newer, but basically:
Block 1 is a register that stores the dividend value.
Block 2 is the subtraction circuit, it subtract a shifted value of the divisor.
Block 3 is push the last bit out/it's triggered to give out on last clock.
Block 4 is a delay it waits for the divisor to be shifted left.
Block 5 determines how many times the divisor has to be shifted left.
Block 6 shifts the divisor left and then right if the divisor>dividend.

svampebob
Автор

Sorry, no it only spits out the sum in binary values, it's a very crude circuit it does only A/B if A>B nothing more. and it does contain some weird bugs, like it can't do 34/9...
if I find a better method of doing divisions, it's something worth trying to included along with sub, mult, and additions all in one:)

svampebob
Автор

Can you help me to design circuit of
dividing two binary number 4 bits by 3 bits?

attiqurrehman
Автор

and the yellow block is a parallel in serial out register that is fed a (not-ed)negative flag of the subtraction circuit.

But like I said this is an old circuit, I've tweaked it.
I've removed 225 components and went from 485 components to 260 and from 50KHz to 1MHz.

If you want I can upload the new design and give you screen shots.

and yeah I looked up quartus and it seems to be pretty much the same thing, although Ive never used it :)

svampebob
Автор

hi..can u explain the function of each block...i seems lost...what software do you use?does it similar to quartus?

MrBerrylemon
Автор

Can you describe the basic logic for the circuit? Just what is doing what and why.

aniksamiurrahman
Автор

Can you help me to divide two binary numbers by three bits? I have trouble with this project.Thank you !!!

trietha
Автор

Your none of the link is working from the description box. please do take notice of it!

kavitayadav
Автор

it will be helpful if you can show me the newer version...if in quartus..do i need all the block design?

MrBerrylemon
Автор

do i need to change anything on your circuit if i want to do it in quartus?

MrBerrylemon
Автор

Sure, glad I could help you :)

I sent it in a PM

svampebob
Автор

does this circuit include signed bits?

AeonFlexMusic
Автор

thank you so much for your help., , can i have your email please?i have so many question to ask about this circuit...i kinda lost again

MrBerrylemon
Автор

I don't think so, but it's not the best design.
Look in the description the last links is what I would recomand that you build in quartus.

svampebob