Unit-4 DC Notes
Unit-4 DC Notes
P1 b3 b5 b7 b9 b11
To find P1
1 1 0 1 0 1
P2 b3 b6 b7 b10 b11
To find P2
0 1 1 1 0 1
P4 b5 b6 b7
To find P4
0 0 1 1
P8 b9 b10 b11
To find P8
1 0 0 1
The hamming code inserted is P8P4P2P1: 1001
The transmitted data is: 10011100101
At the receiver side, let the data received is 10111100101.
Bit positions 11 10 9 8 7 6 5 4 3 2 1
Bit number b11 b10 b9 P8 b7 b6 b5 P4 b3 P2 P1
Received Data 1 0 1 1 1 1 0 0 1 0 1
Check for the even parity for all parity bits for the received data:
Parity
P1 b3 b5 b7 b9 b11
For P1 value
1 1 0 1 1 1 1
P2 b3 b6 b7 b10 b11
For P2
0 1 1 1 0 1 0
P4 b5 b6 b7
For P4
0 0 1 1 0
To find P8 b9 b10 b11
P8 1 1 0 1 1
The parity value P8P4P2P1: 1001 indicates that the received data contains error in position 9
i.e., b9.
So, the data in position 9 is modified and sent to the destination as 1001101.
Features of Hamming Code
Error Detection and Correction: Hamming code is designed to detect and correct
single-bit errors that may occur during the transmission of data. This ensures that the
recipient receives the same data that was transmitted by the sender.
Redundancy: Hamming code uses redundant bits to add additional information to the
data being transmitted. This redundancy allows the recipient to detect and correct errors
that may have occurred during transmission.
Efficiency: Hamming code is a relatively simple and efficient error-correction
technique that does not require a lot of computational resources. This makes it ideal for
use in low-power and low-bandwidth communication networks.
Widely Used: Hamming code is a widely used error-correction technique and is used
in a variety of applications, including telecommunications, computer networks, and
data storage systems.
Single Error Correction: Hamming code is capable of correcting a single-bit error,
which makes it ideal for use in applications where errors are likely to occur due to
external factors such as electromagnetic interference.
Limited Multiple Error Correction: Hamming code can only correct a limited
number of multiple errors. In applications where multiple errors are likely to occur,
more advanced error-correction techniques may be required.
Character Synchronization:
Character synchronization involves identifying the beginning and end of a character
within a message. In data communications circuits, there are two formats commonly used to
achieve character synchronization: asynchronous and synchronous.
Asynchronous Character Synchronization:
Asynchronous data transmission is sometimes called start-stop transmission because
each data character is framed between start and stop bits. The start and stop bits identify the
beginning and end of the character, so the time gaps between characters do not present a
problem. For asynchronously transmitted serial data, framing characters individually with start
and stop bits is sometimes said to occur on a character-by-character basis.
The first bit transmitted is the start bit, which is always a logic 0, because an idle line
condition (no data transmission) on a data communications circuit is identified by the
transmission of continuous logic 1s (called idle line 1s). The character bits are transmitted next,
beginning with the LSB and ending with the MSB. The data character can contain between five
and eight bits. The parity bit (if used) is transmitted directly after the MSB of the character.
The last bit transmitted is the stop bit, which is always a logic 1, which guarantees a high-to-
low transition at the beginning of each character and there can be either one, one and a half, or
two stop bits. Therefore, a data character may be comprised of between seven and 11 bits.
It is not necessary that the transmit and receive clocks be continuously synchronized;
but their frequencies should be close, and they should be synchronized at the beginning of each
character. When the transmit and receive clocks are substantially different, a condition called
clock slippage may occur. If the transmit clock is substantially lower than the receive clock,
under-slipping occurs. If the transmit clock is substantially higher than the receive clock, a
condition called over-slipping occurs. This is used for transmitting shorter messages.
Example: For the following sequence of bits, identify the ASCII-encoded character, the start
and stop bits, and the parity bits (assume even parity and two stop bits):
Sol:
Synchronous Character Synchronization:
It involves transporting serial data at relatively high speeds in groups of characters called
blocks or frames. A message is composed or formulated and then the entire message is
transmitted as a single entity with no time lapses between characters. In this a SYN character
is transmitted at the beginning of each message. The SYN character is 16 hex in ASCII code.
Once the receiver detects one or more SYN characters, the receiver clocks in the next eight bits
and interprets them as the first character of the message. The receiver continues clocking in
bits, interpreting them in groups of eight until it receives another unique character that signifies
the end of the message. The end-of-message character varies with the type of protocol being
used and what type of message it is associated with. With synchronous data, the transmit and
receive clocks must be synchronized because character synchronization occurs only once at the
beginning of a message. So, this is used for transmitting long messages.
Example: For the following string of ASCII-encoded characters, identify each character
(assume odd parity):
Sol: