A logic circuit having first, second, third, and fourth data input ports, first, second, third, and fourth select signal input ports, first and second gate input ports, first and second gate-selecting ports, a reference signal input port, and an output port, wherein:
- either of data items input through said first and second data input ports is selected based on first and second select signals of opposite polarities input through said first and second select signal input ports;
- either of data items input through said third and fourth data input ports is selected based on third and fourth select signals of opposite polarities input through said third and fourth select signal input ports;
- either of gate input data items input through said first and second gate input ports is selected based on first and second gate select signals of opposite polarities input through said first and second gate-selecting ports;
- either of data selected based on said first and second select signals and data selected based on said third and fourth select signals is selected based on gate input data selected based on said first and second gate select signals, and output through said output port synchronously with a reference signal input through said reference signal input port,
- said logic circuit comprising:
- a circuit for selecting either of data items input through said first and second data input ports that consists of:
- a first inverter having an output terminal thereof connected to a first transmission gate;
- a first NOR circuit having said first select signal input port connected to one input terminal thereof and having said reference signal applied to the other input terminal thereof;
- a second NOR circuit having said second select signal input port connected to one input terminal thereof and having said reference signal applied to the other input terminal thereof;
- a second transmission gate connected between said first data input port and the input terminal of said first inverter, and controlled based on an output of said first NOR circuit;
- and a third transmission gate connected between said second data input port and the input terminal of said first inverter, and controlled based on an output of said second NOR circuit;
- a circuit for selecting either of data items input through said third and fourth data input port that consists of:
- a second inverter having an output terminal thereof connected to a fourth transmission gate;
- a third NOR circuit having said third select signal input port connected to one input terminal thereof and having said reference signal applied to the other input terminal thereof;
- a fourth NOR circuit having said fourth select signal input port connected to one input terminal thereof, and having said reference signal applied to the other terminal thereof;
- a fifth transmission gate connected between said third data input port and the input terminal of said second inverter, and controlled based on an output of said third NOR circuit;
- and a sixth transmission gate connected between said fourth data input port and the input terminal of said second inverter, and controlled based on an output of said fourth NOR circuit;
- a circuit for selecting either of gate input data items input through said first and second data input ports that consists of:
- a third inverter;
- a fifth NOR circuit having said first gate-selecting port connected to one input terminal thereof and having said reference signal applied to the other input terminal thereof;
- a sixth NOR circuit having said second gate-selecting port connected to one input terminal thereof and having said reference signal applied to the other input terminal thereof;
- a seventh transmission gate connected between said first gate input port and the input terminal of said third inverter and controlled based on an output of said fifth NOR circuit;
- and an eighth transmission gate connected between said second gate input port and the input terminal of said third inverter and controlled based on an output of said sixth NOR circuit;
- and
- a circuit for selecting either of data selected based on said first and second select signals and data selected based on said third and fourth select signals according to said selected gate input data that consists of:
- a seventh NOR circuit having the output terminal of said seventh transmission gate connected to one input terminal thereof, having said reference signal applied to the other input terminal thereof, and having an output terminal thereof connected to a control gate of said first transmission gate;
- and an eighth NOR circuit having the output terminal of said third inverter connected to one input terminal thereof, having said reference signal applied to the other input terminal thereof, and having an output terminal thereof connected to a control gate of said fourth transmission gate;
- and
- a fourth inverter for outputting data selected based on said selected gate input data through said output port that has an input terminal thereof connected to said first transmission gate and fourth transmission gate and that has an output terminal thereof connected to said output port.