4 bit 2s Complement Adder Circuit

Thread Starter

Steven Diveley

Joined Dec 1, 2018
14
Hello Everyone,
I need your assistance. I am taking a Modern Digital Design course, and I am stuck on our lab for this week. We are to construct a Four bit 2s complement adder circuit, using logic gates. The circuit must be connected through a 4-bit adder, then connected through a BCD - 7 segment converter and displayed on a 7 segment display. If the sum is negative the overflow will feed through another 4-bit adder, through another BCD - 7 segment converter and the symbol (0 for positive, 1 for negative) will display on a second 7 segment display. However I ran into a few issues. We are to use Multi-sim, and Multi-sim does not have a 4 bit adder available on the student provided version, so i had to cascade four 1 bit adders. Im assuming since A0 A1 A2 A3, B0, B1, B2, B3 will be connected directly to the first 4 bit adder, i will need to build another adder/subtractor for the second 4 bit adder. Therefor I am unsure of a couple things.

1. Connecting AB inputs of the second 4 bit adder, since I would need them to provide a sum for the Inputs of the BCD - 7 segment converter.
2. I am also not getting any reading on the first seven segment display when pressing switches. The circuit i am using is straight from our textbook (Digital Electronics Principals and Applications Roger Tokhiem).

I am using CMOS XOR gates, with a XOR gate as the over flow going into the second cascaded 4 bit full adder. any ideas or advice would be appreciated. I have no idea where i went wrong. I uploaded a screenshot, and tried to upload the actual file however the actual file is an unallowed extension. Screenshot 2018-12-15 23.35.11.png
 

WBahn

Joined Mar 31, 2012
24,854
Why do you need a second adder? You have a single bit from the first adder circuit that tells you if the result is positive or negative, right? So what to you need to add?

Your basic problem is that you are implementing the whole circuit before you try to see if ANY of it works.

Build it up one piece at a time. Start with an XOR gate connected to one of your keyboard-operated switches and get it's output working. You will hopefully (depending on how MultiSim does things) discover that you are forgetting about these things called pulldown resistors. You will then hopefully soon discover that you have a net that is connected to five inputs, but you don't have anything driving that net. These are things that are much easier to discover in a circuit in which you just added one thing to an already tested and working partial circuit than when throwing everything together and then seeing if it somehow magically all works on the first attempt (which is almost never does).
 

Thread Starter

Steven Diveley

Joined Dec 1, 2018
14
@WBahn The purpose of the second adder is to be able to display whether the added / subtracted number from the first adder is either a negative or positive. I dont even understand why the second adder is necessary, when a comparator would do the trick.

The instructions does not say how the second seven segment display is to show positive or negative. Im assuming through being blank for positive and a 0 for negative, but the 0 has to be carried over.

I have tested them using a logic probe as i went. I placed a switch on the LSD which is meant to tell the adder whether it is meant to add or subtract the two number. So far I am getting a reading via probes, and after testing the results with binary addition / subtraction it has so far been correct. Still no output on the seven segment display.though. and still havent had luck figuring out the second adder. Logic gates are not really my cup of tea.
 

WBahn

Joined Mar 31, 2012
24,854
@WBahn The purpose of the second adder is to be able to display whether the added / subtracted number from the first adder is either a negative or positive. I dont even understand why the second adder is necessary, when a comparator would do the trick.
So why are you using it?

The instructions does not say how the second seven segment display is to show positive or negative. Im assuming through being blank for positive and a 0 for negative, but the 0 has to be carried over.
But in your first post you stated, "another BCD - 7 segment converter and the symbol (0 for positive, 1 for negative) will display on a second 7 segment display".

Need to make up your mind what you are trying to do before you have any chance of doing it successfully.

If the instructions don't say how to show positive or negative, how about doing the most natural thing -- blank for positive and a negative sign for negative.

I have tested them using a logic probe as i went. I placed a switch on the LSD which is meant to tell the adder whether it is meant to add or subtract the two number. So far I am getting a reading via probes, and after testing the results with binary addition / subtraction it has so far been correct. Still no output on the seven segment display.though. and still havent had luck figuring out the second adder. Logic gates are not really my cup of tea.
If the seven-segment display is causing you problems, why not work with JUST the seven segment display until you figure out how to get it to work? Then and the decode and get it to work.
 

dl324

Joined Mar 30, 2015
9,150
Cropped, edited circuit:
upload_2018-12-16_14-55-42.png

Can you explain what you intend to do? For instance, what are the XOR gates supposed to do?

If your simulator doesn't have a 4 bit adder, why don't you just create one?
 

Thread Starter

Steven Diveley

Joined Dec 1, 2018
14
So why are you using it?



But in your first post you stated, "another BCD - 7 segment converter and the symbol (0 for positive, 1 for negative) will display on a second 7 segment display".

Need to make up your mind what you are trying to do before you have any chance of doing it successfully.

If the instructions don't say how to show positive or negative, how about doing the most natural thing -- blank for positive and a negative sign for negative.



If the seven-segment display is causing you problems, why not work with JUST the seven segment display until you figure out how to get it to work? Then and the decode and get it to work.
Thank you I believe i figured the first part out. I switched to the 45B11 BCD to Seven Segment converter. Instead of using the "MultiSim Version" you get when you search for the part. Now just to figure out how to turn the overflow, into a negative sign, through the G of the second seven segment.
 

WBahn

Joined Mar 31, 2012
24,854
Thank you I believe i figured the first part out. I switched to the 45B11 BCD to Seven Segment converter. Instead of using the "MultiSim Version" you get when you search for the part. Now just to figure out how to turn the overflow, into a negative sign, through the G of the second seven segment.
What relationship does the overflow have to whether the value represented is positive or negative?
 

Thread Starter

Steven Diveley

Joined Dec 1, 2018
14
What relationship does the overflow have to whether the value represented is positive or negative?
If im understanding the text correctly the overflow should be either a "1" or "0". If the overflow is a "1" the binary value is a negative and the value should be turned into its 2s complement version. Where as if the overflow is a "0" the binary value should not change and remain positive. Im in my 2nd to last semester and still struggle with logic gates, yet seem to do just fine with the ICs.
 
Top