# Calculating Circuit Delay

I am trying to understand why the calculating the last delay is $max(t,mt)+2t$. I suppose thats derived from $max(max(t,mt), t)+t$? But how do you extract the $t$ from $max(..., t)$ out.

UPDATE

I also dont get the next part ...

whats m? and how is $S_i=max(t,mt)+t$ and $C_{i+1}=max(t,mt)+2t$ simplified to $2t$ and $3t$ respectively?

• It's about the race between X/Y '0/0' inputs and C 'mt' – kenny Sep 22 '11 at 11:17
• @kenny, what about them? I don't understand ... I also updated my question – Jiew Meng Sep 22 '11 at 13:01
• max(x,y) takes the maximum of x or y and it's algebra – kenny Sep 22 '11 at 13:16
• oh yes, I understand that part. What I dont understand is how I get $C_{i+1}=max(t,mt)+2t$. What I got, from my own understanding is $C_{i+1}=max(max(t,mt)+t, mt)+t$. How do I simplify down to $C_{i+1}=max(t,mt)+2t$? Also I dont get whats $m$ in the update. How do I simplify from $C_{i+1}=max(t,mt)+2t$ to $C_5=9t$ for example? I may know $i$ but not $t$? – Jiew Meng Sep 22 '11 at 14:11
• @Brian Carlton - I previously removed the homework tag as it's deprecated, so I rolled back to that version. – stevenvh Sep 22 '11 at 15:50

The answer to the first question is that if you take max(max(t,mt)+t,mt)+t, you can bring the t in the inner brackets, obtaining max(t+t, mt+t): since the latter is always bigger than mt (unless you have a negative t) you can simplify with max(t+t, mt+t)+t and then take out again the +t and obtain the value shown.

For the second part, m is again the coefficient that multiplies t: let's take your case.

m=7, so max(t, 7t)+2t=9t as shown.

It's easy!

With the 'mt' for the C input, this just means that the input isn't ready until mt time after the X and Y inputs. Each gate adds propagation delay t, so this just tells you that Cin was produced by m gates.

About those two gates that produce Cout, and the nested max() -

max(max(mt,t), t) reduces to max(mt,t) :

let f(m,t) = max(max(mt,t),t)
let g(m,t) = max(mt,t)

if mt > t, then
f(mt,t) equals max(max(mt,t), t) equals max(mt, t) equals mt
g(mt,t) equals max(mt, t) equals mt

if mt <= t, then
f(m,t) equals max(max(mt,t), t) equals max(t, t), equals t
g(m,t) equals max(mt, t) equals t

So, for any m and t, functions f() and g() are equivalent. I.e., max(max(mt,t),t) reduces to max(mt,t) !

Now, with that out of the way, you should see that the t wasn't extracted from the max() expression; that t delay was incurred by the rightmost AND gate. It was the inputs to that AND gate that were ready at time max(mt, t), and its output was ready t units after that, for max(mt,t) + t. Likewise, the OR that produces the C output adds another t of propagation delay, giving you the max(mt,t) + 2t result.

You said you have,

Ci+1=max(max(t,mt)+t,mt)+t

Start as far in as possible:

max(t,mt)+t = mt+t

And make your way outward.

max(max(t,mt)+t,mt) => max(mt+t,mt) = mt+t

mt+t +t = mt + 2t

Ci+1 = mt + 2t

Where you could of course retain what you have as the solution:

Ci+1 = max(t,mt) + 2t

But after substitution, max(t, mt) will always evaluate to mt. I have never done this sort of thing before with circuit delays, but I assumed mt was just a constant scaled t. As such, just carry out the algebra where max(a,b)  returns the max of the two arguments.