How Jump instruction is executed based on value of Out- The Alu Output

前端 未结 2 590
盖世英雄少女心
盖世英雄少女心 2021-01-23 07:25

Figure from The Elements of Computer System (Nand2Tetris)

Have a look at the scenario where

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


        
2条回答
  •  失恋的感觉
    2021-01-23 08:09

    If out < 0, the jump is executed if j1 = 1.

    If out = 0, the jump is executed if j2 = 1.

    If out > 0, the jump is executed if j3 = 1.

    Hopefully now you can understand the table better. In particular, JNE is executed if out is non-zero, and is skipped if out is zero.

提交回复
热议问题