## Description

**Lab ****4 Parity Generator and Checker for Error Detection**

**Introduction**

The parity generating and checking technique is widely used in error detection for data transmission. Binary data may be subjected to noise so that such noise can alter 0s to 1s and 1s to 0s. A parity bit is an extra bit added to a binary message in order to make number of 1s either even or odd. The message, including the parity bit, is transmitted and then checked at the receiving end for errors. An error is detected if the checked parity does not correspond with the one transmitted. The circuit that generates the parity bit in the transmitter is called a parity generator. The circuit that checks the parity in the receiver is called a parity checker.

**Experimental Equipment List**:

Two 74**86** (Quad 2-input XOR gate) chips

**Odd Parity Bit Generator**

The first circuit to build is a 3-bit odd parity generator. The parity generator circuit will take 3 input bits, x, y, and z, and produce one output bit, P.

- Obtain the truth table for a 3-bit odd parity generator function P

x y z | P |

0 0 0 | 1 |

0 0 1 | 0 |

0 1 0 | 0 |

0 1 1 | 1 |

1 0 0 | 0 |

1 0 1 | 1 |

1 1 0 | 1 |

1 1 1 | 0 |

- Derive the Boolean function for P using
**XOR operation**.

P = (X⊕Y⊕Z)’

- Draw the logic diagram using
__XOR gates only__**.**

- Circuit Construction on Tinkercad (
**DO NOT tear down**the circuit after you finished this step.)

Based on the above diagram, build an odd parity generator using **one 7486 chip only**. **You cannot use inverters.** Use 3 switches to supply all three input logic levels x, y and z, and a LED to provide the parity output.

- Make a copy of the starter kit from https://www.tinkercad.com/things/50ODX3g29Cl

and rename the copy as “Lab 4 Parity Generator and Checker” on Tinkercad Circuits dashboard.

**On the left breadboard**, connect the XOR gates according to the logic diagram obtained in 2(c).- Connect the inputs (x, y, z) to three switches, and the output P to a LED.
- Press “Start Simulation”
- Apply all eight combinations of logic LOW and HIGH levels to the inputs using the 3 switches and observe the output if the circuit generates parity bits correctly.

https://www.tinkercad.com/things/jJV5FJYsCiz-csc347-lab-4-parity-generator-and-checker-pt-1/editel?sharecode=Ms_NKNwfTDooUBfg90LPjgYQvRVe7xsFgSbC534-AgQ

**Odd Parity Bit Checker**

The parity checker circuit takes 4 input bits, x, y, z, and P, and produce one output error bit E. E = 0 if no error and E = 1 otherwise.

(a) Obtain the truth table for a 4-bit odd parity checker function E

x y z P | E |

0 0 0 0 | 1 |

0 0 0 1 | 0 |

0 0 1 0 | 0 |

0 0 1 1 | 1 |

0 1 0 0 | 0 |

0 1 0 1 | 1 |

0 1 1 0 | 1 |

0 1 1 1 | 0 |

x y z P | E |

1 0 0 0 | 0 |

1 0 0 1 | 1 |

1 0 1 0 | 1 |

1 0 1 1 | 0 |

1 1 0 0 | 1 |

1 1 0 1 | 0 |

1 1 1 0 | 0 |

1 1 1 1 | 1 |

(b) Derive the Boolean function for E using **XOR operation only**.

E = (X⊕Y⊕Z⊕P)’

- Draw the logic diagram
.__using XOR gates only__

- Circuit construction on Tinkercad (
**DO NOT tear down**the circuit after you finished this step.)

Build an odd parity checker using **another 7486 XOR chip**. **You cannot use inverters.** Use four switches for x, y, z, P on the right breadboard, and a LED for the error output E.

**On the right breadboard**, connect the XOR gates according to the logic diagram in 3(c).- Connect the inputs (x, y, z, P) to four switches on the breadboard, and the output E to a LED.
- Press “Start Simulation”
- Apply all 16 combinations of logic LOW and HIGH levels to the inputs using the 4 switches and observe the output if the parity checker works correctly.

__ __

__Take a screenshot of your circuit for submission later.__

https://www.tinkercad.com/things/dAlAftMLTE7-csc347-lab-4-parity-generator-and-checker-pt-2/editel?sharecode=EGSheR_BL9-IiQRMB-ySo7r1bQFPszMMHoO_C0L5A10

**Connect your odd parity generator to your parity checker**

**On the right breadboard**,**remove the 4 wires (x, y, z, P) from the switches, and reconnect them to the (x, y, z, P) on the bottom breadboard**.- Apply all 8 combinations of logic LOW and HIGH levels to the inputs using the 3 switches on the left bread board and observe the output E.
__What is the value of E for each input combination? Why?__ - Turn on the red switch on the bottom breadboard, then apply all 8 combinations of logic LOW and HIGH levels to the inputs using the 3 switches on the left bread board and observe the output E.
__What is the value of E for each input combination? Why?__

__Take a screenshot of your circuit for submission later.__

https://www.tinkercad.com/things/60MTD3yI5IC-copy-of-csc347-lab-4-parity-generator-and-checker-pt-2/editel?sharecode=-4wbOZWv2FeAMHPAaWy2YQMNnwO-ZNXo0e5blsQg3ZE

- Homework: design and build a 4-bit even parity generator and the corresponding 5-bit even parity checker. For the 5-bit checker, you need 5 switches so replace the DIP switch with a larger one.

__Submission Instructions:__

__Lab work submission__

- Copy the link of your final circuit for sharing.
- On the Blackboard, click on Lab 4. Attach the 2 screenshots from Steps 4(e) and 5(d) and paste the link from Step 1 into the Comments area, then hit the Submit button.

__Lab report submission__

You do not need to write a lab report for this lab but do the homework and submit the screenshots and link to the Blackboard under Lab 4 report submission. It is due one week after the lab is done.