{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ex4ans - The Chinese University of Hong Kong Department of...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
The Chinese University of Hong Kong Department of Computer Science and Engineering ERG2020A (Fall 2007): Revision Exercise #4 Suggested Solution 1. (4-20) A serial two’s complementer is to be designed. A binary integer of arbitrary length is presented to the serial two’s complementer least significant bit first on input X. When a given bit is presented on input X, the corresponding output bit is to appear during the same clock cycle on output Z. To indicate that a sequence is complete and that the circuit is to be initialized to receive another sequence, input Y becomes 1 for one clock cycle. Otherwise, Y is 0. (a) Find the state diagram for the serial two’s complementer. Assume Z goes 0 while Y = 1. 1 0 10/1 X1/X 10/0 00/1 00/0 X1/X XY/Z (b) Find the state table for the serial two’s complementer. Present State Inputs Next State Output Flip-Flops inputs Q’ X Y Q Z D J K 0 0 0 0 1 0 0 X 0 0 1 1 X 1 1 X 0 1 0 0 0 0 0 X 0 1 1 1 X 1 1 X 1 0 0 1 0 1 X 0 1 0 1 1 X 1 X 0 1 1 0 0 1 0 X 1 1 1 1 1 X 1 X 0 (You should also give both the implementations in D FFs and JK FFs. State tables and logic diagrams must all be shown.) [20 pts] Using D Flip-Flops, give following K-maps 1 1 Q’ X Y 1 1 1 D = Y + Q X 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Using JK Flip-Flops, give following K-maps J K Q’ X Y 1 X X X X 1 Q’ X Y 1 X X X X J = Y K = X Y Z Q’ X Y 1 X X X X 1 Z = X Q + XQ = X Q 2
Image of page 2
Logic Diagram using D Flip-Flops D Q Q Q Q’ Y X CLK Z Logic Diagram using JK Flip-Flops J Q Q K Y X Q Q’ Z CLK 2. Implement a pattern recognizer for the pattern: 110011 by D FFs. [15 pts] 000 001 010 011 100 101 0/0 1/0 1/0 1/0 0/0 0/0 1/0 1/1 0/0 0/0 1/0 0/0 3
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Present State Input Next State Output A B C X A B C Z 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 0 0 X X X X 1 1 0 1 X X X X 1 1 1 0 X X X X 1 1 1 1 X X X X D A D B D C B A X C X X X X 1 1 B A X C X X X X 1 1 1 1 B A X C X X X X 1 1 1 1 D A = A CX + BC X D B = B C + BCX D C = B C X + B CX + BCX = B ( C X ) + B CX Z = A BCX 4
Image of page 4
D Q Q D Q Q D Q Q A B C Z A B C CLK X 3. Design a counter which counts in the sequence 0, 2, 1, 3 and repeats.
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the 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