The invention provides, inter alia, recombinase-based systems that provide for integrated logic and memory in living cells such as mammalian cells. The nucleic acid cassettes, switches, and systems described herein allow for control of gene expression or gene regulation. The invention also provides nucleic acid-based switches for adopted T-cell therapy.