 This time we're going to be building a data path for a Branch Equals instruction. The Branch Equals instruction says that if the data in two registers is the same, then we're going to go to an address specified by the immediate in our instruction. If they're not equal, we just go on and run the next instruction. So we'll start with some registers because we want to be able to compare and see if the data in two of these registers is the same. To do my comparison, I'm going to need an ALU. Then I can do a subtraction operation and see if my results are zero. To know where to go, I'm going to need my instruction. So I'll also go get my instruction memory. That will give me a few things. It will tell me which two registers I want to compare. And it will also give me the immediate which will allow me to know where my target address is. I'm really interested in updating my program counter. So I'll put that in and that will allow me to find the address of my branch instructions. Since sometimes I may just go and take the next instruction, I'll add all the hardware that I need to increment my program counter by four to get the next instruction. Now the only other thing I need is to calculate my branch targeted address. So the immediate field in my instruction memory gives me 16 bits. It will allow me to find an offset from my current address. I'll use an adder here and it's going to take in two things. It's going to take in the current address and the offset from the instruction. So I have an immediate that I can add to my current address. Now I need to be able to select whether I take the address of the next instruction or my branch target address. So I'm going to add in a multiplexer to allow me to select between those two. And I will store the results of that multiplexer back to my program counter. Now I just need a way to control the program counter. So my ALU is doing a subtraction operation and if the results there are zero, then the two parameters were equal. So I'm going to take the results of my zero line and use that as the control for my multiplexer. And that's all I should need for my data path this time. Can I fetch the instruction? I get the data out of two registers. Do a subtraction operation to determine if they're equal. I can use that to select between either the next instruction or my target instruction. And we calculate the branch target address by adding the address of the current instruction to the offset that we get directly out of our branch instruction. But that's it. This one has a whole lot more steps than some of the others, but we're still doing the same things. We're just finding ways to assemble our pieces of hardware in such a way that we produce a system that is capable of executing our branch equals instruction.