ME 2 does a shit job of explaining this, but I think the way it's supposed to work is that the Geth are able to utilize the concept of direct democracy over local networks and over faster than light communication networks in a way that organics simply cannot match. And not only is it direct democracy, but by analyzing feedback from below, the Geth network can revise potential the courses of action and vote on them revising and re-voting until a solution is reached that is acceptable to most of the network of minds. I know we at KiwiFarms aren't a bunch of machine minds that can crunch numbers until we reach a solution, but people on this site have been able to change my mind on a subject through honest discourse more often than in every other community I've been a part of.
@GethN7 please grace us with your autistic opinion
That's a rough summation of the basics, but it gets a tad more nuanced than that.
The Geth would simply be an emotionless consensus if they had no higher sentience, but they attained it as a logical result of their communal learning abilities that greater enhanced their power of reason over time, a fact the Quarians did not anticipate and feared would lead to a Terminator 'turned against their masters' situation if they encouraged it to continue.
Ironically, in their attempts to suppress it, they only further enhanced the sentience of the Geth to the point they learned a crude form of emotions as a result of the fallout of the final attempts the Quarians made to stop their own creation.
As Legion reveals, this caused the direct democracy caused by their communal consensus tendencies to warp a little, and the reason there were a dissident faction of Geth who joined up with Saren and otherwise lashed out at non Geth for reasons other than reasonable self defense was this emotional response causing the consensus to have an irreconcilable divide.
As a result, the dissidents formed their own consensus, split apart from the greater Geth as a whole.
Both the main faction and dissident faction still came to decisions afterwards by communal consensus even with the emotion card causing this factional split, because despite the sentience they gained, it was still limited because the Geth were still hardwired to function as a group (or multiple groups) instead of a mass of individuals, exceptions like Legion being the exception until Mass Effect 3, where concentrated exposure to the Reapers further altered the Geth so they were capable of truly individual thinking, a concept Legion explained was causing his kind to shit the bed hard because unlike him, who had been specially prepared to get used to the concept, they found the idea of each Geth platform having it's own decisions apart from a group vote of any sort to be anathema they couldn't comprehend (even Legion himself was a result of the Geth making a group decision to have him be an ambassador of sorts), and when Legion sacrificed himself, he basically shared his experience with adjusting to the concept with his kind as a whole so they'd quit freaking the fuck out like they had been when the Reapers messed with their protocols initially.