@Kushagra Sir, I understood your approach and it’s one of the best ways to solve such problems. Number of stalls = number of pipeline stages – 1[general case formula for branch instructions which can’t be overlapped](Implement pipeline operation on 2 instructions in which 1st instruction is branched instruction. You will see that here, we have 5 stages so let’s say (IF, OF, EX, MEM, WB are the stages). So, 1st instruction(branched instruction) will execute with 1 CPI(by default in the pipeline) but then 2nd instruction (irrespective of whether branched or non branched) will have to wait till WB of 1st instruction completes as it was branched instruction (In question, it’s mentioned we can’t overlap the branch, so we can’t executing 2nd instruction until and unless we get confirmation from 1st instruction(branched) whether it was branched or not, hence 2nd instruction generates 4 stalls)). Also,default case for branch instruction that can’t be overlapped, CPI = 1 + no. of stalls generated because of branch instructions [for pipeline].