Electron and nuclear spins of diamond nitrogen-vacancy (NV) centers are good candidates for quantum information processing as they have long coherence time and can be initialized and read out optically. However, creating a large number of coherently coupled and individually addressable NV centers for quantum computing has been a big challenge. Here we propose methods to use high-density diamond NV centers coupled by spin-spin interaction with an average separation on the order of 10 nm for quantum computing. We propose to use a strain gradient to encode the position information of each NV center in the energy level of its excited electron orbital state, which causes a shift of its optical transition frequency. With such strain encoding, more than 100 closely-packed NV centers below optical diffraction limit can be read out individually by resonant optical excitation. A magnetic gradient will be used to shift the electron spin resonant (ESR) frequencies of NV centers. Therefore, the spin state of each NV center can be individually manipulated and different NV centers can be selectively coupled. A universal set of quantum operations for two-qubit and three-qubit system is introduced by careful design of external drives. Moreover, entangled states with multiple qubits can be created by this protocol, which is a major step towards quantum information processing with solid-state spins.