Like we have instruction
1 a=b +c;
2 c=b+a;
we can see 2 is dependent on so
Without oprand forwarding→ we know that we have 5 stages(fetch,decode,oprand fecth,execute,write back)
as we can see 2 is dependent on so so only after write back stage of instruction 1 is not completed we can go to 2 instruction,so it will result in increasing number of stalls. this is known a data hazard.
Example a=1,b=2,c=3;
a=2+3;
c=2+1;
but a should be 5 accoring to instrution so we can execute the second instruion after the 1st only.this is known a data hazard.
With oprand forwarding=in oprand forward if you know we have a register buffer which stores if store value in buffer just after execution and pass to next instruction so we doesn’t need to write back.it’s decrease number of stalls.
To save from data hazards with decrease number of stalls we use data hazard.
Hope this is clear!