NEED HELP making a 4-bit ADDER/SUBTRACTOR in Logisim

Thread Starter

maximat10

Joined Dec 10, 2017
4
Hello, I am a student and need help creating a 4-bit adder/subtractor in Logisim which will display the result in a 7-segment display. My current circuit adds my inputs and displays the result up to "9" on a single 7-segment display and subtracts up to "0". Although, I need to display negative numbers as well with two 7-Segments as well as displaying an "E" when overflow occurs. Attached is my current circuit. I appreciate any help :)

Update: I added another variation of my circuit in which I use a single adder/subtractor chip. I still have the same problem with representing negative number and overflow
 

Attachments

dl324

Joined Mar 30, 2015
16,846
Neither of your schematics are very useful because they don't label the inputs and outputs of the integrated circuits.

Can you post the complete text of the problem you're trying to solve?

To calibrate your expectations. In this forum, members won't just hand out answers. We'll try to guide you, but you're going to be expected to do most of the work.
 

Thread Starter

maximat10

Joined Dec 10, 2017
4
Neither of your schematics are very useful because they don't label the inputs and outputs of the integrated circuits.

Can you post the complete text of the problem you're trying to solve?

To calibrate your expectations. In this forum, members won't just hand out answers. We'll try to guide you, but you're going to be expected to do most of the work.
Hello sir, I am very sorry for the inconvenience. My main confusion is how to display my 4-bit sum/difference on the seven segment display. I am trying to use two seven segments to represent negative results (one being the symbol and the other being the digit), but have not found success. I attached the labeled diagram for the ICs. Thank you for taking the time to help.
 

Attachments

dl324

Joined Mar 30, 2015
16,846
My main confusion is how to display my 4-bit sum/difference on the seven segment display.
You are using a BCD to seven segment decoder which is incapable of displaying numbers above 9.

How are the numbers that you're supposed to add or subtract generated?

Is there a limited number range?

What is the part number of the 4 bit adder/subtractor?

Post the complete text of the problem so we can read for ourselves what you're supposed to do.
 

Thread Starter

maximat10

Joined Dec 10, 2017
4
Here is my exact assignment, quoted from our class site,

Assignment: Create a 4 bits adder/subtractor with 7 Segment Display (Need to implement the decoder) 8 bit is a welcome challenge Decoder DOES NOT require implementing your own CMOS library, it can use logic gates from the Logisim Library.

The range is between -8 and 7, signed system. The 4-bit adder/subtractor, I implemented myself, using full adders; I attached the schematic of the adder/subtractor I used. I also attached a rough diagram of what we are asked to create.
 

Attachments

dl324

Joined Mar 30, 2015
16,846
Your diagram implies that the adder is capable of subtracting. If that's the case, why do you need inversion on your multiplexer?

How is binary subtraction usually done? Can you just invert a positive number to get it's negative representation?

If the input range is -8 to 7, how are you supposed to represent -16 or 14 using a BCD to seven segment decoder?
 

WBahn

Joined Mar 31, 2012
29,979
If your data path is 4-bit, then your data path is 4-bit. So if your data into your calculator is 4-bit two's complement, then your output is also 4-bit two's complement. If your results overflow the range, then they should wrap around. This is the behavior of most programming languages and that's because it the behavior of most hardware architectures and that's because it's the natural behavior of most ALUs.

So if you add 7 + 7 you should get -2.

Notice that the assignment specifically said that you would need to design the decoder for your display.

Given a 4-bit two's complement number, what would you need to do in order to display all of the possible values? Hint -- one way is to condition the number into a sign/magnitude representation and then send the 3-bit magnitude to a normal bin-2-7seg decoder circuit and use the sign information to drive the digit(s) in the display that you want to use for your minus sign.
 
Top