# How does a computer know when to “get” the output from the ALU?

Basically what the title says, I guess I've got some sort of misconception or somthing probably. The ALU can have, say, a ripple carry adder which doesn't produce its entire output all at the same time (it ripples). So how does a computer know when the output is ready? Does it have to do with the clockspeed and propagation delay?

• Given the need for addition in many computer operations, such as computing array element locations in memory, or relative-register addressing, the Clock period is usually somewhat larger than the ADDER propagation delay. – analogsystemsrf Apr 17 at 1:22
• the "computer" does not know ..... the person that designed the cpu knows and has designed the circuitry in a way that allows the output of the ALU to be read at the correct time – jsotola Apr 17 at 1:30

Let's say that you work out the worst-case propagation delays through the ripple-carry adder and all associated logic as being $$\178\:\text{ns}\$$ (this includes both subtraction and addition, let's say.) Then you might choose to arrange the minimum clock period to be $$\250\:\text{ns}\$$ so that you are certain there is enough time. If so, then you might latch the inputs to the ALU on the prior clock period (assuming you can latch both inputs on the same clock, which may not be true) and latch the output of the ALU on the current (following) clock period. That's fine, because you know for sure that there has been enough time for the ALU output to stabilize.
That's not the only way, though. You might have a system which, for other design reasons, has a minimum clock period of $$\100\:\text{ns}\$$. So, to be safe you arrange things so that you latch the inputs on $$\c_0\$$ and then only latch the output of the ALU on $$\c_3\$$ ($$\300\:\text{ns}\$$ later.) The faster clock may serve other uses well, despite causing the addition/subtraction to take even longer than it might had the minimum clock period been longer. Of course, you could also consider latching the output on $$\c_2\$$ in this case because $$\200\:\text{ns}\$$ is longer than the required $$\178\:\text{ns}\$$.