A Silicon Primitive for Competitive Learning