0

j1, j2 and j3 are bits for the jump instruction and comp instructions are the computation instructions like add etc.

Figure from The Elements of Computer System (Nand2Tetris)

Have a look at the scenario where

 j1 = 1 (out < 0 )
 j2 = 0 (out = 0 )
 j3 = 1 (out > 0 )

How this scenario is possible as out < 0 is true as well as out > 0 but out = 0 is false. How out can have both positive and negative values at the same time?

In other words when JNE instruction is going to execute although it theoretically seems possible to me but practically its not?

OldSchool
  • 2,123
  • 4
  • 23
  • 45

0 Answers0