Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ECE 271  Introduction to Digital Circuits and Systems

HW #5

1.)   In computers, we call it a shift leftwhen data moves leftward in the binary number (i.e. the 1’s place goes to

the 2 ’s place, the 2 ’s place to the 4’s place, and so on).  A shift rightmoves rightward in the binary number.

Shifts also differ on what the shift-in value is (on a shift left, what goes into the rightmost bit position?  On a shift right, what goes into the leftmost bit position?).  Computers have three major types of shifts, based on how they fill that position:  Logical shift (shift in a 0), Arithmetic shift (compute Val*2 for left shift, val/2 with sign extension for right), and Circular shift (the bit shifted out one side is shifted back in the other side).  Develop a single, 4-bit shift register that can implement all of these shifts, as well as a parallel load.  Use the following control line settings:

C1  C0

 

 

0     0

0

Hold

0     0

1

Load Parallel

0     1

0

Logical right

0     1

1

Logical left

1     0

0

Arithmetic right

1     0

1

Arithmetic left

1     1

0

Circular right

1     1

1

Circular left

2.)   In class, we showed how shift registers can transfer information between chips on a single wire.  It requires the

sender to do the operation sequence Load, Shift, Shift, Shift” and repeat, while the receiver always shifts, but reads the values every 4 cycles (cycle 5, 9, 13, etc).  Imagine the designers use the same exact hardware, but make the modifications listed below.  What data will be seen on the receiving end?  List exactly which source bits appear, in what bit positions, on the receiving side.

a.)   Sender does Load, Shift, Shiftand repeat (missing one needed shift).  Receiver reads the values every 3

cycles (cycles 4, 7, 10, 13, etc.).

b.)   Sender does Load,  Shift,  Shift,  Shift,  Shiftand repeat (adding one needed shift).   Receiver reads the

values every 5 cycles (cycles 6, 11, 16, …).

3.)   Build a 4-bit counter that can do the following.  Your diagram can use any basic gates, DFFs, and Muxes:

C2

C1

C0

Action

0

0

0

Reset (output = 0)

0

0

1

Up-count

0

1

0

Down-count

0

1

1

Up-by-two (+2 to current value.  If value too large to hold, value = value – 16)

1

0

0

Up-by-four (+4 to current value.  If value too large to hold, value = value – 16)

1

0

1

Set all output bits to 1

1

1

0

Parallel Load

1

1

1

Parallel Load