Binary adder that can add up to 30

Thread Starter

heliosdguu

Joined Apr 30, 2024
11
Hello I've recently made a bcd adder circuit that adds 2 4-digit binary numbers. But it only works well up to 19, (1 1001) due to the fact that I'm only using 1 carry in. Is there a way to make it add up to 30?
 

WBahn

Joined Mar 31, 2012
30,303
Under what conditions would an output of 30 be reasonable/meaningful?

Where does the magic number 30 come from?
 

Thread Starter

heliosdguu

Joined Apr 30, 2024
11
Under what conditions would an output of 30 be reasonable/meaningful?

Where does the magic number 30 come from?
Hello, that is the condition set by our instructor. To make a bcd adder that can add digits greater than 19, the maximum is also 30. Anything above that is no longer needed.
 

WBahn

Joined Mar 31, 2012
30,303
Hello, that is the condition set by our instructor. To make a bcd adder that can add digits greater than 19, the maximum is also 30. Anything above that is no longer needed.
So what inputs to a 4-bit BCD adder should produce an output that is greater than 19?
 

BobTPH

Joined Jun 5, 2013
9,278
He also explicitly states that it is a BCD adder (which ARE binary values -- it's called binary-coded decimal for a reason).

If he wants a binary counter that produces BCD outputs, that's something different.
That is the way I read it. 2 4-bit binary inputs, two digit BCD output. Max output is 30.
 

WBahn

Joined Mar 31, 2012
30,303
That is the way I read it. 2 4-bit binary inputs, two digit BCD output. Max output is 30.
While that might be what he (or the instructor) has in mind, it is pretty nonsensical, especially since we know that there is already a carry in that is supported (unless that is now is now implicitly removed, which might account for why 30 and not 31). The presence of a carry-in implies that this is cascadable, but now imagine how you would cascade these these things.
 

BobTPH

Joined Jun 5, 2013
9,278
While that might be what he (or the instructor) has in mind, it is pretty nonsensical, especially since we know that there is already a carry in that is supported (unless that is now is now implicitly removed, which might account for why 30 and not 31). The presence of a carry-in implies that this is cascadable, but now imagine how you would cascade these these things.
I don’t see anything to indicate there is a carry input to the device. I interpret his reference to carry in as being internal to the adder implementation, not an input to the device.

30 max is consistent with my interpretation.

Need clarification from the TS.

What exactly are the inputs and outputs?
 

WBahn

Joined Mar 31, 2012
30,303
I don’t see anything to indicate there is a carry input to the device. I interpret his reference to carry in as being internal to the adder implementation, not an input to the device.

30 max is consistent with my interpretation.

Need clarification from the TS.

What exactly are the inputs and outputs?
" But it only works well up to 19, (1 1001) due to the fact that I'm only using 1 carry in "

With two 4-bit BCD values, the only way to get 19 is for both values to be 9 AND for the carry-in bit into the device to be asserted.
 
Top