Cut four 11 1/4-inch pieces of 4-by-4 post with the saw. Use a tape measure and pencil to mark each section before sawing through the post.
Stand two of these pieces against the wall of the fence, positioned as far apart as you want the bed's width to be.
Drill two 1/16-inch-diameter pilot holes through the back of the fence into each post, then connect the posts to the fence with 3-inch galvanized wood screws.
Cut three pieces of 2-by-12 board. One should match the desired width of your box, and the other two should be the length that you want the box to extend away from the fence.
Position the two side boards against the outside edges of the fence posts, using a carpenter's square so they extend perpendicular from the fence.
Drill two pilot holes through each side board and into the fence posts. Use wood screws and the screwdriver to attach them permanently.
Screw the other two post sections to the other end of the side boards, positioned on the inside edge.
Screw the longer board in place against the final two post sections to complete the box, with the fence making the fourth side.
Fill the bottom half of the box with leaves, sticks and other lawn debris. Top this off with soil or compost.