how to cut multiple 2x4 to a same length with a circular saw
What you just described (cutting multiple pieces at the same time) is in the construction field referred to as "gang cutting". And, yes, if your only power tool is a circular saw, than to get the most precise and exact lengths, cut them in a gang cut. What you should first do is make an initial gang cut at the bottom so as to square the ends. Than measure and mark the length.  After they are clamped strike a line with a square across all pieces. If you have a steady hand slowly begin the cut being sure to keep the saw blade to the waste side of the line. Or clamp a guide fence down so that when the saws base plate edge rides along it the blade is at the appropriate mark (usually 3- 3 1/2 inches from inside blade edge to outside plate edge).