Electrical Engineering XYZ MCQs
2-out-of-5 code is:
- Non-weighted code
- Weighted code
- Alphanumeric code
- Self-complementing code
Correct answer: 2. Weighted code
Explanation:
A two-out-of-five code is a constant-weight code that provides exactly ten possible combinations of two bits, and is thus used for representing the decimal digits using five bits. Each bit is assigned a weight, such that the set bits sum to the desired value, with an exception for zero.
According to Federal Standard 1037C:
- each decimal digit is represented by a binary numeral consisting of five bits of which two are of one kind, called ones, and three are of the other kind, called zeros, and
- the usual weights assigned to the bit positions are 0-1-2-3-6. However, in this scheme, zero is encoded as binary 01100; strictly speaking the 0-1-2-3-6 previously claimed is just a mnemonic device.
Source: Two-out-of-five code Article Wikipeda Shared Under Creative Commons Attribution-ShareAlike License 4.0