0 Up votes0 Down votes

63 views8 pagesbinary subtractor

Jul 03, 2016

© © All Rights Reserved

DOCX, PDF, TXT or read online from Scribd

binary subtractor

© All Rights Reserved

63 views

binary subtractor

© All Rights Reserved

- mathematics unit planner decimals and fractions
- A Detailed Lesson Plan
- PU11 Computer Science Notes – Data Representation
- ued 496 vb lewis mike integration of technology and media resources
- Topic 1- Whole Numbers
- lp change number stories gr 3
- Digital Logic and Design 02
- HW3sol
- Y5TOPIC1-WHOLENUMBERS.pdf
- lp change number stories gr 3
- lesson2janine mynotes
- DIGITAL LOGIC DESIGN (R17A0461).pdf
- mathematics unit planner decimals and fractions
- Week 0 - Lectures
- Add Subt Polynomials Final TG
- math year plan
- Maths Planner - Money
- add subt rational final LG.pdf
- tech lesson plan format
- math word wall cards2

You are on page 1of 8

The Binary Subtractor is another type of combinational arithmetic circuit that is the opposite of

the Binary Adder we looked at in a previous tutorial. As their name implies, a Binary

Subtractor is a decision making circuit that subtracts two binary numbers from each other, for

example, X Y to find the resulting difference between the two numbers.

Unlike the Binary Adder which produces a SUM and a CARRY bit when two binary numbers

are added together, the binary subtractor produces a DIFFERENCE, D by using a BORROW

bit, B from the previous column. Then obviously, the operation of subtraction is the opposite to

that of addition.

We learnt from our maths lessons at school that the minus sign, is used for a subtraction

calculation, and when one number is subtracted from another, a borrow is required if the

subtrahend is greater than the minuend. Consider the simple subtraction of the two denary (base

10) numbers below.

123

78

45

We can not directly subtract 8 from 3 in the first column as 8 is greater than 3, so we have to

borrow a 10, the base number, from the next column and add it to the minuend to produce 13

minus 8. This borrowed 10 is then return back to the subtrahend of the next column once the

difference is found. Simple school maths, borrow a 10 if needed, find the difference and return

the borrow.

The subtraction of one binary number from another is exactly the same idea as that for

subtracting two decimal numbers but as the binary number system is a Base-2 numbering system

which uses 0 and 1 as its two independent digits, large binary numbers which are to be

subtracted from each other are therefore represented in terms of 0s and 1s.

Binary Subtraction

Binary Subtraction can take many forms but the rules for subtraction are the same whichever

process you use. As binary notation only has two digits, subtracting a 0 from a 0 or a 1

leaves the result unchanged as 0-0 = 0 and 1-0 = 1. Subtracting a 1 from a 1 results in a 0,

but subtracting a 1 from a 0 requires a borrow. In other words 0 1 requires a borrow.

0

For the simple 1-bit subtraction problem above, if the borrow bit is ignored the result of their

binary subtraction resembles that of an Exclusive-OR Gate. To prevent any confusion in this

tutorial between a binary subtractor input labelled, B and the resulting borrow bit output from the

binary subtractor also being labelled, B, we will label the two input bits as X for the minuend

and Y for the subtrahend. Then the resulting truth table is the difference between the two input

bits of a single binary subtractor is given as:

Symbol

As with the Binary Adder, the difference between the two digits is only a 1 when these two

inputs are not equal as given by the Ex-OR expression. However, we need an additional output to

produce the borrow bit when input A = 0 and B = 1. Unfortunately there are no standard logic

gates that will produce an output for this particular combination of X and Y inputs.

But we know that an AND Gate produces an output 1 when both of its inputs X and Yare 1

(HIGH) so if we use an inverter or NOT Gate to complement the input X before it is fed to

the AND gate, we can produce the required borrow output when X = 0 and Y = 1 as shown below.

Then by combining the Exclusive-OR gate with the NOT-AND combination results in a simple

digital binary subtractor circuit known commonly as the Half Subtractor as shown.

A half subtractor is a logical circuit that performs a subtraction operation on two binary digits.

The half subtractor produces a sum and a borrow bit for the next stage.

From the truth table of the half subtractor we can see that the DIFFERENCE (D) output is the

result of the Exclusive-OR gate and the Borrow-out (Bout) is the result of the NOTAND combination. Then the Boolean expression for a half subtractor is as follows.

D = X XOR Y = X

B = not-X AND Y = X.Y

If we compare the Boolean expressions of the half subtractor with a half adder, we can see that

the two expressions for the SUM (adder) and DIFFERENCE (subtractor) are exactly the same

and so they should be because of the Exclusive-OR gate function. The two Boolean expressions

for the binary subtractor BORROW is also very similar to that for the adders CARRY. Then all

that is needed to convert a half adder to a half subtractor is the inversion of the minuend input X.

One major disadvantage of the Half Subtractor circuit when used as a binary subtractor, is that

there is no provision for a Borrow-in from the previous circuit when subtracting multiple data

bits from each other. Then we need to produce what is called a full binary subtractor circuit to

take into account this borrow-in input from a previous circuit.

The main difference between the Full Subtractor and the previous Half Subtractorcircuit is

that a full subtractor has three inputs. The two single bit data inputs X(minuend)

and Y (subtrahend) the same as before plus an additional Borrow-in (B-in) input to receive the

borrow generated by the subtraction process from a previous stage as shown below.

Then the combinational circuit of a full subtractor performs the operation of subtraction on

three binary bits producing outputs for the difference D and borrow B-out. Just like the binary

adder circuit, the full subtractor can also be thought of as two half subtractors connected

together, with the first half subtractor passing its borrow to the second half subtractor as follows.

As the full subtractor circuit above represents two half subtractors cascaded together, the truth

table for the full subtractor will have eight different input combinations as there are three input

variables, the data bits and the Borrow-in, B input. Also includes the difference output, D and

IN

the Borrow-out, B

OUT

bit.

Symbol

For the DIFFERENCE (D) bit:

D = (X.Y.BIN) + (X.Y.B ) + (X.Y.B ) + (X.Y.BIN)

IN

IN

D = (X XOR Y) XOR BIN = (X

Y)

BIN

OUT

IN

BOUT = X AND Y OR (X XOR Y)BIN = X.Y + (X

Y)BIN

As with the binary adder, we can also have n number of 1-bit full binary subtractor connected or

cascaded together to subtract two parallel n-bit numbers from each other. For example two 4bit binary numbers. We said before that the only difference between a full adder and a full

subtractor was the inversion of one of the inputs.

So by using an n-bit adder and n number of inverters (NOT Gates), the process of subtraction

becomes an addition as we can use twos complement notation on all the bits in the subtrahend

and setting the carry input of the least significant bit to a logic 1 (HIGH).

Then we can use a 4-bit full-adder ICs such as the 74LS283 and CD4008 to perform subtraction

simply by using twos complement on the subtrahend, B inputs as X Y is the same as

saying, X + (-Y) which equals X plus the twos complement of Y.

If we wanted to use the 4-bit adder for addition once again, all we would need to do is set the

carry-in (C ) input LOW at logic 0. Because we can use the 4-bit adder IC such as the 74LS83

IN

circuit with a single control input for selecting between the two operations.

- mathematics unit planner decimals and fractionsUploaded byapi-284319044
- A Detailed Lesson PlanUploaded byReynaldo Quines Bohol
- PU11 Computer Science Notes – Data RepresentationUploaded bygautham28
- ued 496 vb lewis mike integration of technology and media resourcesUploaded byapi-296218979
- Topic 1- Whole NumbersUploaded bynazri
- lp change number stories gr 3Uploaded byapi-303788768
- Digital Logic and Design 02Uploaded bybhargavi
- HW3solUploaded bylennyrodolfo
- Y5TOPIC1-WHOLENUMBERS.pdfUploaded bySangara Nanda
- lp change number stories gr 3Uploaded byapi-303788768
- lesson2janine mynotesUploaded byapi-272944457
- DIGITAL LOGIC DESIGN (R17A0461).pdfUploaded byTanishq Mangal
- mathematics unit planner decimals and fractionsUploaded byapi-284319044
- Week 0 - LecturesUploaded byvaibhav.1991
- Add Subt Polynomials Final TGUploaded byK
- math year planUploaded byapi-251768423
- Maths Planner - MoneyUploaded bykatejoy_wardlaw
- add subt rational final LG.pdfUploaded byRicardo B. Vigan
- tech lesson plan formatUploaded byapi-242670412
- math word wall cards2Uploaded byapi-281188069
- lincoln post assessment chartUploaded byapi-336968102
- 4E107d01Uploaded bybalu2103
- 1-5Uploaded byIjarcet Journal
- CSE396ps1Uploaded byEdwin Velasquez
- Math 12 Test 2Uploaded byQadir Rafique
- vlasi labUploaded byNarayana Reddy Chinthala
- higher derivativesUploaded byMaristelle Altea Mabilangan
- 11Uploaded byDwarakaManeekantaAddagiri
- Exp No1Uploaded byMohammed Dyhia Ali
- ConverterUploaded byTrương Đức Bình

- Conversion of FlipUploaded byJohn Brix Balisteros
- Man Prime CreationUploaded byJohn Brix Balisteros
- Johnson Ring CounterUploaded byJohn Brix Balisteros
- GodUploaded byJohn Brix Balisteros
- PresidentUploaded byJohn Brix Balisteros
- Boolean Algebra ExamplesUploaded byJohn Brix Balisteros
- Class AB AmplifierUploaded byJohn Brix Balisteros
- PNP TransistorUploaded byJohn Brix Balisteros
- The Light Emitting DiodeUploaded byJohn Brix Balisteros
- The Signal DiodeUploaded byJohn Brix Balisteros
- Semiconductor BasicsUploaded byJohn Brix Balisteros
- The Integrator AmplifierUploaded byJohn Brix Balisteros
- Full Wave RectifierUploaded byJohn Brix Balisteros
- The Zener Diode.docxUploaded bycelo81
- Binary AdderUploaded byJohn Brix Balisteros
- Transformer BasicsUploaded byJohn Brix Balisteros
- The AutotransformerUploaded byJohn Brix Balisteros
- Three Phase TransformersUploaded byJohn Brix Balisteros
- The Current TransformerUploaded byJohn Brix Balisteros
- Digital ComparatorUploaded byJohn Brix Balisteros
- The MultiplexerUploaded byJohn Brix Balisteros
- Combinational Logic CircuitsUploaded byJohn Brix Balisteros
- The DemultiplexerUploaded byJohn Brix Balisteros
- Priority EncoderUploaded byJohn Brix Balisteros
- Display DecoderUploaded byJohn Brix Balisteros
- Binary DecoderUploaded byJohn Brix Balisteros

- FinFET_ the Promises and the ChallengesUploaded byprakashrout
- Experiment 10Uploaded byKarina Narciso
- Final Rsa PptUploaded byMounesh Panchal
- Fanuc Cimplicity i Cell OperatorUploaded bysunhuynh
- 2015-16 BE Computer Engineering CGPA.pdfUploaded byAvi Surywanshi
- tutorialUploaded byAl Oy
- Utilization of DataUploaded byBeethovenMark
- Approval Document ASSET DOC LOC 7291675Uploaded bysmg007
- The 4Chan /biz Guide To March-April Greatest Moon MissionsUploaded byDr. Steve Brule
- Experiment No 04 Francis TurbineUploaded byTapas Kumar
- DM500_Mods_LAN_repair.pdfUploaded byreptile105
- Robust Supply ChainUploaded byAditya Aole
- Leaflet PressurisationUploaded byedywahono
- Bridge Construction TechnologyUploaded byYin Ck
- i series Backup.pdfUploaded bysupriyabhandari24
- حلول سكشن 4.3.pdfUploaded bysaleh
- Circuit Cellar[Nonlinear.ir] 027 1992Uploaded byjlcastroa
- Ozgur Cagri 201112 PhdUploaded bypraveen
- Portfolio AnalysisUploaded byShailesh Kediya
- Inspection, Planning of Offshore JacketUploaded bysaulolm
- KmklnUploaded bySam Denielle Tugaoen
- Numerical MRI Simulation Tool MRiLab v1.0a User GuideUploaded byleoliuf
- Flight Plan Template GuideUploaded byMaen Abu Tabanjeh
- Audio Formats Reference - Brian Langenberger.pdfUploaded bytoa4bee7lugh
- PERFORMANCE STUDY ON HYBRID GLASS FIBER EPOXY COMPOSITEUploaded byIJORAT
- manual.pdfUploaded byaltaf_h5
- Java%20J2EE%20interview%20guideUploaded byJay Ballenger
- Advanced Course Lesson PlanUploaded byFahmi Prayogi
- Practical C Charts and Graphics - 9780979372506Uploaded byenikő_ferenc_1
- 4. Manage-effect of Coconut Shell Powder on the Strength of Soil-jumy RajUploaded byBESTJournals

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.