Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
13
Task/Gray-code/Logo/gray-code-1.logo
Normal file
13
Task/Gray-code/Logo/gray-code-1.logo
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
to gray_encode :number
|
||||
output bitxor :number lshift :number -1
|
||||
end
|
||||
|
||||
to gray_decode :code
|
||||
local "value
|
||||
make "value 0
|
||||
while [:code > 0] [
|
||||
make "value bitxor :code :value
|
||||
make "code lshift :code -1
|
||||
]
|
||||
output :value
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue