And / Or etc for circuitry
Moderator: ickputzdirwech
Re: And / Or etc for circuitry
Sneak peek of 0.15
Re: And / Or etc for circuitry
@Klonan: Nice! Seems even bitwise AND, OR, XOR are in there.
Re: And / Or etc for circuitry
Hmm, I'm not sure I knew DIV from assembly language. Think it may have been SQL.Yoyobuae wrote:Eh? I didn't know the assembly language DIV mnemonic was actually common knowledge.DRY411S wrote:Indeed. DIV would be no different to '/', but it would help readability.Yoyobuae wrote:Signals are integer values. So Arithmetic combinator division is actually integer division.DRY411S wrote:Integer functions (DIV, MOD, x^y, factorial!)
Readability for who? Software engineers? Not all players have that kind of background.
Similar problem with MOD and even x^y (but there's no other good option for those).
If you don't want me to have DIV and want me to use / instead, can I have % on the arithmetic combinator instead of MOD? That definitely won't help readability for 'ordinary' players.
I appreciate that DIV, MOD, x^y are advanced, but there's no harm in having some extra complexity for people who'd like to exploit it is there? There's no need to dumb down the combinators as long as the complexity doesn't impact the game performance. It might encourage players to stretch their knowledge of arithmetic and engineering, and that wouldn't be a bad thing would it? IMO the combinator part of the game would actually be more accessible if these type of functions were available.
(Don't get me started on combinators that have 2 outputs, one on the red wire and a different one on the green....)
Re: And / Or etc for circuitry
Klonan wrote:Sneak peek of 0.15
Woohoo.
Re: And / Or etc for circuitry
And DIV and MOD and x^yYoyobuae wrote:@Klonan: Nice! Seems even bitwise AND, OR, XOR are in there.
- ChurchOrganist
- Filter Inserter
- Posts: 256
- Joined: Sun Apr 17, 2016 12:45 pm
- Contact:
Re: And / Or etc for circuitry
Awesome!Klonan wrote:Sneak peek of 0.15
Please, pretty please, may we have Hexadecimal entry of values now
Want to know where the biters chewing your power plant have come from??
Wondering where your next iron is going to come from??
You need Long Range Radar
Wondering where your next iron is going to come from??
You need Long Range Radar
- Gertibrumm
- Fast Inserter
- Posts: 162
- Joined: Fri Jun 03, 2016 6:54 pm
- Contact:
Re: And / Or etc for circuitry
WoohootooDRY411S wrote:Klonan wrote:Sneak peek of 0.15
Woohoo.
now I can remove two deciders and add one!
but the /= seems intimidating.
How are the bitwise operators going to work?
Re: And / Or etc for circuitry
I'd imagine the same way they've always worked.Gertibrumm wrote:Woohootoo
now I can remove two deciders and add one!
but the /= seems intimidating.
How are the bitwise operators going to work?
Input: >> or << (shift left or right): this_many_shifts => output_here
- Gertibrumm
- Fast Inserter
- Posts: 162
- Joined: Fri Jun 03, 2016 6:54 pm
- Contact:
Re: And / Or etc for circuitry
So we got x bit channels now or is this shift stuff encoded into integer numbers?DRY411S wrote:I'd imagine the same way they've always worked.
Input: >> or << (shift left or right): this_many_shifts => output_here
Re: And / Or etc for circuitry
Integers are encoded as binary numbers (signed 32 bit integers).Gertibrumm wrote:So we got x bit channels now or is this shift stuff encoded into integer numbers?DRY411S wrote:I'd imagine the same way they've always worked.
Input: >> or << (shift left or right): this_many_shifts => output_here
I imagine those operations will be applied to the underlying binary representation (ie. just like the operators would work in a programming language).
One thing that I kinda wanted but still is missing is bit test as condition operator. Right now the work around is using extra arithmetic combinators and abusing less/greater than operators. Either option has it's limitations.
The use case is having hundreds of inserters, lamps, pumps, belts being controlled in parallel by only a handful of signals. Minimizes the amount of wiring and the amount of signals, which in turn minimizes the required combinators to control them.
Re: And / Or etc for circuitry
You will have both and and or logical oprations. Those are your bit testsYoyobuae wrote:Integers are encoded as binary numbers (signed 32 bit integers).Gertibrumm wrote:So we got x bit channels now or is this shift stuff encoded into integer numbers?DRY411S wrote:I'd imagine the same way they've always worked.
Input: >> or << (shift left or right): this_many_shifts => output_here
I imagine those operations will be applied to the underlying binary representation (ie. just like the operators would work in a programming language).
One thing that I kinda wanted but still is missing is bit test as condition operator. Right now the work around is using extra arithmetic combinators and abusing less/greater than operators. Either option has it's limitations.
The use case is having hundreds of inserters, lamps, pumps, belts being controlled in parallel by only a handful of signals. Minimizes the amount of wiring and the amount of signals, which in turn minimizes the required combinators to control them.
I do agree that hex values would be very useful then - makes bit settings much more clear and readable.
Re: And / Or etc for circuitry
But I want to program bit tests directly to inserters and such.orzelek wrote:You will have both and and or logical oprations. Those are your bit tests
In the above screenshot the AND, OR operators were shown only for arithmetic combinator (so not available for conditional operators, like in deciders, inserters, lamps, etc).
Re: And / Or etc for circuitry
Not a problem. Just work out your boolean expressions before feeding into the decider.Yoyobuae wrote:But I want to program bit tests directly to inserters and such.orzelek wrote:You will have both and and or logical oprations. Those are your bit tests
In the above screenshot the AND, OR operators were shown only for arithmetic combinator (so not available for conditional operators, like in deciders, inserters, lamps, etc).
Eg. Let's say you want (A AND B) OR (C AND D) to trigger an output.
Arithmetic 1 : A AND B
Arithmetic 2: C AND D
Arithmetic 3: Artithmetic 1 OR Arithmetic 2
Decider: Arithmetic 3 == 1
There you go. Simple boolean logic.