Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question about four bit decrementor

Status
Not open for further replies.

moonnightingale

Full Member level 6
Joined
Sep 17, 2009
Messages
362
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Activity points
3,832
The question along with solution is attached
Can anybody explain me solution. This is from book of Mooris Mano
 

Attachments

  • question.jpg
    question.jpg
    64.8 KB · Views: 124

Hi,

Are you familiar with two's compliment arithmetic? This arithmetic allows us to perform subtractions by doing additions.

In algebra, decrementing by one is the same as adding the opposite:
decrement-by-one = n-1 = n +-1

So, we can use adders to perform subtraction.

We can represent minus 1 by it's two's compliment form:
- 0001 >>> 1110 + 1 >>> 1111

Now we can add 1111 to the original number to do the decrement:

Lets try decrement 12:
12 >> C >> 1100
1100 - 1
1100 - 0001
1100 + 1111 (using twos compliment)
1100 (12d)
1111 (-1d)
+------
(1)1011 (11d)

Note: in true signed arithmetic the msb represents the sign. In this problem we should extend the nibble to 5 bits and then we will see a positive result...
01100 (12d)
11111 (-1d)
+------
01011 (+11d)
 

Yes i understand all of 2's complement but kindly explain me the figure
He is adding one to each full adder, that is Ok, where he is taking 1's comoplement???
 

Hi, sorry for the confusion.

He is adding 1111 (-1d) not just 1 to each adder. 1111 is the two's complement of -1d.

Does this help?
 
Hi, sorry for the confusion.

He is adding 1111 (-1d) not just 1 to each adder. 1111 is the two's complement of -1d.

Does this help?

Thanks a lot .
u people are really like a beacon for this forum
 

You can verify it yourself by simulating it online:**broken link removed**. Just use full-adder elements under Arith.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top