All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > Homework Help

Notices

Homework Help Stuck on a textbook question or coursework? Cramming for a test and need help understanding something? Post your questions and attempts here and let others help.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 05-26-2008, 05:50 PM
ishanz ishanz is offline
New Member
 
Join Date: May 2008
Posts: 5
Default 4-bit Parallel Adder -> Subtractor



I just drew this up real quickly in Photoshop. So the objective is to use the IC and four inverters to create a subtractor circuit that'll do the following operation:

A4 A3 A2 A1 - B4 B3 B2 B1

So would I just invert all the B's on the circuit?
Reply With Quote
  #2  
Old 05-26-2008, 07:13 PM
mik3's Avatar
mik3 mik3 is offline
Senior Member
 
Join Date: Feb 2008
Location: Cyprus, but now in UK (GMT+0)
Posts: 4,846
Blog Entries: 9
Default

Quote:
Originally Posted by ishanz View Post


I just drew this up real quickly in Photoshop. So the objective is to use the IC and four inverters to create a subtractor circuit that'll do the following operation:

A4 A3 A2 A1 - B4 B3 B2 B1

So would I just invert all the B's on the circuit?
Connect the outputs of 4 XOR gates to B1-B4. Connect one of each XOR's gate input to C1. The other four inputs on the XOR gates (one input per gate) are your new inputs for B1-B4. When you apply high logic to Cin the circuit will subtract A-B , when you apply low logic to Cin the circuit will add A+B.
Reply With Quote
  #3  
Old 05-27-2008, 08:04 PM
ishanz ishanz is offline
New Member
 
Join Date: May 2008
Posts: 5
Default

Is there a way to just do it with inverters? The worksheet we were given only says "Use the IC below and 4 inverters to subtract..."

I was trying to figure out how on earth to do the 2's complement method with this, are using the XOR gates the only way?
Reply With Quote
  #4  
Old 05-27-2008, 08:47 PM
Caveman Caveman is offline
Senior Member
 
Join Date: Apr 2008
Location: Austin, TX
Posts: 471
Default

Hint:
A - B = A + 2's complement of B
2's complement of B = B' + 1
Reply With Quote
  #5  
Old 05-27-2008, 09:15 PM
mik3's Avatar
mik3 mik3 is offline
Senior Member
 
Join Date: Feb 2008
Location: Cyprus, but now in UK (GMT+0)
Posts: 4,846
Blog Entries: 9
Default

Quote:
Originally Posted by ishanz View Post
Is there a way to just do it with inverters? The worksheet we were given only says "Use the IC below and 4 inverters to subtract..."

I was trying to figure out how on earth to do the 2's complement method with this, are using the XOR gates the only way?
Ok then. Connect 4 NOT gates on the B inputs and apply a high logic to Cin input.

With this modification you invert all the bits and add 1 as the 2's complements requires. The circuit will do the function A-B.
Reply With Quote
  #6  
Old 05-27-2008, 09:57 PM
ishanz ishanz is offline
New Member
 
Join Date: May 2008
Posts: 5
Default

So the carry-in high is basically the 1 that is added when a 2's complement is performed?

I believe I understand now, thanks a bunch to the both of you! Hopefully I'll be ready for the exam come tomorrow.
Reply With Quote
  #7  
Old 05-27-2008, 10:02 PM
mik3's Avatar
mik3 mik3 is offline
Senior Member
 
Join Date: Feb 2008
Location: Cyprus, but now in UK (GMT+0)
Posts: 4,846
Blog Entries: 9
Default

Quote:
Originally Posted by ishanz View Post
So the carry-in high is basically the 1 that is added when a 2's complement is performed?

I believe I understand now, thanks a bunch to the both of you! Hopefully I'll be ready for the exam come tomorrow.
yes the carry in is the 1 we add n the 2's complement.
Reply With Quote
Reply   Post New Thread

Tags
, , , ,


Related Site Pages
Section Title
Textbook Look-up tables : Principles Of Digital Computing
Textbook The Unijunction Transistor (UJT) : Thyristors
Textbook A Full-Adder : Combinational Logic Functions


Similar Threads
Thread Thread Starter Forum Replies Last Post
4 bit adder -> parrarel adder of 4 bit numbers snk0 Homework Help 2 05-21-2014 11:07 PM
BCD adder and subtractor logic diagram roll cast Homework Help 2 10-16-2011 03:30 PM
help with a 4 bit full adder using four 38 decoders RadwaU The Projects Forum 4 09-13-2011 02:08 PM
4 bit subtractor aruniyengar Homework Help 2 08-27-2010 02:15 PM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:47 PM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.