Aretmetic combinator

Post all other topics which do not belong to any other category.
Post Reply
Shaymes
Fast Inserter
Fast Inserter
Posts: 215
Joined: Thu May 22, 2014 8:06 am
Contact:

Aretmetic combinator

Post by Shaymes »

Hi there
maybe soneone can me explain what << and >> is for?
Mining Drill Operator

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: Aretmetic combinator

Post by Choumiko »

It's left (<<) and right bitshift (https://en.wikipedia.org/wiki/Logical_shift)

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Aretmetic combinator

Post by DaveMcW »

Correction, it is arithmetic shift.

I would love to have >>> for true logical shift.

jorgenRe
Filter Inserter
Filter Inserter
Posts: 535
Joined: Wed Apr 09, 2014 3:32 pm
Contact:

Re: Aretmetic combinator

Post by jorgenRe »

If you want to trye it out go to wolfram alpha at https://www.wolframalpha.com/input/?i=5+%3C%3C+1
and just write something like: 5 << 1 which becomes 10
Think of << as a multiplier and >> as a divider.
Where the number on the left is multiplied/divided by 2 * (number on right)
However be aware that since it's a binary operation(i guess you can call it that) it will throw away the any decimals you get so instead of 5 >> 1 = 2.5 you get 2
Logo
Noticed the told change in FFF #111 so il continue to use my signature ^_^
Thanks for listening to our suggestions, devs :D!
I would jump of joy if we could specify which tiles spawned in a surfaces

Shaymes
Fast Inserter
Fast Inserter
Posts: 215
Joined: Thu May 22, 2014 8:06 am
Contact:

Re: Aretmetic combinator

Post by Shaymes »

thx for help acual i dont see any use for it in my factory atm but maybe becomes usefull later

after i know its "aretmetic shift" i found this https://www.youtube.com/watch?v=fDKUq38H2jk
Mining Drill Operator

Post Reply

Return to “General discussion”