The legs are joined to the beam using half-lap joints. They are simple to cut but to get them to fit well, the layout has to be right-on, so take your time and be precise. Beginning with one of the legs, find center by measuring in from each end. Then using another leg, find the center of its thickness. Place one leg on the other with center lines together and then mark to either side. Because of the rounded edge on most 2x4s, it’s easier to make the mark by adjusting the square to the length and marking from it. Transfer the line to the other three, both on the edge and about 1/2″ down either side. These are the shoulder lines.
On the beams, mark a line 2″ in from either end and 1/2″ down either side. Place a leg against the line and mark its thickness. Transfer that line as well. Lastly, set the square for 1/2″ and connect all of the pairs of lines.