Design a logic circuit to add two 2-BCD decade numbers

In summary: It lids when A = 1100 :In summary, the student attempted to solve the homework equation but did not get the correct answer. They then disconnected +5V from (A>B) in order to get the correct answer.
  • #1
Fatima Hasan
319
14

Homework Statement


Capture.png


Homework Equations


-

The Attempt at a Solution


Here's my work :
Untitled.png

When I added 0000 0001 to 0000 0000 , I didn't get the correct answer .
Could someone check where is my mistake please ?
 

Attachments

  • Untitled.png
    Untitled.png
    19.2 KB · Views: 299
  • Capture.png
    Capture.png
    22.7 KB · Views: 857
  • Untitled.png
    Untitled.png
    19.2 KB · Views: 641
Last edited:
Physics news on Phys.org
  • #2
It looks like you are adding 0001 0000 to 0000 0000 and the answer is correct..
 
  • #3
willem2 said:
It looks like you are adding 0001 0000 to 0000 0000 and the answer is correct..
I added 0000 0001 not 0001 0000 and the answer was 0000 0XX1 0000 .
Why I didn't get 0000 0000 0001 ?
 
  • #4
Fatima Hasan said:
I added 0000 0001 not 0001 0000 and the answer was 0000 0XX1 0000 .
Why I didn't get 0000 0000 0001 ?
The only 1 input I can see is going into the adder on the bottom left, and this must be the adder for the most significant digit, since it has a carry in coming from the other adders. I have no idea where those XX come from. Could be unconnected inputs, inputs that are between a 1 and a 0 or inputs that are changing, and I don't see any of that.
 
  • #5
willem2 said:
The only 1 input I can see is going into the adder on the bottom left, and this must be the adder for the most significant digit, since it has a carry in coming from the other adders. I have no idea where those XX come from. Could be unconnected inputs, inputs that are between a 1 and a 0 or inputs that are changing, and I don't see any of that.

I've solved it again and disconnected +5V from (A>B) :
A3.png

I got the correct answer which is 0000 0001 0000 , but the question mentioned that the circuit will work if A and B are invalid BCD (A > 1001 and B > 1001 ) .So , should I connect +5V to A>B ( A > 1001 which is invalid BCD ) as I did in my first solution ?
 

Attachments

  • A3.png
    A3.png
    15.6 KB · Views: 292
  • A3.png
    A3.png
    16.7 KB · Views: 402
  • #6
Fatima Hasan said:
I got the correct answer which is 0000 0001 0000 , but the question mentioned that the circuit will work if A and B are invalid BCD (A > 1001 and B > 1001 ) .So , should I connect +5V to A>B ( A > 1001 which is invalid BCD ) as I did in my first solution ?
Those are outputs, so tying them to +5 V will get you undefined behavior. You should use the outputs of the 2 comparators that check A to produce an error signal that is 1 whenever one of the digits of A is out of range.
 
  • #7
willem2 said:
Those are outputs, so tying them to +5 V will get you undefined behavior. You should use the outputs of the 2 comparators that check A to produce an error signal that is 1 whenever one of the digits of A is out of range.
Here's when I connected the (A>B) of the 2 comparators to +5V :
9.png
 

Attachments

  • 9.png
    9.png
    14.6 KB · Views: 288
  • 9.png
    9.png
    17.8 KB · Views: 365
  • #8
Fatima Hasan said:
Here's when I connected the (A>B) of the 2 comparators to +5V :
That is as I would expect. You are not using the outputs of the 4 comparators on the left to produce an error signal.
If you do use the comparators, you should connect all inputs. Do you understand what the inputs and outputs of the comparator are meant for? I think you use those. http://www.sycelectronica.com.ar/semiconductores/74LS85.pdf
 
  • #9
willem2 said:
That is as I would expect. You are not using the outputs of the 4 comparators on the left to produce an error signal.
If you do use the comparators, you should connect all inputs. Do you understand what the inputs and outputs of the comparator are meant for? I think you use those. http://www.sycelectronica.com.ar/semiconductores/74LS85.pdf
I connected the cascade inputs of all the comparators as follows :

A<Bin and A>Bin = Ground.
A=Bin = Vcc
And the outputs as follows :
A>B =+5V to produce an error signal which is 1 if A or B are invalid BCD.
A=B and A<B = Ground .
6.png

But I still didn't get the correct answer .
 

Attachments

  • 6.png
    6.png
    19.5 KB · Views: 341
Last edited:
  • #10
Fatima Hasan said:
And the outputs as follows :
A>B =+5V to produce an error signal which is 1 if A or B are invalid BCD.
A=B and A<B = Ground .

You should not tie any outputs to either 5V or ground. If you don't understand why that is, this circuit is too complicated for you. The XXX in the output is probably, because you shorted out the power supply, and your simulater doesn't know what to do. You should try to modify the circuit, so a lamp or LED gets lid whenever A or B has digits that are invalid. It's really much easier than the part of the circuit that modifies the digits after the addition.
 
  • #11
willem2 said:
so a lamp or LED gets lid whenever A or B has digits that are invalid.
It lids when A = 1100 :
6.png
 

Attachments

  • 6.png
    6.png
    17.9 KB · Views: 356
  • 6.png
    6.png
    16.3 KB · Views: 260

Related to Design a logic circuit to add two 2-BCD decade numbers

1. How do I design a logic circuit to add two 2-BCD decade numbers?

To design a logic circuit to add two 2-BCD decade numbers, you will need to first convert the numbers into binary-coded decimal (BCD) format. Then, you can use a combination of logic gates such as AND, OR, and XOR gates to add the BCD numbers together. The output of the circuit will be the sum of the two BCD numbers in BCD format.

2. What is a BCD decade number?

A BCD decade number is a number represented using the binary-coded decimal system, where each digit is represented by a four-bit binary number. A BCD decade number can range from 0 to 9.

3. What are logic gates?

Logic gates are electronic circuits that perform logical operations on one or more binary inputs and produce a single binary output. Some common logic gates include AND, OR, and NOT gates.

4. How do I convert a decimal number into BCD format?

To convert a decimal number into BCD format, you will need to divide the decimal number by 10 and convert each digit into its four-bit binary equivalent. For example, the decimal number 25 would be converted to 0010 0101 in BCD format.

5. What is the purpose of designing a logic circuit to add two 2-BCD decade numbers?

The purpose of designing a logic circuit to add two 2-BCD decade numbers is to perform addition operations on BCD numbers. This type of circuit can be used in various electronic devices, such as calculators and digital clocks, to add BCD numbers.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
10K
Back
Top