verilog/spartanTest/halfsubtraction.v
2025-01-12 07:23:34 +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