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

  • Thread starter Thread starter Tek1Atom
  • Start date Start date
  • Tags Tags
    Digital Error
Click For Summary

Discussion Overview

The discussion revolves around the "2 in 5" digital error detection code, focusing on its ability to detect single and some double bit errors in a 5-bit coding system for representing decimal digits. Participants explore the mechanics of the code and provide examples to illustrate its effectiveness and limitations.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant explains that a "2 in 5" code can detect all single bit errors but only some double errors, providing examples of 5-bit codes for decimal digits.
  • Another participant suggests that a clearer explanation of what a "2 in 5" error detection code entails would be beneficial.
  • One participant outlines the method of using "m out of n" codes, emphasizing the need for counting bits set to 1 to identify errors, and provides a table of valid codewords for the "2 in 5" code.
  • A later reply questions the terminology used in the previous post regarding the labeling of example words and the conditions for error detection.
  • There is a mention of combinatorial calculations (5C2) related to setting bits in the code, although its relevance to the original question is unclear to some participants.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the clarity of the explanation regarding the "2 in 5" code and its application. There are multiple viewpoints on how to effectively communicate the concepts involved, and some confusion remains about the terminology and its implications.

Contextual Notes

Some participants express uncertainty about the connection between the provided examples and the original homework question, indicating potential gaps in understanding the application of the "2 in 5" code.

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

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
31
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 17 ·
Replies
17
Views
6K
  • · Replies 2 ·
Replies
2
Views
759