Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Implement a 3 digit BCD Adder|Subtractor Circuit Using VHDL . NOTICE: 1) The cir

ID: 2084858 • Letter: I

Question

Implement a 3 digit BCD Adder|Subtractor Circuit Using VHDL .

NOTICE:

1) The circuit should take as an input 13 BITS the MSB gives the sign of the input number 0: Positive | 1: Negative

2) Becareful How To Connect each of the Single Digit Adder with each other.

3) Becareful of when we have to subtract A from B and when we have to subtract B from A ( Based on Magnitude and Sign of the values !) -- Critical Point

4) A smart move is checking the magnitude and sign ---> Same Sign add them normally and put the 13th bit as 0/1 based on initial signs another smart move is checking the magnitude when A-B or B-A must be done and then introduce the sign to the MSB . (Sometimes you have to borrow from near by bit like 394 - 259 a borrow is needed ! critical point 2 )

5) Good Luck !

Explanation / Answer

For instance, in i), 3 decimal digits -> 10^3 = 1000 possible numbers so you have to find the lowest power of 2 that is higher than 1000, which in this case is 2^10 = 1024 (10 bits).

here i want to explain you clearly with N digit

For a binary number of n digits the maximum decimal value it can hold will be

2^n - 1, and 2^n is the total permutations that can be generated using these many digits.

Taking a case where you only want three digits, ie your case 1. We see that the requirements is,

2^n - 1 >= 999

Applying log to both sides,

log(2^n - 1) >= log(999)

log(2^n) - log(1) >= log(999)

n = 9.964 (approx).

Taking the ceil value of n since 9.964 can't be a valid number of digits, we get n = 10.

so by using the above program we can do any digit adder subtractor

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote