Logic gates perform a specific logical function, dictating how binary inputs are processed to produce a binary output.