Find (a) the excess-3 equivalent of (237.75)10 and (b) the decimal equivalent of the excess-3

Find (a) the excess-3 equivalent of (237.75)10 and (b) the decimal equivalent of the excess-3 number110010100011.01110101.Find (a) the Gray code equivalent of decimal 13 and (b) the binary equivalent of Gray code number1111.Given the sequence of three-bit Gray code as (000, 001, 011, 010, 110, 111, 101, 100), write the nextthree numbers in the four-bit Gray code sequence after 0101.

The Correct Answer and Explanation is :

Problem 1: Excess-3 Representation

(a) The Excess-3 equivalent of (237.75)₁₀

Excess-3 is a binary-coded decimal (BCD) representation in which each decimal digit is represented by its 4-bit binary equivalent, plus an offset of 3. To convert 237.75 to excess-3:

  1. Convert each digit of the number to binary and add 3:
  • For the digit 2: Convert to binary = 0010, then add 3 (0011), resulting in 0101.
  • For the digit 3: Convert to binary = 0011, then add 3 (0110), resulting in 0111.
  • For the digit 7: Convert to binary = 0111, then add 3 (0110), resulting in 1110.

For the fractional part:

  • For 7: Convert to binary = 0111, then add 3 (0011), resulting in 0100.

Thus, the excess-3 equivalent of (237.75)₁₀ is (0101 0111 1110.0100)₋₃.

(b) The Decimal Equivalent of Excess-3 Number 110010100011.01110101

To convert an excess-3 number back to decimal, subtract 3 from each 4-bit group and then convert to decimal:

  1. 1100 (excess-3 group) → Subtract 0011 → 1001 (decimal 9)
  2. 1010 (excess-3 group) → Subtract 0011 → 0111 (decimal 7)
  3. 0011 (excess-3 group) → Subtract 0011 → 0000 (decimal 0)

For the fractional part:

  1. 0111 (excess-3 group) → Subtract 0011 → 0100 (decimal 4)
  2. 0101 (excess-3 group) → Subtract 0011 → 0010 (decimal 2)

Thus, the decimal equivalent of 110010100011.01110101 is (970.42)₁₀.


Problem 2: Gray Code and Binary Conversion

(a) The Gray Code Equivalent of Decimal 13

Gray code is a binary numeral system where two successive values differ in only one bit. To convert decimal to Gray code, follow these steps:

  1. Convert 13 to binary: 1101.
  2. The most significant bit (MSB) of Gray code is the same as the binary MSB: 1.
  3. For the next bits, perform XOR between successive binary digits:
  • XOR(1, 1) = 0
  • XOR(1, 0) = 1
  • XOR(0, 1) = 1
  • XOR(1, 0) = 1

Thus, the Gray code equivalent of decimal 13 is 1011.

(b) The Binary Equivalent of Gray Code Number 1111

To convert Gray code back to binary, follow the steps:

  1. The most significant bit (MSB) of the binary is the same as the MSB of Gray code: 1.
  2. XOR the next Gray code bits with the previous binary bits to find the binary:
  • XOR(1, 1) = 0
  • XOR(0, 1) = 1
  • XOR(1, 1) = 0
  • XOR(0, 1) = 1

Thus, the binary equivalent of Gray code 1111 is 1010.


Problem 3: Four-bit Gray Code Sequence

The three-bit Gray code sequence given is:

  • (000, 001, 011, 010, 110, 111, 101, 100)

Now, to find the next three numbers in the four-bit Gray code sequence after 0101:

  1. The Gray code sequence is generated by reflecting the previous sequence and prepending 0 to the original sequence and 1 to the reflected sequence.

The next Gray code numbers after 0101 (considering four bits) are:

  • 0100
  • 0110
  • 0111

Thus, the next three Gray code numbers after 0101 in the four-bit Gray code sequence are 0100, 0110, and 0111.


Explanation

Excess-3 Code: This is used for BCD encoding, where each digit is shifted by an offset of 3. This can prevent certain errors and is used in systems like calculators and digital clocks.

Gray Code: Gray code is crucial in digital electronics because it minimizes errors when transitioning from one number to another. This is especially important in analog-to-digital and digital-to-analog conversions, as it ensures that only one bit changes at a time, reducing the likelihood of errors.

By following systematic steps, we can easily convert between decimal, excess-3, binary, and Gray codes.

Scroll to Top