![Page 1: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/1.jpg)
Digital Logic Design
![Page 2: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/2.jpg)
Example 1
• Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation with value 1 when the inputs are any one of the six unused bit combinations in the BCD code, and value 0 otherwise. Based on your equation, implement it with only NAND gates.
![Page 3: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/3.jpg)
solution
E = AB + AC.
![Page 4: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/4.jpg)
Implementation
NAND
![Page 5: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/5.jpg)
Example 2show how to build a 3- bit synchronous shift register using three positive edge-triggered D flip-flops and three 4-to-1 multiplexers. To apply a constant (e.g., 0 or 1) at any input, simply write the value of the constant at the input. The shift register has two control inputs Sh1 and Sh0, three data inputs D2, D1, and D0, and three data outputs Q2, Q1, and Q0. Sh1and Sh0 specify the operations of the shift register as shown in the table below. With the rotate left operation (Sh1=1, Sh0=0), all of the bits get shifted one position to the left, and Q0 gets the value of Q2. All operations must occur at the rising edge of the CLK.
![Page 6: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/6.jpg)
Solution
![Page 7: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/7.jpg)
Example 3
• Draw the state diagram of Moore FSM that does the following:
• It has one serial input, X, and two serial outputs, Y and Z. – Y is one if the total number of zeros received
at the input since reset is odd. – Z is one if the total number of zeros received
at the input since reset is a multiple of three (i.e., 0, 3, 6, 9, etc.).
![Page 8: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/8.jpg)
SOLUTION
S0 S1
S2
S3S4
S5
0/10
0/00
0/11
0/00
0/10
0/01
X/YZ
![Page 9: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/9.jpg)
Example 4
• Design a FSM circuit that is activated on a “START” signal and outputs a signal “PULSE” on a regular interval as described below.– The circuit cycles through 16 clock cycle
periods (0 through 15 cycles) and asserts “PULSE” on clock cycles 1, 7, 8, 15.
use counter, decoder, and any extra logic
![Page 10: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/10.jpg)
Solution• state diagram
– Start signal =>S – Pulse signal=> P
S0
S=1/P=1S1
S=x/P=0S2
S=x/P=0S3
S=x/P=0S4
S=x/P=0S5
S=x/P=0
S6
S=x/P=1S7
S=x/P=1S8
S=x/P=1S9
S=x/P=0S10
S=x/P=0S11
S=x/P=0
S12S=x/P=0
S13S=x/P=0S14S=x/P=1S15
S=x/P=0
S=0/P=0
We have 16 states how many binary bits will represent that?
![Page 11: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/11.jpg)
State table
![Page 12: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/12.jpg)
Our system now
0
1
2
15
![Page 13: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/13.jpg)
Example 5
• Design a state diagram for a recognizer that recognizes an input sequence 11101. It has an input X and output Y. The recognizer sets the output to 1 (Y = 1) if the last five values on the input X were 11101.
![Page 14: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/14.jpg)
state diagram
S0 S1
S2
S3S4
S5
1/01/0
1/0
0/0
1/1
0/0
0/0
0/0
1/00/0
![Page 15: Digital Logic Design. Example 1 Find a function to detect an error in the representation of a decimal digit in BCD. In other words, write an equation](https://reader036.vdocuments.us/reader036/viewer/2022082123/56649f465503460f94c6897e/html5/thumbnails/15.jpg)
State table