Cognitive networks (CNs) are capable of enabling dynamic spectrum allocation, and thus constitute a promising technology for future wireless communication. Whereas, the implementation of CN will lead to the requirement of an increased energy-arrival rate, which is a significant parameter in energy harvesting design of a cognitive user (CU) device. A well-designed spectrum-sensing scheme will lower the energy-arrival rate that is required and enable CNs to self-sustain, which will also help alleviate global warming. In this paper, spectrum sensing in a multi-user cognitive ad hoc network with a wide-band spectrum is considered. Based on the prospective spectrum sensing, we classify CN operation into two modes: Distributed and centralized. In a distributed network, each CU conducts spectrum sensing for its own data transmission, while in a centralized network, there is only one cognitive cluster header which performs spectrum sensing and broadcasts its sensing results to other CUs. Thus, a wide-band spectrum that is divided into multiple subchannels can be sensed simultaneously in a distributed manner or sequentially in a centralized manner. We consider the energy consumption for spectrum sensing only of an analog-to-digital convertor (ADC). By formulating energy consumption for spectrum sensing in terms of the subchannel sampling rate and whole-band sensing time, the sampling rate and whole-band sensing time that are optimal for minimizing the total energy consumption within sensing reliability constraints are obtained. A power dissipation model of an ADC, which plays an important role in formulating the energy efficiency problem, is presented. Using AD9051 as an ADC example, our numerical results show that the optimal sensing parameters will achieve a reduction in the energy-arrival rate of up to 97.7% and 50% in a distributed and a centralized network, respectively, when comparing the optimal and worst-case energy consumption for given system settings.