Example - Clock domain crossing scenarios, FIFO's are required. FIFO's read/write address counters are running from different clocks. In this scenario, we will need to exchange one clock domain counter value with another clock domain. In this scenario multiple bits toggling with binary counters can result in synchronization issues. So we convert binary counters to gray and then synchronize across clock domains. Check out Verilog code to implement Gray Encoding

Decimal to binary to gray codes from 0-100 are discussed below.

Binary to Gray **code** mapping for 0 to 10

# Decimal = 0 : Binary = 10'b0000000000 : Gray = 10'b0000000000

# Decimal = 1 : Binary = 10'b0000000001 : Gray = 10'b0000000001

# Decimal = 2 : Binary = 10'b0000000010 : Gray = 10'b0000000011

# Decimal = 3 : Binary = 10'b0000000011 : Gray = 10'b0000000010

# Decimal = 4 : Binary = 10'b0000000100 : Gray = 10'b0000000110

# Decimal = 5 : Binary = 10'b0000000101 : Gray = 10'b0000000111

# Decimal = 6 : Binary = 10'b0000000110 : Gray = 10'b0000000101

# Decimal = 7 : Binary = 10'b0000000111 : Gray = 10'b0000000100

# Decimal = 8 : Binary = 10'b0000001000 : Gray = 10'b0000001100

# Decimal = 9 : Binary = 10'b0000001001 : Gray = 10'b0000001101

Decimal = 10 : Binary = 10'b0000001010 : Gray = 10'b0000001111

Binary to Gray code mapping for 11 to 50 click here

Binary to Gray code mapping for 50 to 100 click here