10-Adder - Subtractor

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Ministry of Higher Education and

Scientific Research
Erbil Polytechnic University
Erbil Technology College
Information and Communication
Technology Engineering Department
(ICTE)

Adder / Subtractor
Second Stage - Third semester
For studying Year / 2023 – 2024
Assistant Lecturer
Ferman I. Kareem
Combinational and Sequential circuits
• Combinational and Sequential circuits are the most used type
of digital circuits in digital electronics.
Example of Combinational (Adder)

• Addition is one of the most basic operations performed by


different electronic devices like computers, calculators, etc. The
electronic circuit that performs the addition of two or more
numbers, more specifically binary numbers, is called as adder.

• Adder : In electronics an adder is digital circuit that perform


addition of numbers.

• Adders are important not only in the computer but also in many
types of digital systems.
• Half adder : The half adder accepts two binary
digits on its inputs and produce two binary digits
outputs, a sum bit and a carry bit.

• Half adder only adds the current inputs as 1-bit


numbers and does not focus on the previous inputs.

Block diagram
Logic circuit for half adder
• The output that one obtains from the EX-OR gate is the
sum of both the one-bit numbers. The output obtained
from the AND gate is called the carry.
• But we cannot forward the carry that you obtain in one
Truth table for half adder addition into another addition. It is because of the
absence of any logic gate to process it. Thus, it’s called
the Half Adder circuit.
• The full-adder circuit adds three one-bit binary numbers
(Cin, A ,B) and outputs two one-bit binary numbers, a
sum (S) and a carry (Cout).

Block diagram
• Just like the Half Adder, the Full Ladder is a
combinational type of logic circuit.

• But it has additional logic gates. Thus, it adds the


previous carry to generate the complete output.
Thus, it is called the Full Adder.

Truth table for full adder


Now we have two boolean expressions for sum and carry
output. With those expressions, the combinational circuit
for full adder is implemented.

Logic circuit for full adder


Half Adder vs. Full Adder

Half Adder Full Adder


Two single-bit binary numbers Three single-bit binary numbers
Two outputs, one carry, and one Two outputs, one carry, and one
sum sum
Two EX-OR gates, two AND gates,
One EX-OR and one AND gate
and one OR gate
Adds two binary digits Adds three binary digits.
Used in the early stages of digital Forms the backbone of more
electronics design complex systems
Simple circuit design Complex circuit design
cannot employ a half adder to add can employ a full adder to add
more than two bits together. three bits together.
(Subtractor)

• In digital electronics, a subtractor is a combinational logic


circuit built with different types of logic gates whose
primary function is to perform the subtraction of two bits.
The Half-Subtractor

• The half-subtractor subtracts two bits and


produces an output as difference and borrow.

• It needs two binary inputs bits, two binary


outputs (difference and borrow).

Block diagram for half subtractor


• The boolean expression for the outputs of
half-subtractor can be determined by
constructing a truth table.

For difference and borrow outputs,


a boolean expression has to be
Truth table for half subtractor
derived using Karnaugh map.
The obtained boolean expression for difference output is
an Ex-OR gate output. The Logic circuit diagram for a
half subtractor circuit is draw from the boolean
expression.

Logic circuit for half subtractor


Full subtractor
• A full subtractor has three binary inputs(subtrahend,
minuend and one borrow bit from the previous
subtraction operation).
• It produces two binary outputs(difference and borrow)
using a combination of logic gates.
• The borrow given to the previous subtraction operation
is denoted as Bin

Block diagram for full subtractor


• In full subtractor, eight possible operations are
possible with three inputs and produces eight, two
digit outputs.
• The operation is shown in the truth table.

For difference and borrow outputs, boolean expression


has to be derived using Karnaugh map.
Truth table for full subtractor
Now we have two boolean expressions for
difference and borrow output. With those
expressions, the combinational circuit for full
subtractor is implemented.

Logic circuit for full subtractor


Thank you

You might also like