A flat universe dominated by cold dark matter (CDM) is an attractive arena for the formation of galaxies and large scale structure. Current upper limits on anisotropies of the cosmic microwave background and the standard theory of primordial nucleosynthesis are both compatible with such a universe. Furthermore a flat CDM model in which galaxy formation is biased towards high density regions provides a good match to the observed distribution of galaxies on Megaparsec scales. In collaboration with M. Davis, G. Efstathiou and S.D.M. White, we have carried out a high resolution N-body simulation which shows that this model can also account for the abundance and characteristic properties of galactic halos. The initial conditions for this simulation were based on the results of our previous work which gave both the scaling and overall normalisation of the initial CDM fluctuation spectrum appropriate to the biased galaxy formation model. We simulated a cubic region of present size 14 Mpc (H0 = 50km/s/Mpc) from a redshift of 6 to the present day, with a resolution of 2kpc initially and 14 kpc at the end. We found that by a redshift of 2.5 about 20 clumps with circular speeds exceeding 100 km/s had collapsed near high peaks of the initial linear density field. Between Z = 2.5 and the present most of them remained isolated and accreted extensive outer halos, while others merged into larger systems. The rotation curves of the final smooth systems were impressively flat at large radii resembling the measured rotation curves of spiral galaxies. Furthermore, the abundance of clumps with circular velocities larger than 150 km/s was about the same as the abundance of galaxies brighter than M33 expected in a volume the size of our simulation. Significant transfer of angular momentum to surrounding material occurred as large subclumps merged. Most of this angular momentum was originally invested in the orbital motions of the subclumps. As a result, the central regions of merged objects showed little rotation.