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

a) Construct a 4-bit up/down counter that uses a Gray-code counting sequence b)

ID: 3758048 • Letter: A

Question

a) Construct a 4-bit up/down counter that uses a Gray-code counting sequence

b) Repeat Problem 6-9 by comparing the numbers of changing inputs and
outputs on the Gray-code counter to a 4-bit regular synchronous binary
counter and a 4-bit ripple counter.

Problem 6-9) For the CMOS logic family, the power consumption is proportional to the
sum of the changes from 1-to-0 and 0-to-1 on all gate inputs and outputs in
the circuit. When designing counters in very low-power circuits, ripple
counters are preferred over regular synchronous binary counters.
Carefully count the numbers of changing inputs and outputs, including
those related to the clock for a complete cycle of values in a 4-bit ripple
counter versus a regular synchronous counter of the same length. Based on
this examination, explain why the ripple counter is superior in terms of
power consumption.

Explanation / Answer

The problem with natural binary codes is that, with physical, mechanical switches, it is very unlikely that switches will change states exactly in synchrony. In the transition between the two states shown above, all three switches change state. In the brief period while all are changing, the switches will read some spurious position. Even without keybounce, the transition might look like 011 — 001 — 101 — 100. When the switches appear to be in position 001, the observer cannot tell if that is the "real" position 001, or a transitional state between two other positions. If the output feeds into a sequential system, possibly via combinational logic, then the sequential system may store a false value.

The reflected binary code solves this problem by changing only one switch at a time, so there is never any ambiguity of position,

Decimal Binary Gray Gray as Decimal 0 000 000 0 1 001 001 1 2 010 011 3 3 011 010 2 4 100 110 6 5 101 111 7 6 110 101 5 7 111 100 4