Having trouble forming an equation on 2 bit subtractor

1 reply · 4K views · last reply
AilingLore21
Messages
26
Reaction score
0

Homework Statement


We are asked to make a subtractor circuit which has a 2 bit, 2 input data.

Homework Equations



A1A0

_

B1B0

_________________________________

The Attempt at a Solution



I would have a 3 bit output with one borrow. The problem is I am stuck at this point and am having troubles forming an equation. Someone lent me their diagram and this is what I have

Logic circuit schematic of a 2-bit subtractor with inputs A0, A1, B0, B1, using XOR, AND, NOT gates and two output LEDs.

I have tried building this on the breadboard but it gives off an erroneous result at the 7 segment cathode with the ls48 decoder for the 4th time I assembled this. It only gives off 0 and 4 at the LED matrix when it should be 3,2,1,0. The upper LED is the rightmost bit while the third led is the third bit
 
AilingLore21 said:

Homework Statement


We are asked to make a subtractor circuit which has a 2 bit, 2 input data.

Homework Equations



A1A0

_

B1B0

_________________________________

The Attempt at a Solution



I would have a 3 bit output with one borrow. The problem is I am stuck at this point and am having troubles forming an equation. Someone lent me their diagram and this is what I have

Logic circuit schematic in a simulator with inputs A0, B0, A1, B1 and gates including XOR, AND, NOT, and OR, with red and grey output indicators.

I have tried building this on the breadboard but it gives off an erroneous result at the 7 segment cathode with the ls48 decoder for the 4th time I assembled this. It only gives off 0 and 4 at the LED matrix when it should be 3,2,1,0. The upper LED is the rightmost bit while the third led is the third bit
Can you show us the truth table for the subtractor? And the K-maps that correspond to each of the outputs?