*(i) Design of half-subtractor*

A half subtractor is a combination logic circuit that uses two inputs (A and B) and two outputs (Difference D and Borrow B). **Table 3** shows the truth table the various combinations of inputs and its corresponding outputs. The output Difference D and Borrow B is obtained and the k-map is used to get the logical equation. **Figure 4** shows the design and implementation of half subtractor circuit in LabVIEW environment, where the front panel that two inputs Input A and Input B, the outputs are Difference and Borrow

$$Difference = A \oplus B\tag{5}$$

$$
bar{w} = \overline{A}B\tag{6}$$

*(ii) Design of Full-subtractor*

A full subtractor is a combination logic circuit that uses three inputs (A, B and Bin) and two outputs (Difference D and Borrow B). **Table 4** shows the truth table the various combinations of inputs and its corresponding outputs. The output difference D and Borrow B is obtained and the k-map is used to get the logical equation

$$\text{Difference } D = A \oplus B \oplus B\_{\text{in}} \tag{7}$$

$$Borrow\ B = \overline{A}B + A \oplus B\tag{8}$$


**Table 3.** *Truth Table – Half Subtractor.*

**Figure 4.** *Logic Diagram – Half Subtractor.*

*Carry C* ¼ *AB* þ *BCin* þ *CinA* (4)

**Figure 3** shows the design and implementation of full adder circuit in LabVIEW environment, where the front panel that two inputs Input A, Input B, and Input Cin, the outputs are Sum and Carry. The block diagram in LabVIEW environment shows

*Input Variables Output Variables*

*LabVIEW - A Flexible Environment for Modeling and Daily Laboratory Use*

**A B** *C*in **Sum S Carry C** 0 00 0 0 0 01 1 0 0 10 1 0 0 11 0 1 1 00 1 0 1 01 0 1 1 10 0 1 1 11 1 1

the logic gate implementation for the above obtained expression.

**Figure 2.**

**Table 2.**

**Figure 3.**

**160**

*Logic Diagram – Full Adder.*

*Truth Table – Full Adder.*

*Logic Diagram – Half Adder.*

