cs147dv/half_adder.v
Iurii Tatishchev 42732e4fe0
lab-02: gate level model for ripple carry adder subtractor
Gate level implementation for the following components:
- FULL_ADDER
- HALF_ADDER
- RC_ADD_SUB_32
2024-10-03 21:30:09 -07:00

29 lines
633 B
Verilog

// Name: half_adder.v
// Module: HALF_ADDER
//
// Output: Y : Sum
// C : Carry
//
// Input: A : Bit 1
// B : Bit 2
//
// Notes: 1-bit half adder implementaiton.
//
//
// Revision History:
//
// Version Date Who email note
//------------------------------------------------------------------------------------------
// 1.0 Sep 10, 2014 Kaushik Patra kpatra@sjsu.edu Initial creation
//------------------------------------------------------------------------------------------
`include "prj_definition.v"
module HALF_ADDER(Y,C,A,B);
output Y,C;
input A,B;
xor digit(Y, A, B);
and carry(C, A, B);
endmodule