All About Circuits Forum 4-bit Parallel Adder -> Subtractor
 User Name Remember Me? Password
 Register Blogs FAQ Members List Today's Posts Search Today's Posts Mark Forums Read

 Notices Welcome to the All About Circuits forums.Our forum is a place where thousands of students, hobbyists and professionals from around the world share knowledge and ideas. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us.

 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.

#1
05-26-2008, 05:50 PM
 ishanz New Member Join Date: May 2008 Posts: 5
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?
#2
05-26-2008, 07:13 PM
 mik3 Senior Member Join Date: Feb 2008 Location: Cyprus, but now in UK (GMT+0) Posts: 4,846 Blog Entries: 9

Quote:
 Originally Posted by ishanz 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.
#3
05-27-2008, 08:04 PM
 ishanz New Member Join Date: May 2008 Posts: 5

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?
#4
05-27-2008, 08:47 PM
 Caveman Senior Member Join Date: Apr 2008 Location: Austin, TX Posts: 471

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

Quote:
 Originally Posted by ishanz 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.
#6
05-27-2008, 09:57 PM
 ishanz New Member Join Date: May 2008 Posts: 5

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.
#7
05-27-2008, 10:02 PM
 mik3 Senior Member Join Date: Feb 2008 Location: Cyprus, but now in UK (GMT+0) Posts: 4,846 Blog Entries: 9

Quote:
 Originally Posted by ishanz 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.

 Tags >, 4bit, adder, parallel, subtractor

 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 snk0 Homework Help 2 05-21-2014 11:07 PM roll cast Homework Help 2 10-16-2011 03:30 PM RadwaU The Projects Forum 4 09-13-2011 02:08 PM aruniyengar Homework Help 2 08-27-2010 02:15 PM

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Electronics Forums     General Electronics Chat     The Projects Forum     Homework Help     Electronics Resources Software, Microcomputing, and Communications Forums     Programmer's Corner     Embedded Systems and Microcontrollers     Computing and Networks     Radio and Communications Circuits and Projects     The Completed Projects Collection Abstract Forums     Math     Physics     General Science All About Circuits Commmunity Forums     Off-Topic     The Flea Market     Feedback and Suggestions

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.