Hi guys,
I found the schematic diagram for BCD adder.
I wonder how can I do BCD subtraction?
I tried to get the 2's complement of the neg num and add onto the first value but the ans doens't seem correct.
Or I need to convert every bits to binary and do subtraction?
The 9's complement of 74 is 25. Note that 74 + 25 = 99
To get the 10's complement you add 1, so 25 plus 1 is 26
Now add ignoring the carry from the 10's place
83 + 26 = 09 = 83 - 74
Right?
The 9's complement of 74 is 25. Note that 74 + 25 = 99
To get the 10's complement you add 1, so 25 plus 1 is 26
Now add ignoring the carry from the 10's place
83 + 26 = 09 = 83 - 74
Right?
ic, but how do we do it in circuit view?
I actually need to build a BCD adder and subtracter project.
I know the adding part but the subtractor part I am still confused.
Is there any schematic diagram for BCD adder/subtractor as well? Thanks
I don't know. In 44 years of hardware design I've never had to implement a BCD subtractor. To take the 9's complement you can use a PROM lookup table or you can use a PAL to implement the boolean equations for the following table
Though I am new to this, but is it possible to implement a binary subtractor and then based on a correction logic to generate an equivalent BCD code for the binary code.I think the normal C=K+Z8.Z4+Z8.Z2 correction logic should work here too.So implementing a 4 bit binary subtractor is the only part that needs to be done.Does that sound correct?