Professional Documents
Culture Documents
Com 2
Com 2
Com 2
Arithmetic
operation
s
Unsigned Signed
A number system
where a number
is represented by
using only two
digits (0 and 1)
with a base 2.
1. Signed-magnitude representation
2. Signed 1’s complement
3. Signed 2’s complement
For Example:
For Example:
For Example:
A) Rules for Binary Addition and Subtraction using One’s Complement Method.
Let us suppose we have two numbers A and B then,
1. Find 1’s complement of B.
2. Add ‘A’ and 1’s complement of ‘B’.
3. If EAC obtained, answer is positive. Then add carry to LSB to get result.
4. If EAC is 0, the answer is negative and in the one’s complement form.
DR Mrs J N Jadhav (Associate Professor Deptt of CSE)
Addition and Subtraction
For Ex.: A= (1010) B= -(1011)
B) Rules for Binary Addition and Subtraction using Two’s Complement Method.
11011
X 110
00000
10111+
10111+ +
Fig. Basic Rules of Binary Multiplication
10001010
(10111)2 X (110)2 = (10001010)2
DR Mrs J N Jadhav (Associate Professor Deptt of CSE)
H/w Implementation of Multiplication
Registers:
Registers B and Q used to store multiplicand and multiplier respectively.
Register A is used to store partial product during multiplication.
Sequence counter(SC) is used to store no. of bits in multiplier.
Flip-flop:
Three flip-flops A Sign, B Sign and Q Sign required to store sign bit.
Flip-flop E used to store carry bit generated while partial product addition.
Complement and Parallel Adder:
This is used in calculating partial product i.e. perform addition required.
Remember to restore the value of A most significant bit of A is 1. As that register Q contain the quotient, i.e. 3 and register
A contain remainder 2.
DR Mrs J N Jadhav (Associate Professor Deptt of CSE)
Floating Point Number
• As the name implies, floating point numbers are numbers that contain
floating decimal points.
• For example, the numbers 5.5, 0.001, and -2, 345.6789 are floating point
numbers.
• Numbers that do not have decimal are called integers
• The floating number representation of a number has two part: the first part
represents a signed fixed point number called mantissa.
• The second part of designates the position of the decimal (or binary) point
and is called the exponent
• The fixed point mantissa may be fraction or an integer.
• Floating -point is always interpreted to represent a number in the following
form: M*r^e.
DR Mrs J N Jadhav (Associate Professor Deptt of CSE)
IEEE Floating Point Format
IEEE (Institute of Electrical and Electronics Engineers) has standardized
Floating-Point Representation as following diagram