You are not logged in.
Pages: 1
Can anyone help me out with this problem. I want to know how many AND, OR,shift gates are there in
1) addition
2)multiplication
3)subtraction
4)division
operations.
Thanks in advance.
Offline
well your question isn't very straightfoward, firstly im going to assume you mean integers
addition between N bit integers, is N×(2×XOR + 2×AND + 1×OR) although in its lowest number you could replace this with (N-1)×(2×XOR + 2×AND + 1×OR) + 1×XOR + 1×AND
heres a schematic diagram: http://www.play-hookey.com/digital/images/faddr000.gif
this is for a full 1 bit addition, for N bit addition these are linked in series with each Cout going to the next Cin
subtraction between N bit integers, doing it the fastest way is N×(2×XOR + 2×AND + 1×OR + 1×NOT) (each input from the second integer is inverted, and the first overflow bit going to the first bit addition is set to 1) assuming signed integers are in two's complement form.
multiplication and division i have never programmed into an electronic circuit so i couldn't tell you, you can always do multiplication with addition and bit shifts, but that is alot of operations and im sure there is a better way.
The Beginning Of All Things To End.
The End Of All Things To Come.
Offline
Also, if you don't want to ripple down the digits, you can build a more complex adder that does all the answers like a hash table for a certain number of bits or digits (depending on the base of the numbering system).
rippling is like a series of events with carries, but doing it all at once may take more devices, but be faster.
igloo myrtilles fourmis
Offline
Pages: 1