I want to design a circuit that takes as input two decimal digits binary coded as A1…4 and subtractionB1…4 and displays their , sum or (fulldifference using a two place BCD-to-7-segment display as selected by a signal C : A BCD adder)/subtractor.
I use full adder(s), (and), (xor) and (or) gates, Also I used input C carry in for subtraction, but the BCD circuit doesn't work like the way I want. When I use the A1 and B1 inputs, the result at the outputs will be incorrect . The other inputs work well. When I use carry, the subtraction of inputs, gives me an incorrect output value
The outputs can't be bigger than 15 in the process of additio,and cannot be negative in the subtraction process.
For example when I put 4+6 in inputs, the result of output will be 10. When I put 8+8, the result, the output will be 15. For some reasons the output cannot give me numbers bigger than 15.
In the process of subtractor, can't gives me negative numbers. For example, when I put 1-2 in inputs, the output will gives me 6.