11 from Decimal to Gray Code
Converting a decimal number to Gray code involves converting the decimal number to binary first, then performing a binary-to-Gray-code conversion. Here's a step-by-step guide with an example for decimal number 11:
Convert the decimal number 11 to binary:
1110 = 10112
Step-by-step converting 11 from decimal to binary
Write down the first bit of the Gray code as the same as the first bit of the binary number.
FIRST BIT OF GRAY CODE: 1
The 1st bit is 1, and the 2nd bit is 0. Both the bits are different, so the second bit of the Gray code is 1.
The 2nd bit is 0, and the 3rd bit is 1. Both the bits are different, so the third bit of the Gray code is 1.
The 3rd bit is 1, and the 4th bit is 1. These bits are the same, so the fourth bit of the Gray code is 0.