Stay Tuned!

Subscribe to our newsletter to get our newest articles instantly!

What is & Queries

Why Gray Codes are used in K-MAP instead of Binary Code?

Gray Codes

Gray code belongs to a class of codes called minimum change code in which the only one-bit code group changes when going from one step to the next. This is an un-weighted code which means that there are no specific weights assigned to the bit positions.

Advantages of the Gray Code

In the Gray Code, if we go from one decimal number to next, only one bit of the Gray code changes. Because of this feature, an amount of switching is minimized and the reliability of the switching systems is improved.

Gray codes actually follow Adjacency property i.e between two successive gray codes there is only one-bit change and in the binary code, there will be multiple value changes.

Because of Adjancey property when one plots a K-MAP, literals can be grouped keeping other literal constant.For example: 00, 01, 11, 11 Like 01, 11

Read: What is Uniform Resource Locator?

Example of Binary to Gray code conversion.

Convert 1011 Binary to Gray1011 the binary value, there are two values MSB as well as LSB

[MSB] [1 from left] – 1011 – [LSB] [1 from right]

Rules to convert Binary to Gray code

  • Write MSB as it is.
  • Add MSB in a next and neglect carry if occurs.

Convert 1011 (Binary) to (Gray)

  • MSB is 1 and writes it as it is as 1.
  • Now add MSB [1] next to next value [0] and add both of them, if a carry occurs discard it.
  • Now follow the same way for all the numbers 0, 1 & 1.


About Author provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

Networking What is & Queries

What is Protocol, Syntax, Semantics and Timing in Networking?

  • July 18, 2019
Protocol, Syntax, Semantics and Timing in Networking? Protocol A protocol is a set of rules that govern data, communications. A
Types of Computers With Pictures
History of Computer What is & Queries

Types of Computers On the Basis of Size

  • July 18, 2019
There are different computers on the basis of size. There are other types of computers as well but for size-based,