Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Wise , 12 bytes (non-competing)

Wise , 12 bytes (non-competing)

Mistah Figgins has me beat here

[:??:?^?&<]|

I just made this language so I thought I would try the basics.

Try it online

##Explanation

Explanation

[ ... ] #Loop until our carry is zero
 : #Duplicate the top
 ?? #Roll the top two to the bottom
 : #Duplicate the top
 ? #Roll to the bottom

At this point we have n m m n on the stack

 ^ #Xor n and m
 ? #Roll that to the bottom
 & #And n and m to create the carry over
 < #Bitshift to the left
 | #Remove the extra zero with an or

#Wise , 12 bytes (non-competing)

Mistah Figgins has me beat here

[:??:?^?&<]|

I just made this language so I thought I would try the basics.

Try it online

##Explanation

[ ... ] #Loop until our carry is zero
 : #Duplicate the top
 ?? #Roll the top two to the bottom
 : #Duplicate the top
 ? #Roll to the bottom

At this point we have n m m n on the stack

 ^ #Xor n and m
 ? #Roll that to the bottom
 & #And n and m to create the carry over
 < #Bitshift to the left
 | #Remove the extra zero with an or

Wise , 12 bytes (non-competing)

Mistah Figgins has me beat here

[:??:?^?&<]|

I just made this language so I thought I would try the basics.

Try it online

Explanation

[ ... ] #Loop until our carry is zero
 : #Duplicate the top
 ?? #Roll the top two to the bottom
 : #Duplicate the top
 ? #Roll to the bottom

At this point we have n m m n on the stack

 ^ #Xor n and m
 ? #Roll that to the bottom
 & #And n and m to create the carry over
 < #Bitshift to the left
 | #Remove the extra zero with an or
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#Wise, 12 bytes (non-competing)

Mistah Figgins has me beat here here

[:??:?^?&<]|

I just made this language so I thought I would try the basics.

Try it online

##Explanation

[ ... ] #Loop until our carry is zero
 : #Duplicate the top
 ?? #Roll the top two to the bottom
 : #Duplicate the top
 ? #Roll to the bottom

At this point we have n m m n on the stack

 ^ #Xor n and m
 ? #Roll that to the bottom
 & #And n and m to create the carry over
 < #Bitshift to the left
 | #Remove the extra zero with an or

#Wise, 12 bytes (non-competing)

Mistah Figgins has me beat here

[:??:?^?&<]|

I just made this language so I thought I would try the basics.

Try it online

##Explanation

[ ... ] #Loop until our carry is zero
 : #Duplicate the top
 ?? #Roll the top two to the bottom
 : #Duplicate the top
 ? #Roll to the bottom

At this point we have n m m n on the stack

 ^ #Xor n and m
 ? #Roll that to the bottom
 & #And n and m to create the carry over
 < #Bitshift to the left
 | #Remove the extra zero with an or

#Wise, 12 bytes (non-competing)

Mistah Figgins has me beat here

[:??:?^?&<]|

I just made this language so I thought I would try the basics.

Try it online

##Explanation

[ ... ] #Loop until our carry is zero
 : #Duplicate the top
 ?? #Roll the top two to the bottom
 : #Duplicate the top
 ? #Roll to the bottom

At this point we have n m m n on the stack

 ^ #Xor n and m
 ? #Roll that to the bottom
 & #And n and m to create the carry over
 < #Bitshift to the left
 | #Remove the extra zero with an or
added a link to the shorter answer
Source Link
Wheat Wizard
  • 102.8k
  • 23
  • 299
  • 697

#Wise, 12 bytes (non-competing)

Mistah Figgins has me beat here

[:??:?^?&<]|

I just made this language so I thought I would try the basics.

Try it online

##Explanation

[ ... ] #Loop until our carry is zero
 : #Duplicate the top
 ?? #Roll the top two to the bottom
 : #Duplicate the top
 ? #Roll to the bottom

At this point we have n m m n on the stack

 ^ #Xor n and m
 ? #Roll that to the bottom
 & #And n and m to create the carry over
 < #Bitshift to the left
 | #Remove the extra zero with an or

#Wise, 12 bytes (non-competing)

[:??:?^?&<]|

I just made this language so I thought I would try the basics.

Try it online

##Explanation

[ ... ] #Loop until our carry is zero
 : #Duplicate the top
 ?? #Roll the top two to the bottom
 : #Duplicate the top
 ? #Roll to the bottom

At this point we have n m m n on the stack

 ^ #Xor n and m
 ? #Roll that to the bottom
 & #And n and m to create the carry over
 < #Bitshift to the left
 | #Remove the extra zero with an or

#Wise, 12 bytes (non-competing)

Mistah Figgins has me beat here

[:??:?^?&<]|

I just made this language so I thought I would try the basics.

Try it online

##Explanation

[ ... ] #Loop until our carry is zero
 : #Duplicate the top
 ?? #Roll the top two to the bottom
 : #Duplicate the top
 ? #Roll to the bottom

At this point we have n m m n on the stack

 ^ #Xor n and m
 ? #Roll that to the bottom
 & #And n and m to create the carry over
 < #Bitshift to the left
 | #Remove the extra zero with an or
Added TIO :)
Source Link
Wheat Wizard
  • 102.8k
  • 23
  • 299
  • 697
Loading
Source Link
Wheat Wizard
  • 102.8k
  • 23
  • 299
  • 697
Loading

AltStyle によって変換されたページ (->オリジナル) /