Skip to main content
added 21 characters in body
Source Link

Befunge93

2+2=? The answer is printed here: @.+!! 

Try it online.

Explanation

The = functions as a mirror for the instruction pointer (in Befunge93), so the phrase itself is not "executed". The pointer goes this way:

  • 2 - put 2 on the stack
  • + - add 2 to 0 (i.e. do essentially nothing)
  • 2 - put another 2
  • = - command not defined: mirror the direction of the pointer
  • 2 - put another 2
  • + - add 2 to 2 - put 4
  • 2 - put 2. Wrap to the end of the line
  • ! - logical negation for 2: put 0
  • ! - logical negation for 0: put 1
  • + - add 1 to 4 - put 5
  • . - print 5
  • @ - exit

The = functions as a mirror for the instruction pointer (in Befunge93), so the phrase itself is not "executed". The pointer goes this way:

2 - put 2 on the stack
+ - add 2 to 0 (i.e. do essentially nothing)
2 - put another 2
= - instruction not defined: inverse the direction of the pointer
2 - put another 2
+ - add 2 to 2 - put 4
2 - put 2. Wrap to the end of the line
! - logical negation for 2: put 0
! - logical negation for 0: put 1
+ - add 1 to 4 - put 5
. - print 5
@ - exit

Befunge93

2+2=? The answer is printed here: @.+!! 

Try it online.

Explanation

The = functions as a mirror for the instruction pointer (in Befunge93), so the phrase itself is not "executed". The pointer goes this way:

  • 2 - put 2 on the stack
  • + - add 2 to 0 (i.e. do essentially nothing)
  • 2 - put another 2
  • = - command not defined: mirror the direction of the pointer
  • 2 - put another 2
  • + - add 2 to 2 - put 4
  • 2 - put 2. Wrap to the end of the line
  • ! - logical negation for 2: put 0
  • ! - logical negation for 0: put 1
  • + - add 1 to 4 - put 5
  • . - print 5
  • @ - exit

Befunge93

2+2=? The answer is printed here: @.+!! 

Try it online.

Explanation

The = functions as a mirror for the instruction pointer (in Befunge93), so the phrase itself is not "executed". The pointer goes this way:

2 - put 2 on the stack
+ - add 2 to 0 (i.e. do essentially nothing)
2 - put another 2
= - instruction not defined: inverse the direction of the pointer
2 - put another 2
+ - add 2 to 2 - put 4
2 - put 2. Wrap to the end of the line
! - logical negation for 2: put 0
! - logical negation for 0: put 1
+ - add 1 to 4 - put 5
. - print 5
@ - exit

Source Link

Befunge93

2+2=? The answer is printed here: @.+!! 

Try it online.

Explanation

The = functions as a mirror for the instruction pointer (in Befunge93), so the phrase itself is not "executed". The pointer goes this way:

  • 2 - put 2 on the stack
  • + - add 2 to 0 (i.e. do essentially nothing)
  • 2 - put another 2
  • = - command not defined: mirror the direction of the pointer
  • 2 - put another 2
  • + - add 2 to 2 - put 4
  • 2 - put 2. Wrap to the end of the line
  • ! - logical negation for 2: put 0
  • ! - logical negation for 0: put 1
  • + - add 1 to 4 - put 5
  • . - print 5
  • @ - exit