Maker Pro
Maker Pro

binary arithmetic

J

jhon1

Jan 1, 1970
0
hello all
is there any simple circuit that can perform the all basic binary
arithmetic operations (multiplication, division, subtraction,
addition)?
thank you all
 
P

petrus bitbyter

Jan 1, 1970
0
jhon1 said:
hello all
is there any simple circuit that can perform the all basic binary
arithmetic operations (multiplication, division, subtraction,
addition)?
thank you all

As for addition and subtraction (and a lot of other things) the ALU =
Arithmetic and Logical Unit is used. But there is no simpel circuit for
multiplicaton and divison as this are not simple operations.

petrus bitbyter
 
M

martin.shoebridge

Jan 1, 1970
0
petrus bitbyter said:
As for addition and subtraction (and a lot of other things) the ALU =
Arithmetic and Logical Unit is used. But there is no simpel circuit for
multiplicaton and divison as this are not simple operations.

petrus bitbyter
Everything in the world starts with a' half adder'........
 
P

Paul Hovnanian P.E.

Jan 1, 1970
0
jhon1 said:
hello all
is there any simple circuit that can perform the all basic binary
arithmetic operations (multiplication, division, subtraction,
addition)?
thank you all

A circuit with a microprocessor in the middle. That's as simple as you
can get based on parts count (the uP being one part).
 
I

Icky Thwacket

Jan 1, 1970
0
martin.shoebridge said:
Everything in the world starts with a' half adder'........

You can build absolutely anything using the two elements:-

A 2 input nand and a D-type FF.
 
M

martin.shoebridge

Jan 1, 1970
0
Everything in the world starts with a' half adder'........
You can build absolutely anything using the two elements:-

A 2 input nand and a D-type FF.
So how do you make a D type FF ? :) 2 I/p nands of course.
 
J

Jim Thompson

Jan 1, 1970
0
So how do you make a D type FF ? :) 2 I/p nands of course.

Not quite. It takes at least one 3-input nand... more if you want a
set/reset function as well.

...Jim Thompson
 
M

martin.shoebridge

Jan 1, 1970
0
Not quite. It takes at least one 3-input nand... more if you want a
set/reset function as well.
So you can't make a 3 i/p nand from a selection of 2 i/p nands then? More
homework for you I think.... logically correct, pointless in practice,
unless you are at college...........
 
J

Jim Thompson

Jan 1, 1970
0
So you can't make a 3 i/p nand from a selection of 2 i/p nands then?

Of course you can... but hardly minimal. And, in the real world,
would aggravate metastability.
More
homework for you I think....

Homework for ME? Hardly. I'm got out of The Institute 44 years ago
;-)
logically correct, pointless in practice,
unless you are at college...........



...Jim Thompson
 
W

whit3rd

Jan 1, 1970
0
is there any simple circuit that can perform the all basic binary
arithmetic operations (multiplication, division, subtraction, addition)?

Depends on what you call 'simple'. If you want to do these operations
on four-bit binary numbers, you could put a lookup table in ROM
that takes
4 bits of operand 1
4 bits of operand 2
2 bits of identify-the-operation code
and outputs up to eight bits (enough for multiply to not overflow)
You'll have to decide how to treat negative results in subtraction.
Division can yield four bits of result and four more of remainder

and the whole thing is a single ROM of 1024 bytes (this is VERY small
chip, really just a fraction of a current sizes). So, if less than
one IC
counts as simple, this is simple.

But, such a ROM has thousands of transistors; if you want to minimize
transistor count, consider that a modest op amp only needs a
dozen transistors, and that a transistor yields a current that is
proportional to the exponential of a voltage; you can do logarithms
with ease, and exponentials, and simple resistor connections
accomplish
sums (and negations are two-resistors-and-an-amplifier).
Up to 8 digits accuracy and maybe 1MHz bandwidth, you can
do all those operations on voltage-analog-to-pure-number signals
with maybe 150 transistors.
 
D

Dr. Anton T. Squeegee

Jan 1, 1970
0
hello all
is there any simple circuit that can perform the all basic binary
arithmetic operations (multiplication, division, subtraction,
addition)?
thank you all

Yes. It's called a 'Pocket Calculator.'

Happy figuring.
 
D

D from BC

Jan 1, 1970
0
Yes. It's called a 'Pocket Calculator.'

Happy figuring.

Now there's a response as bad as this:
Q: How do I erase an EPROM?
A: Use a hammer..
:)


D from BC
 
P

Paul Burke

Jan 1, 1970
0
jhon1 said:
hello all
is there any simple circuit that can perform the all basic binary
arithmetic operations (multiplication, division, subtraction,
addition)?
thank you all

Depends on what else you've got in the circuit. Analog or digital, what
resolution/ accuracy (or word size), how fast, what size operands, etc.
etc. If you want it fast and flexible, but not particularly easy or
cheap, use an FPGA.

Paul Burke
 
K

Ken Smith

Jan 1, 1970
0
hello all
is there any simple circuit that can perform the all basic binary
arithmetic operations (multiplication, division, subtraction,
addition)?
thank you all

You can use a PROM. The address lines are the two data values and the
operation selection.
 
I

Icky Thwacket

Jan 1, 1970
0
Ken Smith said:
You can use a PROM. The address lines are the two data values and the
operation selection.

Brilliant!

So for 32 bit data, 8 functions and 64 bit results we need a ........ errr
ummmmmmm

32 + 32 + 8 address lines and 64 data lines

ooooooooh thats a 72 bit address or approx 4 x 10^21 64 bit words ...... yep
thats 32 zetta bytes !

...... don't think the technologies quite up to it yet chum!
 
R

Rich Grise

Jan 1, 1970
0
Brilliant!

So for 32 bit data, 8 functions and 64 bit results we need a ........ errr
ummmmmmm

32 + 32 + 8 address lines and 64 data lines

ooooooooh thats a 72 bit address or approx 4 x 10^21 64 bit words ...... yep
thats 32 zetta bytes !

..... don't think the technologies quite up to it yet chum!

So, just do it a nybble at a time. For two four-bit words, you've got 8
bits for A and B, and two bits for "function", and 8 bits of output.
1024 X 8 should be easy to roust up. ;-)

Carry out might be a little tricky, but for add and sub, it's just the
low bit of the high nybble. I don't even want to think about doing a
practical multiply or divide, so that'd be best reserved for "demo". :)

Cheers!
Rich
 
K

Ken Smith

Jan 1, 1970
0
Brilliant!

So for 32 bit data, 8 functions and 64 bit results we need a ........ errr
ummmmmmm

So for 4 bit data, 8 functions and 16 bit answers we need ....

..... don't think the technologies quite up to it yet chum!


The OP didn't say how many bits were needed, now did he
 
K

Ken Smith

Jan 1, 1970
0
"Ken Smith" <[email protected]> wrote in message
[....]
So, just do it a nybble at a time. For two four-bit words, you've got 8
bits for A and B, and two bits for "function", and 8 bits of output.
1024 X 8 should be easy to roust up. ;-)

Carry out might be a little tricky, but for add and sub, it's just the
low bit of the high nybble. I don't even want to think about doing a
practical multiply or divide, so that'd be best reserved for "demo". :)


If you can go nibble at a time, why not a bit at a time. The multiply
isn't all that awful if you can use enough clock cycles. You may want to
use two PROMs to make it easier to design. One can determine the
sequencing and the other and do the actual math. What you end up making
is sort of a limited processor.


If you don't need exact values you could use a table based log()
approximation.
 
H

Homer J Simpson

Jan 1, 1970
0
jhon1 said:
hello all
is there any simple circuit that can perform the all basic binary
arithmetic operations (multiplication, division, subtraction,
addition)?
thank you all

See http://www.trs-80.com : Books (http://www.trs-80.com/trs80-bk.htm)

Understanding Digital Computers
Year: 1978
Author: Forest M Mims
Publisher: Radio Shack
Type: PDF
Pages: 162
Download Size: 24.2M

Very interesting book on microcode.
 
R

Rich Grise

Jan 1, 1970
0
If you can go nibble at a time, why not a bit at a time. The multiply
isn't all that awful if you can use enough clock cycles. You may want to
use two PROMs to make it easier to design. One can determine the
sequencing and the other and do the actual math. What you end up making
is sort of a limited processor.

If you don't need exact values you could use a table based log()
approximation.

Oy, talk about memory lane! The very first computer I ever programmed
was a G-15. Its main memory was a rotating magnetic drum. It did
everything one bit at a time, albeit in groups of 29 bits per word:

http://www.abiengr.com/~sysop/Share/tekrpt1.pdf - CAUTION! 2.8 MB download!

Cheers!
Rich
 
Top