Nekomata, 2019 bytes
\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤ƃa≤
Attempt This Online! Attempt This Online!
\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤ƃa≤
\+ Add 256 to ensure that binary length is 9
Ƃ Binary digits; least significant bit comes first
i Remove the last digit (the 1 from the 256)
Now the list contains exactly 8 digits
: ? Optional apply:
↔¬ Reverse and logical NOT
: ? Optional apply:
Jĭ,Ťđ, Swap the 2nd and 5th digits, and the 4th and 7th digits
2dƃ Convert from binary to decimal
a≤ Check that all possible values are greater than or equal to the input
Nekomata, 20 bytes
\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤
\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤
\+ Add 256 to ensure that binary length is 9
Ƃ Binary digits; least significant bit comes first
i Remove the last digit (the 1 from the 256)
Now the list contains exactly 8 digits
: ? Optional apply:
↔¬ Reverse and logical NOT
: ? Optional apply:
Jĭ,Ťđ, Swap the 2nd and 5th digits, and the 4th and 7th digits
2d Convert from binary to decimal
a≤ Check that all possible values are greater than or equal to the input
Nekomata, 19 bytes
\+Ƃi:↔¬?:Jĭ,Ťđ,?ƃa≤
\+Ƃi:↔¬?:Jĭ,Ťđ,?ƃa≤
\+ Add 256 to ensure that binary length is 9
Ƃ Binary digits; least significant bit comes first
i Remove the last digit (the 1 from the 256)
Now the list contains exactly 8 digits
: ? Optional apply:
↔¬ Reverse and logical NOT
: ? Optional apply:
Jĭ,Ťđ, Swap the 2nd and 5th digits, and the 4th and 7th digits
ƃ Convert from binary to decimal
a≤ Check that all possible values are greater than or equal to the input
Nekomata, 20 bytes
\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤
\+Ƃi:↔¬?:Jĭ,Ťđ,?2da≤
\+ Add 256 to ensure that binary length is 9
Ƃ Binary digits; least significant bit comes first
i Remove the last digit (the 1 from the 256)
Now the list contains exactly 8 digits
: ? Optional apply:
↔¬ Reverse and logical NOT
: ? Optional apply:
Jĭ,Ťđ, Swap the 2nd and 5th digits, and the 4th and 7th digits
2d Convert from binary to decimal
a≤ Check that all possible values are greater than or equal to the input