I was going to ask this on Electric Engineering, but decided it's more related to programming.
With digital logic, we can reduce truth tables to minimized functions using Karnaugh diagrams or Boolean algebra. On a CPU, these functions can of course be expressed using conditional statements, however, I'm curious if there's a standard approach for realizing them without branches, using only bit operations, whenever this is possible.
I don't know if this is ever interesting to be able to do nowadays, or if it would actually be more efficient with today's processors. Still, it might have been relevant in the past and would be interesting to know anyhow.
So, let's say I have f = !a*b + !b*!c
, or any similar function: is there a system (like Karnaugh) for finding out whether there's a "smart" way to avoid branches, by using extra registers, calculating total bits, masking, anything? Or, is it just something you see if you see it and otherwise you don't?