The feasibility of an all molecular-beam epitaxially (MBE) grown, bias-switchable, dual-band HgCdTe detector is demonstrated. Detection in the midwavelength infrared (MWIR) band only or the long-wavelength band (LWIR) only is accomplished by the proper selection of detector bias in the greater-than-or-equal-to +/- 100 mV range. The devices were all grown in situ by the MBE on CdZnTe or GaAs substrates and consisted of three intentionally doped layers in an n-p-n sequence. At 77 K the floating base two terminal devices responded to the approximately 4.9-8-mu-m spectral band with the application of greater-than-or-equal-to -100 mV to the bottom contact and to the approximately 2.1-4.9-mu-m band with the application of greater-than-or-equal-to 0 mV. Quantum efficiency depended on bias with a maximum of 59% for LWIR and 66% for MWIR wavelengths at -150 mV and greater-than-or-equal-to 0 mV, respectively. The operation of the dual-band detector is discussed. Significant design differences between the heterojunction phototransistor and the dual-band detector are noted.