Академический Документы
Профессиональный Документы
Культура Документы
1
Institute of Lifelong Learning, University of Delhi
Arithmetic Circuits-1
Table of Contents
Chapter 1 Binary Arithmetic
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
Chapters Objective
Introduction
Binary Arithmetic
1.3.1 Binary Addition
1.3.2 Binary Subtraction
Representation of signed binary numbers
2s Complement Method
Summary
Exercises
1.7.1 Subjective Questions
1.7.2 Fill in the Blanks
Glossary
References
2
Institute of Lifelong Learning, University of Delhi
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 of mathematics. 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.
Term arithmetic and higher arithmetic were
used until the beginning of 20th century as
synonyms for number theory and are,
sometimes, still used to refer to a wider
part of number theory. The basic arithmetic
operations
are
addition,
subtraction,
multiplication and division, although this
subject also includes more advanced
operations,
such
as
manipulations
of percentages, squareroot, exponentiation,
and logarithmic functions. Arithmetic is
performed
according
to
an order
of
operations
3
Institute of Lifelong Learning, University of Delhi
Binary Arithmetic
Binary arithmetic plays a pivotal role in many digital systems. After completing this section
you should be able to
0+1=1
1+0=1
1 + 1 = 10
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
+1
+1
?
10
as mentioned
above
10
+1 (Third number)
11
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:
4
Institute of Lifelong Learning, University of Delhi
1
0
+0
+0
+1
+1
+1
00
CS
01
CS
01
CS
10
CS
11
CS
Example 1:
Add the binary number 1011 and 1100
Solution:
1011
+1100
10111
Carry
Example 2:
Add the binary number 0101 and 1111
(1) (1) (1)
Solution:
0 1 0 1
+ 1 1 1 1
1 0 1 0 0
Carry
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
5
Institute of Lifelong Learning, University of Delhi
0
0
1
0
1
1
with a borrow
of 1
Practically it can be shown as 10 1 = 1 where 10 in LHS shows that 1 is borrowed and
now the number is (10)2 in binary (which is equivalent to 2 in decimal). So in decimal it is
2-1=1.
Example 3:
Subtract the binary number 1011 from 1101
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
1
1 0 0 1
- 1 0 1 1
1 0
1
1 0 0 1
- 1 0 1 1
0 0 1 0
6
Institute of Lifelong Learning, University of Delhi
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. The Egyptian 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 Paciolis mathematics compendium, Summa de arithmetica,
geometria, proportioni et proportionalit, first printed and published in Venice in
1494. The + is a 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 into Israeli schools (this practice goes back to
at least the 1940s) and is still commonplace today in elementary schools (including secular
schools) 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
7
Institute of Lifelong Learning, University of Delhi
1.4
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
positive or negative. A 0 is for positive and a 1 is for negative.
is
Magnitude
100111010
Sign bit
Magnitude
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.
8
Institute of Lifelong Learning, University of Delhi
2s complement representation
Positive numbers in 2s complement form are represented the same way as the sign
magnitude and 1s complement form. Negative numbers are the 2s compliment of the
corresponding positive number. In 2s complement notation, a negative number is obtained
by adding 1 to the 1s complement form of the number.
i.e. 2s complement number = 1s complement number + 1
so if there is a number +X and we use 2s complement operation then the number becomes
X and vice-versa
i.e. +X
2s complement
-X
-X
2s complement
+X
Example 4:
Represent -5710 in 8 bit 2s complement notation.
Solution:
Binary form of 57 =
00111001
1s complement of 57 = 11000110
+
1
2s complement of 57 = 11000111
It can be verified that -57
2s Complement
Binary form of - 57 =
11000111
1s complement of - 57 =
00111000
+
1
00111001
2s complement of - 57 =
-57
+57
+57
9
Institute of Lifelong Learning, University of Delhi
Case 1:
A)
9
( 4 )
5
9
+( 4 )
5
1001( 9)
1100( 4)
1 0101( 5)
2s complement of 4 = 1s complement of 4 + 1
Binary form of 4
= 0100
1s complement of 4 = 1011
+
1
2s complement of 4 = 1100
B)
4
( 9 )
5
C)
0100( 4)
0111( 9)
1011( 5)
14
( 108 )
122
D)
4
+( 9 )
5
14
+( 108 )
122
00001110(14)
01101100(108)
01111010(122)
43
( 78 )
35
43
+( 78 )
35
11010101(43)
01001110(78)
1 00100011(35)
10
Institute of Lifelong Learning, University of Delhi
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'Arithmtique Binaire. 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
This
is
an
interesting
game
based
on
simple
binary
arithmetic.
http://gwydir.demon.co.uk/jo/numbers/binary/cards.htm and enjoy the game.
Click
11
Institute of Lifelong Learning, University of Delhi
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.
Example: Multiply 11012 by 1102
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
12
Institute of Lifelong Learning, University of Delhi
1.6
Summary
0+1=1
1+0=1
1 + 1 = 10
10 - 1 = 1
1-0=1
1-1=0
13
Institute of Lifelong Learning, University of Delhi
1.7
Exercises
14
Institute of Lifelong Learning, University of Delhi
15
Institute of Lifelong Learning, University of Delhi
Answers:
1)
2)
3)
4)
5)
6)
7)
8)
9)
1.8
1
1001, 9
Sign, positive, negative
1011
0101
161F
19A
1000001
Odometer
Glossary
16
Institute of Lifelong Learning, University of Delhi
1.9
Reference Books:
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.
17
Institute of Lifelong Learning, University of Delhi