Arithmetic Building Blocks

Half adder

Half adder can add 2 one bit numbers and produces sum and carry.

According to the truth table, if inputs A and B are equal, the output carry is 1 and if they are not, the total output is 1. As a result, the AND gate produces Co, and the X-OR gate produces ∑.

Half Subtractor

Full adder

The full adder accepts two input bits and an input carry altogether has three inputs and generates two outputs one sum output and another a carry output.

A controlled inverter is depicted in Figure a. INVERT sends the 8 bit input to the output when it is low. The 1's complement is transmitted when INVERT is high. As an illustration, if the input is

The control inverter is important because it is a step in the right direction. During subtraction, we first need to take 2's complement of the subtrahend. Then we can add the complemented subtrahend to obtain an answer with a controlled inverter, we can produce the 1's complement. Then there is an easy way to get 2's complement.

This note is derived from MSC physics, Nepal.

This note is a part of the Physics Repository.