Logic gates are the building blocks of digital computers as they help in making decisions. They are electronic components whose output depends on their input,following the rules of Boolean logic – a form of algebra where values are either TRUE or FALSE. All possible values of input to a logic gate and the corresponding output can be shown in a truth table. In a truth table,the binary value 1 is equal to the logical value TRUE and the binary value 0 is equal to the logical value FALSE.