Homeowners who want to expand their homes often finish off their basements or attics.

They usually divide one large space into two or more separate rooms or create storage areas by erecting new walls or partitions. The walls are framed out by erecting 2-by-4s spaced properly to support the wood or drywall panels that will be nailed up over them.

Erecting the necessary framing is not especially difficult once the structural principles are understood, because these are normally not load-bearing walls; they are merely partitions that do not have to support anything above.

However, the do-it-yourselfer must be familiar with basic carpentry techniques to achieve a reasonably straight, solid wall that will have studs (vertical 2-by-4s) properly spaced and aligned to provide adequate nailing surfaces for the wall panels that will be installed.

In a typical partition wall, there is a horizontal length of 2-by-3 along the bottom (called the sole plate) and another along the top (the top plate). Between are the vertical studs that are normally spaced 16 inches apart, center to center; (this means 16 inches from the center of one to the center of the next one).

Studs can also be spaced 24 inches apart (center to center) with some types of wall paneling, so it is a good idea to check specifications for the panels you will be using; (if in doubt, space them 16 inches apart).

Although the steps to follow in framing out a typical wall will vary among different carpenters, most do-it-yourselfers will find it easiest to start by locating and installing the horizontal top plate. If this is in the basement, there will be overhead joists or floor beams to which the top plate can be fastened; if it is an attic, there will usually be overhead roof rafters or horizontal beams (between the rafters) to nail against.

In either case, if the new wall will be running across (at right angles to) the overhead beams or rafters, you simply nail the top plate to the underside of these. If it will be running parallel to the overhead joists, position the top plate directly under one of them if at all possible. If you must position the top plate between two of the overhead beams, you will first have to install short pieces of 2-by-4 between the teams.

After the top plate is secured, nail the bottom plate down to the floor right under it. Use a plumb bob to accurately position the bottom plate directly under the top one. If the floor is concrete, use masonry nails and a hammer-in masonry nail fastener (a special tool that holds masonry nails to prevent bending while you hammer) or rent a powder-actuated masonry anchoring tool.

You can also bore holes through the bottom plate and in the concrete floor (using a masonry drill bit), then insert anchors and use lag bolts or long screws.

Although the bottom plate must be cut wherever there will be a doorway or similar opening, it is best not to cut this out until after the bottom plate is down in place on the floor. It is much easier to install one long piece acccurately and cut out what is needed in the doorway afterward than to try to put down two shorter pieces and keep them in perfect alignment.

The vertical 2-by-4 studs are cut and installed next. Cut each one for a snug fit between the top of the bottom plate and the underside of the top plate by measuring and cutting each one separately, because you will find minor variations in length will be required to compensate for irregularities in the floor or in the overhead beams against which the top plate is fastened.

Each stud should fit snugly enough to require tapping into place. It is then secured by driving nails in at an angle, top and bottom.

To keep the stud from slipping sideways when you start to nail it, you can brace your foot against the back side (at the bottom) or drive a large spike partway into the top or bottom plate just behind the stud. When the stud is secured, the large spike can be pulled out and used again for the next one.

A better method to prevent slipping is to cut a short piece of 2-by-4 that will also act as a spacer between studs. The stud being installed is pushed against it and kept from slipping because the other end of the spacer is against the previously nailed stud.

As mentioned previously, studs are spaced 16 inches apart after the first one is installed, but of course the last stud may have to be spaced more closely since you are not likely to wind up with just 16 inches for the last one. Also, the spacing may vary where you have to frame out for a doorway or other opening -- unless you deliberately position the doorway where it will work out even, or you start spacing studs from the door opening.