From f2ec843dae81461a4b490a8a3bfd4fecc4b6bf0b Mon Sep 17 00:00:00 2001 From: Daniel Webber Date: Tue, 22 Aug 2023 19:56:37 +0800 Subject: [PATCH] Fix graph missing problem in blog --- docs/blog/posts/binary-to-gray-code.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/blog/posts/binary-to-gray-code.md b/docs/blog/posts/binary-to-gray-code.md index 506d315..35bd04f 100644 --- a/docs/blog/posts/binary-to-gray-code.md +++ b/docs/blog/posts/binary-to-gray-code.md @@ -29,13 +29,13 @@ In short, the advantage of Gray code is that juts one bit changes for each step. 1. The Most Significant Bit (MSB) of the gray code is always equal to the MSB of the given binary code. 2. Other bits of the output gray code can be obtained by XORing binary code bit at that index and previous index. -

+

### Gray code to Binary Conversion 1. The Most Significant Bit (MSB) of the binary code is always equal to the MSB of the given gray code. 2. Other bits of the output binary code can be obtained by checking the gray code bit at that index. If the current gray code bit is 0, then copy the previous binary code bit, else copy the invert of the previous binary code bit. -

+

## Acknowledgement - [**The definition of Gray Code on Wikipedia**](https://en.wikipedia.org/wiki/Gray_code)