HALF ADDER - FULL ADDER - MUX
![Resim](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsymT8NkkdHffZqdGaLgRgJro_7uFRzy2rvKwTAUkC08lgomAZ6SHp2-NBabP5SfSRwJHS7bBL_F4sPjLT2bTlnvfarcr9efMdbTpLwwgTXoIfqL26Km1JctB3RIcXC5udRBtU9y4704UI/s1600/Half-Addder.jpg)
Truth Tables and Verilog Codes for one-bit Half Adder and Full Adder HALF ADDER By using half adder, you can design simple addition with the help of logic gates. Half Adder 0+0 = 0 0+1 = 1 1+0 = 1 1+1 = 10 These are the least possible single-bit combinations. But the result for 1+1 is 10, the sum result must be re-written as a 2-bit output. Thus, the equations can be written as 0+0 = 00 0+1 = 01 1+0 = 01 1+1 = 10 The output ‘1’of ‘10’ is carry-out. ‘SUM’ is the normal output and ‘CARRY’ is the carry-out. Half Adder Logic Circuit HALF ADDER TRUTH TABLE : S= A’B+AB’ C=AB If we want to write Verilog modules and testbench codes including every possible outcome, for Half Adder and Full Adder: HALF ADDER CODE: module halfandfull(A,B,C,S); input A,B; output C,S; assign C = A^B; assign S = A&B; endmodule HALF ADDER TEST BENCH CODE: module halffulltb; reg A;