# Combinational circuits

**Half Adders**

A half adder is a combinational circuit that performs the addition of two bits. The truth table for a half adder is shown below.

Input | Input | Output | Output |
---|---|---|---|

X |
Y |
Carry |
Sum |

0 | 0 | 0 | 0 |

0 | 1 | 0 | 1 |

1 | 0 | 0 | 1 |

1 | 1 | 1 | 0 |

The truth table contains two output columns, one for the SUM and one for the CARRY. By comparing the CARRY output with the truth tables in the table, the logic gate AND can be seen to produce the same output. Similarly, the logic gate XOR produces the output desired for the SUM. As a result, the half adder circuits is made by combining the AND and XOR gates.

**Full Adders**

A full adder is a combinational circuit that can be used to add three binary digits. It consists of three inputs (the 3 bits) and two outputs (SUM and CARRY). The figure below shows a truth table for a full adder.

Input | Input | Input | Output | Output |
---|---|---|---|---|

X |
Y |
Z |
Carry |
Sum |

0 | 0 | 0 | 0 | 0 |

0 | 1 | 0 | 0 | 1 |

0 | 1 | 0 | 0 | 1 |

0 | 1 | 1 | 1 | 0 |

1 | 0 | 0 | 0 | 1 |

1 | 0 | 1 | 1 | 0 |

1 | 1 | 0 | 1 | 0 |

1 | 1 | 1 | 1 | 1 |

A full adder can be implemented by combining two half adders.