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

Lab #3 needs to be completed prior to lab session on lab day. Design a 2-digit B

ID: 3748094 • Letter: L

Question

Lab #3 needs to be completed prior to lab session on lab day. Design a 2-digit BCD (binary-coded decimal) adder, using a hierarchical approach. A BCD adder adds two 2-digit BCD numbers X and Y, and displays the sum as a 3-digit BCD number 91) and 1000 0101 (decimal 1X S X+Y. For example, when a user inputs 1001 0001 (decimal reading only. Pre-lab: P1. Review Section 3.7.3 and design a 1-digit BCD adder using output (176)= (1-01 11,0110)2. The underscore is used for ease of a. Inputs b. Outputs c. As explained in Section 3.7.3, when you add two BCD digits, a correction step is required if result is bigger than 9 (overflow, aka, out of range). Correction requires adding 6. For example if you add 5 and 7, then result should be 12. 01012 01112 1100 7 Since the result is greater than 9, we should add6 1100 2 is the corrected (least significant digit) result and the most significant digit will be 1 because there is an overflow 1 0010 If result is less than or equal to 9, then the correction step is not required and the most significant digit will be zero. dalezbus cade Handwrite a dataflow Verilog code for a 1-digit BCD adder by rewriting the code in Figure 3.40 sing the conditional operator. You do not need to design an adder by using gates. You must not copy the code in Figure 3.40 (p.176). You can, however, use it as reference./ Dataplow code d. i. Include Cin as an input, which serves as a carry-in. ii. If you do not know how to write the code by hand, do not open Vivado. Seek help from the instructor or TA. ili. Review your handwritten code and confirm that it makes sense to you. iv. Check for syntax errors. d simulate your code. Choose 8 random values for the inputs. Choose the most meaningful and convenient Radix for this lab. Draw a generic symbol for the 1-digit BCD adder. Use slash and a number to indicate vector (bus) size. f.

Explanation / Answer

value are correct the 3rd value is 159

4th is 90;

and 5th is 015

value of 1111 in bcd is not defined but its 15 if you table it normal casio cannot do that it is not programmed after number 10