A logic gate is a physical device that performs a logical operation on one or more logical inputs and produces only one logical output.
The input is the signal or data that fed into a logic gate whereas the output is the result of processing the inputs by using the operation of the logic gate.
The input and output can be either high (denoted by 1) or low (denoted by 0).
Gates are identified by their function. The 5 basic logic gates that you need to know under SPM syllabus are
the AND gate
the OR gate
the NOT gate
the NAND gate
the NOR gate
Logic gates primarily work using diodes and transistors as switches.