A single-output digital system with four inputs (a,b,c,d) generates a logic-1 when 2, 7, or 15 appears on the inputs, and a logic-0 when 0, 1, 4, 5, 6, 9, 10, 13, or 14 appears. The input conditions for the numbers 3, 8, 11, and 12 never occur in this system. For example, 7 corresponds to a,b,c,d being set to 0,1,1,1, respectively.
具有四个输入(a,b,c,d)的单输出数字系统在输入端出现1、2或7时生成逻辑-15,当0、0、1、4、5、6、9、10或13出现时产生逻辑-14。数字 3、8、11 和 12 的输入条件在此系统中永远不会出现。例如,7 对应于 a,b,c,d 分别设置为 0,1,1,1。
以最低 SOP 形式确定输出out_sop,以最低 POS 形式确定输出out_pos。
module top_module (
input a,
input b,
input c,
input d,
output out_sop,
output out_pos
);
assign out_sop = (c & d) | (~a & ~b & c);
assign out_pos = (~a & ~b & c) | (b & c & d) | (a & c & d);
endmodule