verilog/tangTest/halfsubtraction.v
2025-01-20 15:16:37 +03:00

13 lines
171 B
Verilog

module halfsubtraction (
input A, B,
output Difference, Borrow
);
wire notA;
xor xo1 (Difference, A, B);
not a1 (notA, A);
and an1 (Borrow, notA, B);
endmodule