You are on page 1of 1

ECE 1552 – Summer 2020

Homework 4:
Solve all questions. HW is to be turned in as a PDF or word document on canvas. Show all
working. Answers provided should be typed or written CLEARLY.
1: Design a sequential circuit with two D flip-Flops A and B and one input X. When X = 0, the state of the circuit
remains the same. When X = 1, the circuit goes through the state transitions from 00 to 10 to 11 to 01, back to
00, and then repeats.

2: A serial odd parity generator is to be designed. A binary sequence of arbitrary length is presented to the parity
generator on input X. When a given bit is presented on input X, the corresponding odd parity bit for the binary
sequence 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.
Derive the State diagram and state table.

3: Use D-type flip-flops and gates to design a counter with the following
repeated binary sequence: 0, 2, 1, 3, 4, 6, 5, 7.

4: Represent the following conditional control statement by two register


transfer statements with control functions:
If (X = 1) then (R1<-R2) else if (Y = 1) then (R1<-R3 + R4)

5: The content of a 4-bit register is initially 0101. The register is shifted eight
times to the right, with the sequence 10110001 as the serial input. The
leftmost bit of the sequence is applied first. What is the content of the register
after each shift?

6: Write a C++ program (submit a CPP file or link to C++ shell URL) that implements the solution to question 2.

You might also like