Your terms are a little mixed up. There is a FOUNDATION, which is the 4' or 8' perimeter walls and their footings (wider base at bottom) and there is the SLAB, which is used as a floor. The foundation supports the weight of the bearing, exterior walls and the roof, etc..
If you get a 4' foundation, you could dig out everywhere 4' deep and put in a wood joist floor with a crawl space below or, you could do as you propose and only dig out for the walls and pour a slab that is flush (more or less) with the top of the foundation walls that will then act as the floor.
One of the most important things to do is to make sure that you have lots of insulation (at least) directly below the slab. This is usually some sort of rigid foam that the concrete is poured over.