Skip to content
Digital logic (gates / K-map / truth table) templates

Logic — half adder

Two-input half adder with XOR (sum) and AND (carry).

Template previewDigital logic (gates / K-map / truth table)
Half adderABG1G2SCEvaluated: 2 inputs, 2 outputs, 4 rows.S = A ⊕ BC = A · B

Make it your own.

title "Half adder"
type gates
input A at (0,0)
input B at (0,2)
gate XOR G1 at (3,0.5)
gate AND G2 at (3,2.5)
output S at (6,0.5)
output C at (6,2.5)
wire A G1
wire B G1
wire A G2
wire B G2
wire G1 S
wire G2 C