You are on page 1of 9

HCMC University of Technology and Education

HCMC University of Technology


Faculty of Electrical & Electronics Engineering
Number andCodes
Systems and Education
Faculty of Electrical & Electronic Engineering

Lecture:
DIGITAL SYSTEMS
Chapter 1:
Number Systems and Codes

1
Assoc. Prof. Nguyen Thanh Hai
HCMC University of Technology and Education
Faculty of Electrical & Electronics Engineering
Number Systems and Codes
Parity Method for Error Detection
Today, in mostly all digital data transmission in digital systems from
one location to another is popular such as:
1. The transmission of digitized voice over a microwave link
2. The storage of data in and retrieval of data from external memory
devices such as magnetic tape and disk
3. The transmission of digital data from a computer to a remote
computer over telephone lines )i.e., using a modem). This is one of
the major ways od sending and receiving information on internet.
4. The transmission of digital data from a TV transmitter station to
home TVs
Example of noise
Transmitter Receiver
causing an error in the
transmission of digital
data Smooth Noisy
signal signal 2
Assoc. Prof. Nguyen Thanh Hai
HCMC University of Technology and Education
Faculty of Electrical & Electronics Engineering
Number Systems and Codes
The value of the parity bit is chosen so that the total number of 1s in
the code group, including the parity bit, is an even number.
EX: ASCII character “C” with code (1000011) of 7 bit. It is added a
parity 1 to be the total number of 1s an even number as follows:

EX: ASCII character “A” with code (1000001) of 7 bit. It is added a


parity 0 to be the total number of 1s an even number (01000001)
The value of the parity bit is chosen so that the total number of 1s in
the code group, including the parity bit, is an odd number.
EX: ASCII character “C” with code (1000011) of 7 bit. It is added a
parity 1 to be the total number of 1s an odd number (01000011), in
this case, the parity bit would be a 0.
3
Assoc. Prof. Nguyen Thanh Hai
HCMC University of Technology and Education
Faculty of Electrical & Electronics Engineering
Number Systems and Codes
EX: ASCII character “A” with code (1000001) of 7 bits. It is added a
parity 0 to be the total number of 1s an odd number (11000001).
Assume that data needed to be transmit is 8 bits as shown in Table, 1 bit
(1/0) is added to be 9 bits, examples are shown bellow

Byte with parity bit

8 bit data Even parity Odd Parity

00000000 000000000 000000001

10100001 101000011 101000010

11010001 110100010 110100011

11111111 111111110 111111111


4
Assoc. Prof. Nguyen Thanh Hai
HCMC University of Technology and Education
Faculty of Electrical & Electronics Engineering
Number Systems and Codes
Error detection
The parity bit is issued to detect an single-bit error that occurs during the
transmission of a code from one location to another, for example, a
computer transmits any data (“A”) and the even parity is being used.
EX: a computer is transmitting a message “HELLO” using the ASCII
code with the even parity. In this case, assume that Receiver receives
character “O” with 11011111 and the total bit is 7 bits of 1s, thus it is
wrong due to applying the even parity.

5
Assoc. Prof. Nguyen Thanh Hai
HCMC University of Technology and Education
Faculty of Electrical & Electronics Engineering
Number Systems and Codes
EX: Determine the name of one person with bytes shown in Hex
and represent transmitting data frames in two types of even and
odd parity bits
Example of finding name based on Hex code
No. Char Binary Even Odd Name
(Hex)
1 4A 01001010 1 1001010 0 1001010 J
2 6F 01101111 0 1101111 1 1101111 o
3 65 01100101 0 1100101 1 1100101 e
4 20 00100000 1 0100000 0 0100000 space
5 47 01000111 0 1000111 1 1000111 G
6 72 01110010 0 1110010 1 1110010 r
7 65 01100101 0 1100101 1 1100101 e
8 65 01100101 0 1100101 1 1100101 e
9 6E 01101110 1 1101110 0 1101110 n
6
Assoc. Prof. Nguyen Thanh Hai
HCMC University of Technology and Education
Faculty of Electrical & Electronics Engineering
Number Systems and Codes
Homework

7
Assoc. Prof. Nguyen Thanh Hai
HCMC University of Technology and Education
Faculty of Electrical & Electronics Engineering
Number Systems and Codes

8
Assoc. Prof. Nguyen Thanh Hai
HCMC University of Technology and Education
Faculty of Electrical & Electronics Engineering
Number Systems and Codes

The End

9
Assoc. Prof. Nguyen Thanh Hai

You might also like