logoalt Hacker News

tsimionesculast Wednesday at 6:04 PM1 replyview on HN

"Power" was very sloppy language on my side. I was talking about the low voltage / high voltage difference that you get from transistors. A logical gate ultimately has a single output voltage based on its inputs. If its inputs are 1 and 1 (+5V and +5V), its output will be, say, 0 (0V), not "initially both 0 and 1, but later only 1 is chosen".

Similarly, a two bit adder is not going to have all 4 possible states internally or for some time - as soon as the input voltage is applied to its inputs, its output voltages will correspond to the single result (disregarding the analog signal propagation, which I assume is not what you were talking about).

Similarly, a conditional jump instruction will not be implented natively by computing both "branches". It will do a single computation to set the instruction pointer to the correct value (either current + 1 or destination). Now sure, speculative execution is a different matter, but that is extra hardware that was added late in the processor design process.


Replies

MobiusHorizonslast Wednesday at 7:23 PM

You can’t really conditionally compute something in hardware. The hard to do the computation exists and is wired up always.

The conditional jump is a great example actually. Typically this would be implemented by having one block compute PC+<instruction size> and another block compute the jump target and then choosing between the two using a mux

show 1 reply