Electronics Forums > 4-Bit Divisor Implementation Using Logic Gates

# 4-Bit Divisor Implementation Using Logic Gates

Junaid Uppal
Guest
Posts: n/a

 10-25-2004, 07:02 PM
Hello Everyone,

I am currently working on a project to implement 4-bit division using
logic gates / registers etc ( Basic Level DLD Stuff ). I've been
searching online / offline for a lot of time now but haven't found
anything that can help me implement my circuit. Can anyone help me out
in making this circuit please? some pointers / logic diagrams or
anything.

Thanks & Regards

Junaid Uppal

Andrew Holme
Guest
Posts: n/a

 10-25-2004, 08:32 PM
Junaid Uppal wrote:
> Hello Everyone,
>
> I am currently working on a project to implement 4-bit division using
> logic gates / registers etc ( Basic Level DLD Stuff ). I've been
> searching online / offline for a lot of time now but haven't found
> anything that can help me implement my circuit. Can anyone help me out
> in making this circuit please? some pointers / logic diagrams or
> anything.
>
> Thanks & Regards
>
> Junaid Uppal

Try something like

http://tima-cmp.imag.fr/~guyot/Cours...ish/Divise.htm

petrus bitbyter
Guest
Posts: n/a

 10-25-2004, 09:16 PM

"Junaid Uppal" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed) om...
> Hello Everyone,
>
> I am currently working on a project to implement 4-bit division using
> logic gates / registers etc ( Basic Level DLD Stuff ). I've been
> searching online / offline for a lot of time now but haven't found
> anything that can help me implement my circuit. Can anyone help me out
> in making this circuit please? some pointers / logic diagrams or
> anything.
>
> Thanks & Regards
>
> Junaid Uppal

Well,

Guess you're not supposed to find a divisor but to build one. Besides your
question is not very clear. A four bit divisor? To carry out a division you
need a dividend and a divisor to obtain a quotient. Are all of them four
bits? Then you make a truthtable with the dividend and the divisor on the
input side and the quotient on the output side. That table will have 2^8
entries. You can list the logic gate solution directly from that table but I
guess you're supposed to minimise the circuit by using Karnaugh maps, Quine
McClusky or some other tool.

In practice I'd write a little program (quick and dirty in Basic) to
calculate the required outputs and write them in an EPROM but I guess you're
not allowed to do it that way. A real modern approach is using programmable
logic.

As four bits divisors are not very practicle most of the times and this kind
of "table lookup" becomes quickly too large for even eight bit numbers, most
real divisors are made using shift registers and a subtractor. A good
textbook should treat this stuff. I have a (Dutch) one that has some
examples. May be you should not stick on the internet only but have a look
in a (technical) library as well.

petrus bitbyter

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 15-10-2004

Jonathan Kirwan
Guest
Posts: n/a

 10-26-2004, 12:15 AM
On 25 Oct 2004 12:02:06 -0700, (E-Mail Removed) (Junaid Uppal) wrote:

>I am currently working on a project to implement 4-bit division using
>logic gates / registers etc ( Basic Level DLD Stuff ). I've been
>searching online / offline for a lot of time now but haven't found
>anything that can help me implement my circuit. Can anyone help me out
>in making this circuit please? some pointers / logic diagrams or
>anything.

Should be plenty on the web for this, I'd imagine. Combinatorial methods would
use a set of compare and mux stages, one pair of these for each output result
bit, plus a little more stuff. Sequential methods would use a single
subtractor, shifter, and a little glue. But the methods are basic stuff. Have
you looked?

Jon

Junaid Uppal
Guest
Posts: n/a

 10-26-2004, 02:49 AM
I actually need to implement *any* division algorithm for an input of
4bit binary numbers and yes i can use shift registers , counters and
all of them but not eproms and stuff. So do you have any pointer to
that , i am sorry,i've been trying a lot to look around , figure out
and implement a circuitory but wasnt successful at all even after
looking at books!

Regards

-uppal

"petrus bitbyter" <(E-Mail Removed)> wrote in message news:<K2efd.84650\$(E-Mail Removed)>.. .
> "Junaid Uppal" <(E-Mail Removed)> schreef in bericht
> news:(E-Mail Removed) om...
> > Hello Everyone,
> >
> > I am currently working on a project to implement 4-bit division using
> > logic gates / registers etc ( Basic Level DLD Stuff ). I've been
> > searching online / offline for a lot of time now but haven't found
> > anything that can help me implement my circuit. Can anyone help me out
> > in making this circuit please? some pointers / logic diagrams or
> > anything.
> >
> > Thanks & Regards
> >
> > Junaid Uppal

>
> Well,
>
> Guess you're not supposed to find a divisor but to build one. Besides your
> question is not very clear. A four bit divisor? To carry out a division you
> need a dividend and a divisor to obtain a quotient. Are all of them four
> bits? Then you make a truthtable with the dividend and the divisor on the
> input side and the quotient on the output side. That table will have 2^8
> entries. You can list the logic gate solution directly from that table but I
> guess you're supposed to minimise the circuit by using Karnaugh maps, Quine
> McClusky or some other tool.
>
> In practice I'd write a little program (quick and dirty in Basic) to
> calculate the required outputs and write them in an EPROM but I guess you're
> not allowed to do it that way. A real modern approach is using programmable
> logic.
>
> As four bits divisors are not very practicle most of the times and this kind
> of "table lookup" becomes quickly too large for even eight bit numbers, most
> real divisors are made using shift registers and a subtractor. A good
> textbook should treat this stuff. I have a (Dutch) one that has some
> examples. May be you should not stick on the internet only but have a look
> in a (technical) library as well.
>
> petrus bitbyter
>
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.778 / Virus Database: 525 - Release Date: 15-10-2004

Rich Grise
Guest
Posts: n/a

 10-26-2004, 04:01 AM
On Mon, 25 Oct 2004 19:49:21 -0700, Junaid Uppal wrote:

> I actually need to implement *any* division algorithm for an input of
> 4bit binary numbers and yes i can use shift registers , counters and
> all of them but not eproms and stuff. So do you have any pointer to
> that , i am sorry,i've been trying a lot to look around , figure out
> and implement a circuitory but wasnt successful at all even after
> looking at books!
>

Well, you can achieve the same effect as an eprom look-up table with
some logic chips.

Are you allowed to use diode logic? Tell 'em you're going _really_
retro - then cheat.

Unfold a ROM.

Figuring out how do do this will add much more to your reasoning
power than having it shown to you.

There are two, four-bit inputs - how many possible sets of input
states are there? Could you translate each of these product terms
to a quotient and remainder with a few gating diodes?

You _do_ know how to build a diode AND gate, don't you? ;-)

Have Fun!
Rich

Jonathan Kirwan
Guest
Posts: n/a

 10-26-2004, 08:29 AM
On 25 Oct 2004 19:49:21 -0700, (E-Mail Removed) (Junaid Uppal) wrote:

>So do you have any pointer to
>that , i am sorry,i've been trying a lot to look around , figure out
>and implement a circuitory but wasnt successful at all even after
>looking at books!

Look in "HDL Chip Design," as it includes both combinatorial and sequential
methods. (and their schematics)

Jon

Andrew Holme
Guest
Posts: n/a

 10-26-2004, 08:32 AM
"Andrew Holme" <(E-Mail Removed)> wrote
> http://tima-cmp.imag.fr/~guyot/Cours...ish/Divise.htm

These circuits generate the answer in 1 clock cycle.

Alternatively, you could do a sequential divider using registers,
counters, shift registers e.t.c. This is standard long division, as
you do it with pencil and paper, but in binary e.g.

00011
-------
0100 ) 01100
0100
----
00100
0100
----
0

You need shift registers, a binary subtractor (or comparator), and
counters.

Marlboro
Guest
Posts: n/a

 10-26-2004, 04:46 PM
(E-Mail Removed) (Junaid Uppal) wrote in message news:<(E-Mail Removed). com>...
> Hello Everyone,
>
> I am currently working on a project to implement 4-bit division using
> logic gates / registers etc ( Basic Level DLD Stuff ). I've been
> searching online / offline for a lot of time now but haven't found
> anything that can help me implement my circuit. Can anyone help me out
> in making this circuit please? some pointers / logic diagrams or
> anything.
>
> Thanks & Regards
>
> Junaid Uppal

Sound like school homework,

Jonathan Kirwan
Guest
Posts: n/a

 10-26-2004, 05:25 PM
On 26 Oct 2004 09:46:39 -0700, (E-Mail Removed) (Marlboro) wrote:

>Sound like school homework,

I think everyone posting in response realizes this, too, and has been a little
circumspect about providing a solution, while including some words for a search
or books for more study.

Jon

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post sjgallagher2 Electronic Projects 3 02-19-2013 08:21 PM Genome Electronic Design 2 04-15-2006 10:53 PM Davy Electronic Design 4 10-28-2005 09:05 AM Davy Electronic Basics 4 10-28-2005 09:05 AM eric Electronic Design 15 02-05-2004 03:31 AM