#### Introduction

To understand what is a half and full adder we need to know what is an adder first.

This type of adder is a little more difficult to implement than a half-adder. The main difference between a half-adder and a full-adder is that the full-adder has three inputs and two outputs. The first two inputs are A and B and the third input is an input carry designated as CIN. When a full adder logic is designed we will be able to string eight of them together to create a byte-wide adder and cascade the carry bit from one adder to the next.

Thus, we can implement a full adder circuit with the help of two half adder circuits. The first will half adder will be used to add A and B to produce a partial Sum. The second half adder logic can be used to add CIN to the Sum produced by the first half adder to get the final S output. If any of the half adder logic produces a carry, there will be an output carry. Thus, COUT will be an OR function of the half-adder Carry outputs. Take a look at the implementation of the full adder circuit shown below.

First a subsystem is built which implements half adder circuit. This implementation of subsystem along with its symbol named Half Adder is shown in the figure:

XOR and AND gates can be implemented using logical operator block located at:

Now Half Adder circuit can be implemented using constant blocks as input and display blocks to observe the output, as shown below:

Here A and B denote the inputs given, S stands for sum and C stands for Carry.

Similarly as Half Adder, Full Adder subsystem can also be built and implemented. The subsystem along with Symbol named Full Adder is shown below:

Where A, B and Cin are the inputs to Full adder, S stands for sum and Cout stands for carry generated at the output.

If an n-bit Full Adder is to be implemented, n blocks of Full adder can be connected consecutively. For example implementation of 4 bit Full Adder is shown in figure.

Thus Half and Full Adder circuits can be implemented in Simulink. Note that values in the constant blocks should be Boolean type only.

##### Anushi Maheshwari

Anushi is pursuing graduation degree in Electronics & Communication from HBTI, Kanpur (Now HBTU). She has a keen interest towards Competitive Programming & loves to solve coding Challenges.

### Recommended Posts

##### Test Post

17 Feb 2018 - Tutorial

##### Counters using conditionally executed subsystems | Simulink Tutorial

16 Feb 2018 - Simulink, Tutorial

##### Regulating drum boiler pressure

16 Feb 2018 - Simulink, Tutorial