Waiting Tine is the Time for which the process waits for the CPU to be available.
Consider a process A having (EX1 = 2 ......IO = 6..... EX2=2) arrives at time 0. it will first execute for 2 then goes for I/O for 6 .....Again execute for 2 . TAT = 10 WT would be 6 .
It doesn't matter what a process does if it has not been assigned CPU after it enters Ready queue Everything is counted as WT ( ie any I/O performed in bw is already considered in WT ) and need not be explicitly subtracted from TAT