Started on the road to FPGAs and looking at boolean algrebra. I was doing the full adder example and wanted to confirm my assumption. There answer was used the expression (A ^ B) and mine used (!A ^ !B).
Are these equivalent and therefore negation does not matter for XOR if the same?
Here is my full solution
Please be kind
Thanks,
Are these equivalent and therefore negation does not matter for XOR if the same?
Here is my full solution
Code:
module full_adder (
// Inputs
input [2:0] pmod,
// Output
output [1:0] led
);
wire A;
wire B;
wire C;
// Set A, B, and C to buttons and off
assign A = ~pmod[0];
assign B = ~pmod[1];
assign C = ~pmod[2];
// Taken from above working
// led[0] C (A̅ ⊕ B̅) + AB
// led[1] C ⊕ A ⊕ B
// Cout
assign led[0] = (C & (!A ^ !B) ) | (A & B);
// S
assign led[1] = C ^ A ^ B;
endmodule
Thanks,