![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
Member
Join Date: Jan 2003
Posts: 85
|
Code:
|
|
|
|
|
|
#2 |
|
DevMaster Staff
Join Date: Apr 2003
Location: Germany
Posts: 2,328
|
useful ?
___________________________________________
If Prolog is the answer, what is the question ? |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2003
Location: Switzerland
Posts: 1,333
|
looks like the same i invented on my own once.
useful? indeed. for learning how that thing works, and for implementing it in hw.. at least an adder will possibly be my next step in school, horray! ![]()
___________________________________________
davepermen.net -Loving a Person is having the wish to see this Person happy, no matter what that means to yourself. -No matter what it means to myself.... |
|
|
|
|
|
#4 |
|
DevMaster Staff
Join Date: Apr 2003
Location: Germany
Posts: 2,328
|
we had all kinds of adders last term in hardware
___________________________________________
If Prolog is the answer, what is the question ? |
|
|
|
|
|
#5 |
|
New Member
Join Date: Aug 2006
Location: Romania
Posts: 1
|
here's my take on the Sum function:
Code:
smaller huh? :P Last edited by Reedbeta : 08-16-2006 at 11:21 AM. Reason: code tags, please!! |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Sep 2005
Location: .nl
Posts: 504
|
Okay, this doesn't sound really friendly, but it was the first thing that came in my mind:
WHO ** CARES? (Also notice that this reply is carefully crafted: it doesn't contain the letter x. Okay, that is a paradox. Oh crap, another one. Well, it doesn't contain a q either.) |
|
|
|
|
|
#7 |
|
Valued Member
Join Date: Oct 2005
Location: Switzerland
Posts: 117
|
Well, I can imagine that not using the multiply operator does indeed make sense on some CPU's. I've got an old 8086 assembly book which states that using the above method for multiplication using a (normal) add command was faster than using the mul operation. Recent PC CPU's do not have this behaviour any more, a Pentium type CPU needs some 5 or 6 cycles for a mul (where the 8086 used around 100). But this rule could still apply for some embedded CPU's.
|
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Sep 2005
Location: .nl
Posts: 504
|
Really? The Product function multiplies exactly like one does when multiplying on paper, only now in binary. How can a hardware mul be slower than that? Okay, this code has probably a better best-case execution time while the hardware mul has probably a best-case = worst-case time, but even then... the sum function is still useless, I guess, even 20 years ago.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|