Microbial consortia form when multiple species colocalize and communally generate a function that none is capable of alone. Consortia abound in nature, and their cooperative metabolic activities influence everything from biodiversity in the global food chain to human weight gain. Here, we present an engineered consortium in which the microbial members communicate with each other and exhibit a "consensus" gene expression response. Two colocalized populations of Escherichia coli converse bidirectionally by exchanging acyl-homoserine lactone signals. The consortium generates the gene-expression response if and only if both populations are present at sufficient cell densities. Because neither population can respond without the other's signal, this consensus function can be considered a logical AND gate in which the inputs are cell populations. The microbial consensus consortium operates in diverse growth modes, including in a biofilm, where it sustains its response for several days.