From bcb06dae6a7900361eaeabd4404ccb5f4c217252 Mon Sep 17 00:00:00 2001 From: Erick Date: Mon, 28 Feb 2022 23:56:05 +0100 Subject: [PATCH] Create mux.v (multiplexer gate) --- gates/mux.v | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gates/mux.v diff --git a/gates/mux.v b/gates/mux.v new file mode 100644 index 0000000..9d74ce5 --- /dev/null +++ b/gates/mux.v @@ -0,0 +1,10 @@ +module mux(y, a, b, sel); + input a, b, sel; + inout y; + wire notSel, andA, andB; + + not(notSel, sel); + and(andA, a, sel); + and(andB, b, notSel); + or(y, andA, andB); +endmodule \ No newline at end of file