hmwk7-sols - 194 Solutions Manual Introduction to Digital...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 194 Solutions Manual - Introduction to Digital Design - November 15, 2000 Exercise 10.4 BCD Addition When we add two BCD digits (0..9), considering a carry-in bit, the range of values obtained is from 0 to 19. The output consists of a carry out and a digit coded in BCD also. s = (a + b + CIN ) mod 10 ( 1 if (a + b + C COU T = 0 if otherwise IN ) 10 where s; a and b are BCD digits. When the integers a and b are applied to the inputs of the binary adder, the output is: z = (a + b + CIN ) mod 24 ( 4 1 if (a + b + C C0 = 0 if otherwise IN ) 2 So, looking at the binary adder output and comparing to the expected output for the BCD adder, we must consider three cases: (i) C0 = 0 and z < 10: the output of the binary adder does not need correction (ii) 10 z 15 and C0 = 0: in this case we convert the sum as follows: s = z mod 10 = (z ? 10) = (z + 6) mod 16 As the operation is done with 4 bits, adding 6 is equivalent to subtracting 10. COU T = 1 (iii) C0 = 1: in this case z = (A + B + Cin ) ? 16 and we want s = (A + B + Cin ) mod 10. For this range of values we have (A + B + Cin ) mod 10 = (A + B + Cin ) ? 10, so we make: s = z+6 COU T = 1 Therefore, to obtain the BCD adder, the following operations must be performed to the binary adder output (z ): ( if z C =0 s = zz + 6) mod 16 if 10 9zand15 0or C = 1 ( 0 C = COU T = 0 if z 9 and C 0 = 10 1 if z 10 or 0 The condition z 10 or C0 = 1 is described by the switching expression: ( w = (z1z3 + z2z3 + C0) The circuit is shown in Figure 10.2. Solutions Manual - Introduction to Digital Design - November 15, 2000 195 _ a _ b Binary Adder cin =0 0 0 Binary Adder 0 Cout _ s Figure 10.2: BCD adder (Exercise 10.4) ...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern