This hole is experimental, no solutions will be saved. Please leave feedback on the GitHub issue.

Gray Code Decoder

Details

The reflected binary code (RBC), also known as Gray code, is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit).

For example, the representation of the decimal value 1 in binary would normally be 001 and 2 would be 010. In Gray code, these values are represented as 001 and 011. That way, incrementing a value from 1 to 2 requires only one bit to change, instead of two.

For each argument in reflected binary (Gray code) form, print the same number in decimal form.

The numbers range from 0 to 4095 inclusive.

0 bytes, 0 chars
Restore solution
All
Compiled from AT&T syntax to x86-64 Linux. Use syscalls to write output.
Fennel is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
ctrl + enter or

Delete Solution

Are you sure you want to delete your solution(s) for Gray Code Decoder?

If you have seperate bytes and chars solutions then both will be deleted.

This is irreversible, please backup any code you care about.

Type I understand and press confirm to continue.