Cut three 2-by-12s to the length you require for your ceiling beam.
Lay one 2-by-12 on the floor or on a large work surface. Spread wood glue over the top surface of the beam.
Lay another of the 2-by-12s on top of the first. Align the two planks perfectly and tack them together by driving a 2-inch nail into each end. Spread glue over the surface of the second plank.
Lay the third plank on top of the second plank. Align it with the two other planks and tack it on with a 2-inch nail at each end.
Permanently join the three planks by driving in 4-inch-long nails along the length of the planks. Drive in a row of four nails at the end and continue with rows of four nails at 12 inch intervals. When you are done, turn the assembly over and do the same from the other side, driving these rows of nails into the spaces between the first rows of nails, so that the rows of nails from opposite sides are staggered by 6 inches.