Skip to main content Accessibility help
Internet Explorer 11 is being discontinued by Microsoft in August 2021. If you have difficulties viewing the site on Internet Explorer 11 we recommend using a different browser such as Microsoft Edge, Google Chrome, Apple Safari or Mozilla Firefox.

Chapter 9: Combinational examples

Chapter 9: Combinational examples

pp. 199-218

Authors

, Stanford University, California, , Google Inc., New York, , University of British Columbia, Vancouver
Resources available Unlock the full potential of this textbook with additional resources. There are Instructor restricted resources available for this textbook. Explore resources
  • Add bookmark
  • Cite
  • Share

Summary

In this chapter we work through several examples of combinational circuits to reinforce the concepts in the preceding chapters. A multiple-of-3 circuit is another example of an iterative circuit. The tomorrow circuit from Section 1.4 is an example of a counter circuit with subcircuits for modularity. A priority arbiter is an example of a building-block circuit – built using design entities described in preceding chapters. Finally, a circuit designed to play tic-tac-toe gives a complex example combining many concepts.

MULTIPLE-OF-3 CIRCUIT

In this section we develop a circuit that determines whether an input number is a multiple of 3. We implement this function using an iterative circuit (like the magnitude comparator of Section 8.6). A block diagram of an iterative multiple-of-3 circuit is shown in Figure 9.1. Each stage performs, in binary, a step of long division of the input number by 3, passing along the remainder but discarding the quotient. The circuit checks the input number one bit at a time starting at the MSB. At each bit, we compute the remainder so far (0, 1, or 2). At the LSB we check whether the overall remainder is 0. Each bit cell takes the remainder so far to its left, and one bit of the input, and computes the remainder so far to its right.

The VHDL design entity for the bit cell of our iterative multiple-of-3 circuit is shown in Figure 9.2. The remainder in remin represents the remainder from the neighboring bit to the left, and hence has a weight of 2 relative to the current bit position. In our neighboring bit this signal represented a remainder of 0, 1, or 2. However, in the present bit, this value is shifted to the left by one bit and it represents a value of 0, 2, or 4. Hence we can concatenate remin with the current bit of the input, input, to form a three-bit binary number and then take the remainder (mod 3) of this number. A case statement is used to compute the new remainder.

About the book

Access options

Review the options below to login to check your access.

Purchase options

eTextbook
US$95.00
Hardback
US$95.00

Have an access code?

To redeem an access code, please log in with your personal login.

If you believe you should have access to this content, please contact your institutional librarian or consult our FAQ page for further information about accessing our content.

Also available to purchase from these educational ebook suppliers