Codes Exp 7
Codes Exp 7
Full Subtractor
Half adder
module half_adder_d (
input a,b,
output sum, carry
);
assign sum = a ^ b;
assign carry = a & b;
Endmodule
Half Subtractor
module half_sub_d (
input a,b,
output sum, carry
);
assign sum = a ^ b;
assign carry = ~a & b;
Endmodule
`timescale 1ns/1ps
module gate(
input wire a, b,
input wire [2:0] select,
output reg led,
input wire clk
);
endmodule
`timescale 1ns/1ps
module seven_seg(
input [3:0] digit,
output reg [6:0] display,
output wire [7:0] an,
output wire dp
);
endmodule