This paper presents a study of a cross-layer design through joint optimization of spectrum allocation and power control for cognitive radio networks (CRNs). The spectrum of interest is divided into independent channels licensed to a set of primary users (PUs). The secondary users are activated only if the transmissions do not cause excessive interference to PUs. In particular, this paper studies the downlink channel assignment and power control in a CRN with the coexistence of PUs and secondary users. The objective was to maximize the total throughput of a CRN. A mathematical model is presented and subsequently formulated as a binary integer programming problem, which belongs to the class of non-deterministic polynomial-time hard problems. Subsequently, we develop a distributed algorithm to obtain sub-optimal results with lower computational complexity. The distributed algorithm iteratively improves the network throughput, which consists of several modules including maximum power calculation, excluded channel sets recording, base station throughput estimation, base station sorting, and channel usage implementation. Through investigating the impacts of the different parameters, simulation results demonstrates that the distributed algorithm can achieve a better performance than two other schemes. Copyright (c) 2011 John Wiley & Sons, Ltd.