Help, 2 in 5 digital error detecting question (M in N)

  • Thread starter Thread starter Tek1Atom
  • Start date Start date
  • Tags Tags
    Digital Error
AI Thread Summary
The "2 in 5" error detection code can identify all single-bit errors but only some double-bit errors in a 5-bit coding system. For example, the codeword "10101" can detect two errors, while "01111" cannot. The method relies on counting the number of bits set to 1, with valid codewords having exactly two bits set. The discussion also emphasizes the importance of understanding how "m out of n" codes function in digital design. Overall, the "2 in 5" code is a practical approach for error detection in binary systems.
Tek1Atom
Messages
15
Reaction score
0
Help, "2 in 5" digital error detecting question (M in N)

Homework Statement



Explain how a "2 in 5" code can detect all single bit errors but only some double errors in the 5-bit coding of a single digit.

give an example where, in one 5-bit code of a single decimal digit

a) Two errors can be detected
b) Two errors cannot be detected

Homework Equations



"m in n" error detection codes in Digital Design

The Attempt at a Solution



if 4 bits are set to 1 and in the total 5 bits, than this can cause confusion when processing.

a) 10101
b) 01111
 
Physics news on Phys.org


Might help to tell us what a "2 in 5" error detection code is...
 


" m out of n " codes

An alternative method of detecting errors is to use an " m out of n " code where n represents the total number of bits in a binary word, of which m must be set to.

1. if more or less than n bits are set to 1 then errors are present. The error detection circuitry has to count the number of bits set to 1 in a word and compare it with m. This is a relatively simple operation.

e.g.

devise a " 2 in 5 " code to represent the decimal digits 0 to 9. Each codeword must have 2 bits set and be 5 bits long. Valid codewords can be identified by counting in pure binary and using only those words that have 2 bits set.

Count | Action
00000 | Ignore
00001 | Ignore
00010 | Ignore
00011 | Valid code equivalent to 0 (decimal)
00100 | Ignore
00101 | Valid code equivalent to 1 (decimal)

Solution

The full code is

"2 in 5"| Decimal
00011 | 0
00101 | 1
00110 | 2
01001 | 3
01010 | 4
01100 | 5
10001 | 6
10010 | 7
10100 | 8
11000 | 9

________________________________________________________________
Information Source: Digital Logic Techniques by T.J. Stonham (Third Edition)
 


Any ideas Mark44?
 


Tek1Atom said:
" m out of n " codes

An alternative method of detecting errors is to use an " m out of n " code where n represents the total number of bits in a binary word, of which m must be set to.

1. if more or less than n bits are set to 1 then errors are present. The error detection circuitry has to count the number of bits set to 1 in a word and compare it with m. This is a relatively simple operation.
In the above, I think you mean "if more or less than m bits are set to 1". You can't have more than n bits in a word of n bits.
Tek1Atom said:
e.g.

devise a " 2 in 5 " code to represent the decimal digits 0 to 9. Each codeword must have 2 bits set and be 5 bits long. Valid codewords can be identified by counting in pure binary and using only those words that have 2 bits set.

Count | Action
00000 | Ignore
00001 | Ignore
00010 | Ignore
00011 | Valid code equivalent to 0 (decimal)
00100 | Ignore
00101 | Valid code equivalent to 1 (decimal)
Why is the first column labelled Count? Aren't these just example words?
Tek1Atom said:
Solution

The full code is

"2 in 5"| Decimal
00011 | 0
00101 | 1
00110 | 2
01001 | 3
01010 | 4
01100 | 5
10001 | 6
10010 | 7
10100 | 8
11000 | 9

________________________________________________________________
Information Source: Digital Logic Techniques by T.J. Stonham (Third Edition)

There are 5C2 (5 choose 2) ways of setting exactly two bits in a 5-bit word. 5C2 = 5!/(3! * 2!).

I don't know if this is much help, but that's all I can think of. I don't understand how this ties into what you're being asked in the first post.
 

Similar threads

Back
Top