Skip to content

Commit f9243e1

Browse files
authored
Create q.v
1 parent d7f2826 commit f9243e1

File tree

1 file changed

+20
-0
lines changed
  • LAB VI: DESIGN OF MAGNITUDE COMPARATOR, DECODER AND MULTIPLEXER CIRCUIT USING HDL/Q3

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Q3. Design a combinational circuit for a full adder using 3 to 8 line decoder and external OR gates.
2+
3+
4+
// design.sv
5+
6+
// Data-Flow
7+
module circuit3(x, y, z, D0, D1, D2, D3, D4, D5, D6, D7, S, C);
8+
input x, y, z;
9+
output D0, D1, D2, D3, D4, D5, D6, D7, S, C;
10+
assign D0 = (!(x)) && (!(y)) && (!(z));
11+
assign D1 = (!(x)) && (!(y)) && (z);
12+
assign D2 = (!(x)) && (y) && (!(z));
13+
assign D3 = (!(x)) && (y) && (z);
14+
assign D4 = (x) && (!(y)) && (!(z));
15+
assign D5 = (x) && (!(y)) && (z);
16+
assign D6 = (x) && (y) && (!(z));
17+
assign D7 = (x) && (y) && (z);
18+
assign S = D1 || D2 || D4 || D7;
19+
assign C = D3 || D5 || D6 || D7;
20+
endmodule

0 commit comments

Comments
 (0)