Abstract: One way to test our knowledge about the brain is to try to reproduce its behavior in a computer. Traditionally, simulated brain models cover small circuits in detail or wider regions with little detail. The availability of high-performance computers has made it possible to simulate large portions of the brain resolving individual neurons and synapses. We develop multi-area models of the cerebral cortex with millions of neurons connected via tens of billions of synapses and study the emerging resting-state activity. First, connectivity matrices for macaque and human cortices are constructed based on extensive anatomical data. Then, we investigate under what conditions the models reproduce statistical aspects of spiking activity and patterns of inter-area interactions. Models of local cortical circuits and models considering clustering of excitatory and inhibitory neurons provide further insights into the determinants of cortical dynamics.