16QAM Bit Error Rate (BER) with Gray mapping

Let us derive the theoretical 16QAM bit error rate (BER) with Gray coded constellation mapping in additive white Gaussian noise conditions. Further, the Matlab/Octave simulation script can be used to confirm that the simulation is in good agreement with theory.

Continue reading “16QAM Bit Error Rate (BER) with Gray mapping”

Binary to Gray code for 16QAM

In the previous post on Binary to Gray code conversion for PSK, I had claimed that “for a general M-QAM modulation the binary to Gray code conversion is bit more complicated“. However following a closer look, I realize that this is not so complicated. 🙂

The QAM scenario can be treated as independent PAM modulation on I arm and Q-arm respectively. For example, let us consider 16-QAM scenario.

Continue reading “Binary to Gray code for 16QAM”

Gray code to Binary conversion for PSK and PAM

Given that we have discussed Binary to Gray code conversion, let us discuss the Gray to BInary conversion.

Conversion from Gray code to natural Binary

Let be the equivalent Gray code for an bit binary number with representing the index of the bit.

1. For ,

i.e, the most significant bit (MSB) of the Gray code is same as the MSB of original binary number.

2. For ,

i.e, bit of the Binary number is the exclusive-OR (XOR) of of the bit of the Gray code and of the bit of the binary number. Continue reading “Gray code to Binary conversion for PSK and PAM”

Binary to Gray code conversion for PSK and PAM

In this post, let us try to understand Gray codes and their usage in digital communication. Quoting from Wiki entry on Gray code [Gray-Wiki],

The reflected binary code, also known as Gray code after Frank Gray, is a binary numeral system where two successive values differ in only one digit.

In a digital communication system, if the constellation symbols are Gray encoded, then the bit pattern representing the adjacent constellation symbols differ by only one bit. We will show in another post that having this encoding structure gives a lesser probability of error than the ‘natural binary ordering’. However, in this post, let us try to figure out the conversion of natural binary representation to Gray code. Continue reading “Binary to Gray code conversion for PSK and PAM”