Browse Prior Art Database

Design of a M-Bit Decrementer That Decrements by 1, 2, 3 Or 4 Using Full And Half Adders

IP.com Disclosure Number: IPCOM000102726D
Original Publication Date: 1990-Jan-01
Included in the Prior Art Database: 2005-Mar-17
Document File: 1 page(s) / 34K

Publishing Venue

IBM

Related People

Dhawan, S: AUTHOR [+2]

Abstract

The m bit decrement function is built using 3-bit full adder and (m-3) bit half adder. Let the m bit binary number, to be decremented by x (x=1,2,3,4), be represented by A and B, where A is the (m-3) upper order bits and B is the lower order 3 bits.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 98% of the total text.

Design of a M-Bit Decrementer That Decrements by 1, 2, 3 Or 4 Using Full And Half Adders

      The m bit decrement function is built using 3-bit full adder
and (m-3) bit half adder.  Let the m bit binary number, to be
decremented by x (x=1,2,3,4), be represented by A and B, where A is
the (m-3) upper order bits and B is the lower order 3 bits.

      To decrement AB, first decrement B by x (B-x).  If (B<x) then
decrement A by 1 (A-1); otherwise, A remains unchanged.

      Now B-x = B + (2n - x), where (2n - x) is the
2's complement of x and n is the number of bits in B, i.e., 3.
A 3-bit full adder can be used to implement B + (2n - x).  A
simplifying assumption is that when B is to be decremented by 1 add
'111'b, by 2 add '110'b, by 3 add '101'b, by 4 add '100'b.  If C
is the Carry out of the 3-bit full adder, then the computation to be
done on the (m-3) bits of is (A - C'), where C' is the complement
of C.
      Now, (A - C') = 2n - 2n + 1 - 1 + A -
C'   or                    = 2n - [(2n - A - 1) + C'] - 1
.........(1)

      In Equation (1), (2n - A - 1) is the 1's complement of A
(Invert all (m-3) bits in A), and [(2n - A - 1) + C'] is
implemented by using (m-3) bit half adders, and 2n - [(2n - A - 1)
C'] - 1 is the 1's complement of [(2n - A - 1) + C']
which is obtained by inverting the output of the half adder.

      The above method is a simple and inexpensive way to decrement
an integer by 1, 2, 3 or 4.

      D...