The BD Counter Adder module

A place to talk to other users about the mod.
Post Reply
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

The BD Counter Adder module

Post by Rasuth »

After seeing what the BD 3-switcher is capable of, I went ahead and built a module that adds the number of pulses counted by two BDs.

As far as I know, thus far we could only multiply the BD counts (See Stormweaver's design in this thread). Having an adder module allows the counting of any number of pulses, even odd or prime numbers.
Design Ideas

To add the number of counted pulses it to necessary to first let one BD count n pulses, then let the second one count m pulses. This is achieved by wiring the pulse input to both counters in parallel but have T-FlipFlops toggle in such a fashion that only one BD at a time receives the input pulses. Once a BD outputs a pulse (counted to it's designated number), the FlipFlops are toggled and the other BD begins counting. When the second BD outputs a pulse, we have counted n+m pulses, the FlipFlops are toggled again, and the process repeats itself.
In my (proof of concept) version I used Harcion's 3-switcher to route the the same pulse to two BD counters. I already have ideas how to make the footprint of the adder much smaller.
-----------------------------------------------------------------------------------------------------
For example pictures of how to do it, please refer to the posts made by Harcion and me later in the topic.
Last edited by Rasuth on Tue Aug 09, 2011 12:55 pm, edited 3 times in total.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
Harcion
Posts: 59
Joined: Thu Jul 21, 2011 9:20 am

Re: The BD Counter Adder module [wip]

Post by Harcion »

Nice idea. I built two using your method just to check, one for numbers up to 18 (=2*9) and the other up to 27 (=3*9). Seems to work.

They use 4 and 6 BD's respectively which seems really expensive. I have a feeling there is a way to do it better but I can't figure it out.

Looking forward to seeing your smaller version. :)
Spoiler
Show
Image
Spoiler
Show
Image
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: The BD Counter Adder module [wip]

Post by Rasuth »

Wow yours are so small.
Guess I didn't really get how your 3-switcher is supposed to be used.
But that's what I love about this stuff, no matter what you do, someone's gonna show you a better way. ^^

Concerning the cost of the adder: I wanted to have a device that makes it possible to count to any number, not only multiples of the numbers from 2 to 9. Say you wanted to count to 22. How would you do that with only the multiply method?

The adder was designed to fill this gap. Now you simply count to 11, and multiply that with another 2 Counter in series. If you really, really need that precision cost might not matter.

I'd still use the multiply method for counting to high numbers and then use one adder to get to the number I wanted. I'm gonna build a few examples I guess.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
Harcion
Posts: 59
Joined: Thu Jul 21, 2011 9:20 am

Re: The BD Counter Adder module [wip]

Post by Harcion »

Rasuth wrote:Wow yours are so small.
Haha, I guess in any other discussion topic that statement would make me a little sad - but no so here. :)
Rasuth wrote: Guess I didn't really get how your 3-switcher is supposed to be used.
But that's what I love about this stuff, no matter what you do, someone's gonna show you a better way. ^^
Hope it makes more sense now.
Rasuth wrote: Concerning the cost of the adder: I wanted to have a device that makes it possible to count to any number, not only multiples of the numbers from 2 to 9. Say you wanted to count to 22. How would you do that with only the multiply method?

The adder was designed to fill this gap. Now you simply count to 11, and multiply that with another 2 Counter in series. If you really, really need that precision cost might not matter.

I'd still use the multiply method for counting to high numbers and then use one adder to get to the number I wanted. I'm gonna build a few examples I guess.
And yeah, I agree with what you are saying. It's just that I've been playing on my legit world for a while now, and BD's are quite a limited supply.
I still have that feeling that we're all missing something in this whole business, however, and not just with this application.
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: The BD Counter Adder module [wip]

Post by Rasuth »

For me Moss isn't that hard to come by. It just takes time.

There are some mods that help in getting more Moss Stone. "BattleTowers" is one example. But I prefer to use Nature Overhaul (lets Moss spread slowly), after you found your first dungeon, you can make some BDs and use them to automate a little Moss Farm. It takes forever on the default setting, but eventually your Moss supply grows. It's awesome for visual effects on buildings near water too.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: The BD Counter Adder module [wip]

Post by Stormweaver »

Rasuth wrote:Wow yours are so small.
Guess I didn't really get how your 3-switcher is supposed to be used.
But that's what I love about this stuff, no matter what you do, someone's gonna show you a better way. ^^

Concerning the cost of the adder: I wanted to have a device that makes it possible to count to any number, not only multiples of the numbers from 2 to 9. Say you wanted to count to 22. How would you do that with only the multiply method?

The adder was designed to fill this gap. Now you simply count to 11, and multiply that with another 2 Counter in series. If you really, really need that precision cost might not matter.

I'd still use the multiply method for counting to high numbers and then use one adder to get to the number I wanted. I'm gonna build a few examples I guess.
It's been a while since I've really sat down to do any maths, but I think most numbers we'd ever feasibly use could be made with (n)(m) or (n)(m)+1 where n and m are 2-9. If you want to reduce space, maybe just creating a 'one' counter at the start of a normal multiplying counter may work? I haven't actually built any of these yet -.- but I don't think creating a small circuit that can 'absorb' the first input to any part of the counter would be that large, and it should give almost full flexibility to it.
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: The BD Counter Adder module [wip]

Post by Rasuth »

I really tried to come up with the "plus 1" design you're talking about, but couldn't think of anything that might work. The BD Counter with only 1 conductive block would just function as overdesigned repeater.
I'm sure there are ways to do it, but they'd probably use the same principle I came up with. I.e. taking the first pulse, rerouting the following pulses to another Counter (needing at least an RS-Latch for the switching state), resetting after that Counter finishes.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
Battosay
Posts: 2042
Joined: Mon Jul 04, 2011 7:37 pm

Re: The BD Counter Adder module [wip]

Post by Battosay »

Or the (n)(m) signal goes into a Nor Latch, into a BD placing some redstone to connect the output, so when (n)(m)+1 signal comes you have the output, and you use the output signal to reset the Nor latch.
You can use a sticky piston and a conductive block instead of a BD btw.
User avatar
Harcion
Posts: 59
Joined: Thu Jul 21, 2011 9:20 am

Re: The BD Counter Adder module [wip]

Post by Harcion »

Stormweaver wrote: It's been a while since I've really sat down to do any maths, but I think most numbers we'd ever feasibly use could be made with (n)(m) or (n)(m)+1 where n and m are 2-9. If you want to reduce space, maybe just creating a 'one' counter at the start of a normal multiplying counter may work? I haven't actually built any of these yet -.- but I don't think creating a small circuit that can 'absorb' the first input to any part of the counter would be that large, and it should give almost full flexibility to it.
While I happen to be a mathematician, number theory is not my thing so I didn't (dis-)prove it either but rather ran a Python script to check what numbers all those n*m and n*m + 1 amounted too. Turns out the numbers you *cannot* get, given the restriction that 2 <= n,m <= 9 are
23, 34, 38, 39, 44, 47, 51, 52, 53, 58, 59, 60, 61, 62, 66, 67, 68, 69, 70, 71, 74, 75, 76, 77, 78, 79, 80.

For example 60 is in there, which might be a nice number to count to. That being said, adding a further counter (k?) gets you a lot of those "nice"-looking numbers, and then you don't need the +1 anyway.

Regardless, I like Battosay's idea for the +1. Nice.
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: The BD Counter Adder module [wip]

Post by Rasuth »

A 60 counter is really easy to accomplish by 3*4*5.
I think some of the Prime numbers are the really tricky ones.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
Harcion
Posts: 59
Joined: Thu Jul 21, 2011 9:20 am

Re: The BD Counter Adder module [wip]

Post by Harcion »

Rasuth wrote:A 60 counter is really easy to accomplish by 3*4*5.
I think some of the Prime numbers are the really tricky ones.
Yes, that's what I meant with the rest of my paragraph - m = 3, n = 4, k = 5. Agreed on the prime numbers. However, I don't think I'll spend any more thought on this until I find that I really need to count to one of those at-the-moment-uncountable-numbers. Up until now I've had to count to like 12, 10 and perhaps some number in the 2-9 range, but that's all.
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: The BD Counter Adder module [wip]

Post by Rasuth »

This is how one would rig up a way to add numbers greater than 9. The left part contains a 3-, a 4- and a 5-counter, the right BD is a 7 counter. Together they count to 67, which just so happens to be a prime number ^^.
67 Counter
Show
Image
Now where and why one needs to use it, still has to be discovered. Science for the sake of science, I guess.

Edit: effed up the curcuit. New picture uploaded.
Last edited by Rasuth on Tue Aug 09, 2011 12:45 pm, edited 1 time in total.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
BigShinyToys
Posts: 836
Joined: Fri Jul 08, 2011 9:53 pm

Re: The BD Counter Adder module

Post by BigShinyToys »

I made a Counter unit in my clock . i use the same unit to count to 10 12 and 6 . I use a AND gate modified to react only when the binary output is equal with what i want it to be . it then produces a pulse. i use that pulse to Zero out the counter. this means i can make it count to Exactly what i want ( I'm not limited to a list ) it can only produce hole numbers thought . no Fractions . if a counter is what you are looking for maby take a look at the Counters at the back of the clock I have made ? look above for link .
User avatar
Harcion
Posts: 59
Joined: Thu Jul 21, 2011 9:20 am

Re: The BD Counter Adder module

Post by Harcion »

BigShinyToys wrote:I made a Counter unit in my clock . i use the same unit to count to 10 12 and 6 . I use a AND gate modified to react only when the binary output is equal with what i want it to be . it then produces a pulse. i use that pulse to Zero out the counter. this means i can make it count to Exactly what i want ( I'm not limited to a list ) it can only produce hole numbers thought . no Fractions . if a counter is what you are looking for maby take a look at the Counters at the back of the clock I have made ? look above for link .
I had a look at your clock. The end result is cool, but the size of it is just enormous. I did not look at the counter units long enough to understand exactly how they work, but I think you could probably replace them by one turntable and one BD-counter which would decrease the space (and complexity) by a factor of 50 or something.

What you are basically doing is generating a pulse each second, counting this 60 times then generating a pulse for the minutes which counts 60 such pulses and sends a pulse to the hour counter which counts to 12, right? Correct me if I'm wrong. I'd use a turntable for the second-generator, 3 BD-s for the two 60-counters each and 2 BD's for the 12-counter. The space for each of the 60-counters is 1x2x9 so you could probably fit it into a 5x5x30 area or something like that.
User avatar
BigShinyToys
Posts: 836
Joined: Fri Jul 08, 2011 9:53 pm

Re: The BD Counter Adder module

Post by BigShinyToys »

first off you are right about how it works. second would the system you propose output in binary. as my segments are conected to a binary to seg converter if no how would it determin what segments to light up ? and i only mentioned the system i used because it is not limited to when it resets. size is NOT why i mentioned it. I know it is masive. (I'm working on a mutch smaller one now that usen no counter and no decoder . Yes it is posible to make a clock with out a counter.)
User avatar
Harcion
Posts: 59
Joined: Thu Jul 21, 2011 9:20 am

Re: The BD Counter Adder module

Post by Harcion »

BigShinyToys wrote:first off you are right about how it works. second would the system you propose output in binary. as my segments are conected to a binary to seg converter if no how would it determin what segments to light up ? and i only mentioned the system i used because it is not limited to when it resets. size is NOT why i mentioned it. I know it is masive. (I'm working on a mutch smaller one now that usen no counter and no decoder . Yes it is posible to make a clock with out a counter.)
The three counters I proposed would each output a pulse once they reach 60, 60 and 12 respectively. Then you would have to switch to the next number somehow - that mechanism is what I thought was in the long thing right behind the display, and that the counter units were simply, well, counters. But you mean you have integrated that into the unit so that it always outputs what 'count' it is on, through multiple redstone lines? That would be kinda neat and explain why it is so large I guess. I'll have to have another look at it...is there any chance you could give some sort of explanation of precisely what each unit does and how?

Also, sorry about slight off-topic Rasuth - perhaps we should start a new thread for this discussion.
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: The BD Counter Adder module

Post by Rasuth »

Nah, it's cool.

I'm kinda curious what you guys might build with these new counting possibilities. I'm also wondering if one could build a clock display with Block Dispensers. It should be possible, although it might get iffy wiring all the BDs and especially only toggling the right ones. God, we need those lenses ^^
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: The BD Counter Adder module

Post by Stormweaver »

Rasuth wrote:Nah, it's cool.

I'm kinda curious what you guys might build with these new counting possibilities. I'm also wondering if one could build a clock display with Block Dispensers. It should be possible, although it might get iffy wiring all the BDs and especially only toggling the right ones. God, we need those lenses ^^
Hmm...I'lll explain my thoughts in a bit more detail here.

each 'segment' of BDs, light blocks, or what have you would be controlled by a block dispenser containing boats and...whatever's conductive, in order of whether the segment lights up in the order 0, 1, 2, 3, 4, 5, 6, 7, 9. The 8th count should be bypassed in all segments for obvious reasons. then the input pulse from each is linked to the '0' count in the previous ones.

It definitely seems doable.
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: The BD Counter Adder module

Post by Rasuth »

Hmm yeah, eliminating the need for an 8 makes it feasible indeed. Before I couldn't wrap my head around how you would store 10 "states" in 9 slots.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: The BD Counter Adder module

Post by Stormweaver »

Rasuth wrote:Hmm yeah, eliminating the need for an 8 makes it feasible indeed. Before I couldn't wrap my head around how you would store 10 "states" in 9 slots.
Heh, I spent ages trying to figure it out tbh, and couldn't come up with anything better than 2 BDs per segment, each holding 5 of the states. It was re-reading this thread that got me thinking about bypassing one pulse somewhere else though.
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
Rasuth
Posts: 141
Joined: Sat Jul 09, 2011 7:57 am

Re: The BD Counter Adder module

Post by Rasuth »

So I was playing around a bit. You definitely don't want to build to a clock, that displays seconds. Timing in that display is gonna be glitchy as hell. Displaying 10 sec increments on the other hand should work fairly reasonable, though it's odd to display that information. I'd consider taking the every second pulse, to display the blinking dots between hours and minutes most digital clocks have.

However the trick with the 8 seems to actually work pretty well.
TaterBoy wrote:Well, now I know. And as GI-Joe says, knowing is half the battle. :)
The other half is violence.
Unless you're GI Socrates. Then the other half is "You don't know anything
- TheAnarchitect
User avatar
BigShinyToys
Posts: 836
Joined: Fri Jul 08, 2011 9:53 pm

Re: The BD Counter Adder module

Post by BigShinyToys »

Harcion wrote:
The three counters I proposed would each output a pulse once they reach 60, 60 and 12 respectively. Then you would have to switch to the next number somehow - that mechanism is what I thought was in the long thing right behind the display, and that the counter units were simply, well, counters. But you mean you have integrated that into the unit so that it always outputs what 'count' it is on, through multiple redstone lines? That would be kinda neat and explain why it is so large I guess. I'll have to have another look at it...is there any chance you could give some sort of explanation of precisely what each unit does and how?

Also, sorry about slight off-topic Rasuth - perhaps we should start a new thread for this discussion.
If you want to discuss the function of the clocks parts i have put it up on the old thread i made for the Digital clock .viewtopic.php?f=3&t=249
Post Reply