Professional Documents
Culture Documents
Arithmetic Circuits-1
Table of Contents
1.2 Introduction
Modern day calculators and computers can perform arithmetic task with superfast speed
and accuracy. It is interesting to first understand how this simple arithmetic is done
manually. Then the chapter will help you to design simple combinational circuits. A
combinational circuit consists of logic gates whose outputs at any time are determined from
the present combination of inputs. Basic adder and subtractor circuits are examples of
combinational logic circuits. This chapter begins with binary addition and subtraction and
further simple logic circuits for binary addition and subtraction are designed.
Interesting Facts
Arithmetic or arithmetics (from the Greek word arithmos "number") is the oldest and most
elementary branch ofmathematics. It consists in the study of numbers, especially the
properties of the traditional operations between them – addition, subtraction, multiplication
and division. Arithmetic is an elementary part of number theory, and number theory is
considered to be one of the top-level divisions of modern mathematics, along
with algebra, geometry, and analysis.
Source: http://en.wikipedia.org/wiki/Arithmetic
Binary arithmetic plays a pivotal role in many digital systems. After completing this section
you should be able to
Trivia:
Carry: A bit which results from the sum of two binary numbers, which can have the
value of0 or 1
Addition and subtraction were taught in elementary school in decimal number system. This
section deals with the simple task of adding numbers in binary which is easier as binary
number system have just two numbers 0 and 1. The four basic rules for adding binary digits
are as follows:
Notice that first three rules result in a single bit and in the fourth rule the addition of two 1s
yields a binary two (10). The abovementioned four rules are very easy to understand and
revise but binary addition becomes little difficult when needed to add three bits. Taking an
example of 1 + 1 + 1. In decimal the answer should be 1 + 1 + 1 = 3. i.e. in binary it
should be 11. Lets apply the above-mentioned rules to procure this answer.
1 1 10
+1 +1 +1(Third number)
+1 10 11
? as mentioned
above
such a situation of adding three bits simultaneously arise when there is a carry in any column
except in LSB. A short form of addition table is given below:
1
0 1 0 1 1
+0 +0 +1 +1 +1
00 01 01 10 11
CS CS CS CS CS
Example 1:
Solution: 1011
+1100
10111
Carry
Example 2:
(1)(1) (1)
Solution: 0101
+1111
10100
Carry
Trivia:
Borrow: A bit brought back from a more significant position when the subtracted
digit is larger than minuend digit.
The binary subtraction is performed in a manner similar to that in decimal subtraction. The
rules for binary subtraction are
0 1 1 0
- 0 - 1 - 0 - 1
0 0 1 1
with a borrow
of 1
Example 3:
Solution:
Subtract LSB to get
1 1 0 1
-1 0 1 1
0
To subtract the bits of the second column borrow from the next higher column to
obtain:
Borrow 1
1 0 0 1
- 1 0 1 1
0
Borrow 1
1 0 0 1
- 1 0 1 1
1 0
Borrow 1
1 0 0 1
- 1 0 1 1
00 1 0
Subtraction using the above rules are easier when in Minuend (M) – Subtrahend (S) =
Difference (D), M > S but the subtraction becomes difficult when M < S. To solve such
problems one must learn subtraction using 2’s compliment method. The following section
1.4 will help students to solve subtraction problems using 2’s compliment method.
Interesting Facts
Interesting story about the origin of ‘+’ and ‘-’ signs in arithmetic
The plus and minus signs (+ and −) are mathematical symbols used to represent the
notions of positive and negative as well as the operations of addition and subtraction. Their
use has been extended to many other meanings, more or less analogous.
Plus and minus are Latin terms meaning "more" and "less", respectively.
Though the signs now seem as familiar as the alphabet or the Hindu-Arabic numerals, they
are not of great antiquity. TheEgyptian hieroglyphic sign for addition, for example,
resembled a pair of legs walking in the direction in which the text was written
(Egyptian could be written either from right to left or left to right), with the reverse sign
indicating subtraction.
In Europe in the early 15th century the letters "P" and "M" were generally used. The
symbols (P with line p for più, i.e., plus, and M with line m for meno, i.e., minus) appeared
for the first time in Luca Pacioli’s mathematics compendium, Summa de arithmetica,
geometria, proportioni et proportionalità, first printed and published in Venice in
1494. The + isa simplification of the Latin "et". The − may be derived from a tilde written
over m when used to indicate subtraction; or it may come from a shorthand version of the
letter m itself. In his 1489 treatise Johannes Widmann referred to the symbols − and +
as minus and mer (Modern German mehr; "more"): "was − ist, das ist minus, und das + ist
das mer"
A Jewish tradition that dates from at least the 19th century is to write plus using a symbol
like an inverted T. This practice was adopted intoIsraeli schools (this practice goes back to
at least the 1940s) and is still commonplace today in elementary
schools (including secularschools) but in fewer secondary schools. It is also used
occasionally in books by religious authors, but most books for adults use the international
symbol "+". The usual explanation for this practice is that it avoids the writing of a symbol
"+" that looks like a Christian cross
https://en.wikipedia.org/wiki/Plus_and_minus_signs
Digital systems handle both positive and negative numbers. A signed binary number consist
of both sign and magnitude information.
Trivia:
Sign bit: The left most bit in a signed binary number indicates whether the number is
positive or negative. A 0 is for positive and a 1 is for negative.
Complement representation: A form of signed binary notation in which negative numbers are
represented by complementing positive number.
The signed binary numbers are represented by using the following representation
Of these 2’s complement representation is the most important and the signed magnitude is
rarely used.
In sign magnitude form, the left most bit is the sign bit and the remaining bits are
magnitude bits. For example decimal number +26 is expressed as an 8 bit signed binary
number using sign magnitude form
000111010
100111010
If the left most bit is 1 then the number is negative and if the left most bit is 0 then the
number is positive.
Positive numbers in 1’s complement form are represented the same way as the positive sign
magnitude numbers. Negative numbers; however are 1’s complement of the corresponding
positive number. For example decimal number -26 is expressed as the 1’s complement of
+26 (00011010) as 11100101
Positive numbers in 2’s complement form are represented the same way as the sign
magnitude and 1’s complement form. Negative numbers are the 2’s compliment of the
corresponding positive number. In 2’s complement notation, a negative number is obtained
by adding 1 to the 1’s complement form of the number.
so if there is a number +X and we use 2’s complement operation then the number becomes
–X and vice-versa
Example 4:
Solution:
Binary form of 57 = 00111001
1’s complement of 57 = 11000110
+ 1
2’s complement of 57 = 11000111 -57
2’s complement form for representing signed numbers is most widely used in computers
and microprocessors based systems. Subtraction using 2’s complement method is much
easier and normally error free and works with no constraints (such as M>S in normal case).
Subtraction is a special case of addition. For example, subtracting +3 (the subtrahend) from
+6 (the minuend) is equivalent to adding (-3) to (+6). Basically the subtraction operation
changes the sign of the subtrahend and adds it to minuend.
We can visualize that subtraction as a special case of addition so it very easy to subtract
any two numbers irrespective of the fact that M>S or M<S. The following cases will make
this picture very clear.
Case 1:
9 9 1001( 9)
( 4 ) +( 4 ) 1100( 4)
5 5 1 0101( 5)
4 4 0100( 4)
( 9 ) +( 9 ) 0111( 9)
5 5 1011( 5)
14 14 00001110(14)
( 108 ) +( 108 ) 01101100(108)
122 122 01111010(122)
43 43 11010101(43)
( 78 ) +( 78 ) 01001110(78)
35 35 1 00100011(35)
Interesting Facts
History of the Binary System
The modern binary number system was invented by Gottfried
Leibniz in 1679 and appears in his article Explication de
l'ArithmétiqueBinaire. The full title is translated into English as the
"Explanation of the binary arithmetic, which uses only the
characters 1 and 0, with some remarks on its usefulness. Leibniz's
system uses 0 and 1, like the modern binary numeral system.
Binary systems predating Leibniz also existed in the ancient
world. The binary system of the I Ching, a text for divination, is
based on the duality of yin and yang.Leibniz interpreted the
hexagrams as evidence of binary calculus. He said that this
arithmetic by 0 and 1 is found to contain the mystery of the lines
of an ancient King and philosopher named Fuxi, who is believed to Gottfried Leibniz
have lived more than 4000 years ago, and whom the Chinese regard
as the founder of their empire and their sciences.
The Binary System of numeration is the simplest of all positional number systems. The base
- or the radix - of the binary system is 2, which means that only two digits - 0 and 1 - may
appear in a binary representation of any number. Computer memory comprises small
elements that may only be in two states - off/on - that are associated with digits 0 and 1.
Such an element is said to represent one bit - binary digit.
The first electronic computer - ENIAC which stood for Electronic Numerical Integrator And
Calculator - was built in 1946 at the University of Pennsylvania, but the invention of the
binary system dates almost 3 centuries back. According to the Oxford Encyclopedic
Dictionary, an entry BINARY ARITHMETIC first appeared in English in 1796 in A
Mathematical and Philosophical Dictionary.
https://en.wikipedia.org/wiki/Binary_number
Choose a number from 1 to 60. You will find it on one or more of the cards. Click on all the
cards with your number on. (Don't click on the number because that would make it too easy
for the computer!) If you make a mistake, click on the card again. Make sure you have
clicked on every card with your number on or it won't work. Then click on the button to
reveal your number. It will tell you the number which you have chosen.
Value Addition
Binary Multiplication
0x0=0
0X1=0
1X0=0
1X1=1
Solution:
1 1 0 1
1 1 0
0 0 0 0
1 1 0 1
1 1 0 1
1 0 0 1 1 1 0
The LSB of the multiplier is a 0. The first partial product is a 0. The next two bits of the
multiplier are 1s. so the next two partial products are equal to the multiplicand itself. The
sum of the partial products gives the answer.
Solution:
1 1 0 1 1
1 0 1
1 1 0 1 1
0 0 0 0
1 1 0 1 1
10 0 0 0 1 1 1
Binary Division
Binary division can be done using paper method, long-division procedures similar to those in
decimal division system. An example will clear binary division.
1.6 Summary
0x0=0
0X1=0
1X0=0
1X1=1
1.7 Exercises
iv) 111101.00001
v) 1001110
Answers:
1) 1
2) 1001, 9
3) Sign, positive, negative
4) 1011
5) 0101
6) 161F
7) 19A
8) 1000001
9) Odometer
1.8 Glossary
Carry The digit generated when the sum of two binary digits exceeds 1.
Carry generation When both the inputs are 1 in full adder an output carry is produced.
Complement The inverse or opposite of a number in Boolean Algebra. This expressed with
a bar over the variable. The complement of 0 is 1 and vice versa.
Sign bit The left most bit of a binary number that designates whether the number is
positive (0) or negative (1).
Digital Principles & Applications, A.P.Malvino, D.P.Leach&Saha, 7th Ed., 2011, Tata
McGraw
Fundamentals of Digital Circuits, A. Anand Kumar, 2nd Edition, 2009, PHI Learning
Pvt. Ltd.
Digital Electronics, Principles and applications, Roger L Tokheim, 2003, Tata McGraw
Hill.
Digital Systems: Principles and Applications, R.J. Tocci, N.S.Widmer, 2001, PHI
Learning.
Digital Electronics, An introduction to theory and practice, W H Gothmann, 1982, PHI
Learning.