Professional Documents
Culture Documents
Error Detecting Code (Parity Bit), Boolean Algebra and Logic Gates-JHN
Error Detecting Code (Parity Bit), Boolean Algebra and Logic Gates-JHN
Lecturer
❑ When numbers, letters, or words are represented by a special group of symbols, we say that they are
being encoded, and the group of symbols is called a code. Ex. Morse Code
❑ When a decimal number is represented by its equivalent binary number, we call it straight binary coding.
❑ If each digit of a decimal number is represented by its binary equivalent, the result is a code called binary-
coded-decimal (BCD).
➢ Since a decimal digit can be as large as 9, four bits are required to code each digit
(the binary code for 9 is 1001).
Detecting an Error:
➢ For instance, we wish to transmit the BCD code 0101. The total code transmitted, including the even
parity bit, is:
➢ Now let’s assume that an error occurs in the third bit from the left (the 1 becomes a 0).
✓ When this code is received, the parity check circuitry determines that there is only
a single 1 (odd number), when there should be an even number of 1s. Because
an even number of 1s does not appear in the code when it is received, an error is
indicated.
✓ An odd parity bit also provides in a similar manner for the detection of a single
error in a given group of bits.
❖ A parity bit provides for the detection of a single bit error but cannot check for two errors in one group.
Example: 1
Example: 2
❑ The inverter (NOT circuit) performs the operation called inversion or complementation. The inverter
changes one logic level to the opposite level. In terms of bits, it changes a 1 to a 0 and a 0 to a 1.
Inverter Truth Table Timing Diagrams
❑ An AND gate can have two or more inputs and performs what is known as logical/boolean multiplication.
❑ An AND gate produces a HIGH output only when all of the inputs are HIGH.
The OR Gate:
❑ An OR gate can have two or more inputs and performs what is known as logical/boolean addition.
❑ An OR gate produces a HIGH on the output when any of the inputs is HIGH.
Truth Table
Logic Expression
Truth Table
Logic Expression
➢ Logic Circuit: An electronic circuit used in computers to perform a logical operation (AND, OR, NOT, etc.,)
on its two or more input signals.
➢ Boolean algebra: A means for expressing the relationship between a logic circuit’s inputs and outputs. In
Boolean algebra there are only three basic operations: OR, AND, and NOT. These basic operations are
called logic operations.
➢ Digital circuits called logic gates can be constructed from diodes, transistors, and resistors connected so
that the circuit output is the result of a basic logic operation (OR, AND, NOT) performed on the inputs.
➢ A truth table is a means for describing how a logic circuit’s output depends on the logic levels present at the
circuit’s inputs.
✓ The number of input combinations will equal 2N for an N-input truth table.
➢ First Theorem: The complement of a product of variables is equal to the sum of the complements
of the variables.
➢ Second Theorem: The complement of a sum of variables is equal to the product of the complements of
the variables.
De Morgan’s theorem
1. Digital Systems Principles and Applications - Ronald J. Tocci (Section 2.4, 3.1 to 3.5, 3.10,
3.11, 4.6)
2. Digital Fundamentals - Thomas L. Floyd (Section 2.12, 3.1 to 3.6, 4.1 to 4.3)
** Example math from these sections