I want to make an excess-3 adder and an excess-3 subtractor using two 4-bit binary adder (the inputs are already in excess-3) and then show the results in excess-3 on a seven segment. For example, 2+7=9 we have 0101+1010=1100(after subtracting 3 cause excess-3 + excess-3= excess-6) or for subtracting 1-8=-7 we have 0001-1011= -1010 (I should use another seven segment to show the negative) but I have trouble showing 1100 and 1010 with two seven segments. I know I should use 2 seven segments when I have 7,8 or 9 in the result but I don't know how to do that.
Like when I add 9 to 9 which is 1100 in excess-3 I get 1 in carry and 1011, how can I show this as 21(18 in excess-3) on the seven segments?
-
\$\begingroup\$ Do you want to accept two 4-bit binary inputs, produce one 5-bit binary output, that is then converted using excess-3 converters to BCD (+ sign), which is then provided to BCD to 7-seg logic? Also, 9+9 = 18, which sum is 10010 (binary) and should be shown as 18 on the displays, I'd imagine. (Oh. I do understand that in excess notation 9 is 1100. Does this mean your 4-bit inputs are already in excess-3 notation?) Or did I miss something? Please provide one (or better, two) fully hand-worked example(s). \$\endgroup\$– jonkCommented Dec 14, 2021 at 17:36
-
\$\begingroup\$ The inputs are already in exess-3 and I also want the output to be in exess-3. 9+9 is 18 and 18 in exess-3 is 21. for 2+7=9 we have 0101+1010=1100(after subtracting 3 cause exess-3 + exess-3= exess-6) or for subtracting 1-8=-7 we have 0001-1011= -1010 ( I should use another seven segment to show the negative) but I have trouble showing 1100 and 1010 with two seven segments. \$\endgroup\$– giaCommented Dec 14, 2021 at 18:15
-
\$\begingroup\$ 7-segment displays usually come with a decimal point. Maybe you can light that up to indicate something significant. \$\endgroup\$– td127Commented Dec 14, 2021 at 18:43
-
\$\begingroup\$ @gia Must 4-bit binary adders be used? And I really think the question should be updated with these (and more, if possible) details. We should not need to drag each detail out, one piece at a time. Good and multiple examples would help clarify where words may fail, too. \$\endgroup\$– jonkCommented Dec 14, 2021 at 18:52
-
\$\begingroup\$ @gia Negative values cannot be used as input since the excess-3 notation doesn't provide for it. The only way a negative output can occur is when subtracting a larger positive value from a smaller positive value. I don't believe the circuit will be general-purpose. More an educational practice. Do you have any specific thoughts about how to approach this problem? \$\endgroup\$– jonkCommented Dec 15, 2021 at 3:43
2 Answers
I add 9 to 9 which is 1100 in excess-3. I get 1 in carry and 1011, how can I show this [usefully] on the seven segments?
Displaying a conventional digit would blur any distinction in coding.
Hex and octal are even worse, sharing many symbols with digits of a base 10 representation but a different meaning.
I suggest mounting the 7-segement displays sideways to create a bit-wise display in the now vertical segments a, d, and g - 6 bits for two devices.
The sum of any two decimal digits is a single decimal digit (4 bits of excess-3), plus possibly a carry. That carry in excess-3 needs another 3 bits for a total of 7, but there are only 6. The two lower significant bits for the carry are identical for 0 (LHH) and 1 (HLL):
I suggest to display bit 0 of the carry digit with segment g of the more significant 7-segment display device, with the interpretation bit 0 and 1.
One could light the decimal point for error: bits 0 & 1 don't agree. (A pity it isn't next to segment \$g\$ - light \$b\$&\$c\$ or \$e\$&\$f\$ instead?)
You will need some extra circuitry if you want to drive 7-segements display with binary data. You can start by looking on how to use chips such as 74LS47 or 74LS48 (BCD to 7-segments decoder), then you'll need to find how to drive your two 7-displays together, one for the tens and the other for the units.
You can look over there : https://www.electronics-tutorials.ws/combination/comb_6.html, it can be a good start for what you intend to achieve.