Arrange a pair of 1/2-by-12-by-36-inch boards parallel to each other on the working surface. Turn these two boards -- which will be the sides of the bookcase -- on their long, thin ends about 3 feet apart.
Slide another 1/2-by-12-by-36-inch board against one pair of ends, to be the top of the bookcase. Drill four holes through the top of the bookcase and into each of the side boards. Attach the adjoining boards together securely by driving 2-inch wood screws into each of the holes.
Repeat the process with a 1-by-20-by-36-inch board on the other end of the side boards, to rest on the fireplace mantel and serve as the bottom of the bookcase. Allow the bottom board to stick up 8 inches above the rest of the bookcase frame.
Flip the bookcase frame over so the entire frame is resting on its front. Position a 1/2-by-36-by-37-inch board over the frame so the edges are even all the way around. Drill evenly spaced holes every 12 inches through this board -- which is the rear board -- and into the frame boards. Set 2-inch wood screws in the holes and tighten them securely.
Hold a 1/2-by-12-by-35-inch shelf board up inside the bookcase at a desired shelving position. Mark the shelf's position on each side board and drill two holes in each side board at the marked level. Set pegs in the holes and position the shelf on the pegs. Repeat as needed for additional shelving.
Use the stud finder to locate and mark the positions of the wall studs above the fireplace. Hold the bookcase frame in place over the fireplace and mark the locations of the studs on the rear board of the bookcase, using visible stud markings above and below the bookcase frame as a guide. Mark six evenly spaced spots on at least two different studs to attach the bookcase to the wall.
Predrill a hole in each spot, making sure the drill hits the studs each time. Pass 3-inch screws through washers and through the bookcase, then drive them into the holes.