I'm trying to add the MIPS assembly command BGTZ to the following circuit: enter image description here

I know that BGTZ takes the register value and sees if it's greater than 0. If it's greater it branches to the target. Can I compare the register value to a constant zero with an or gate?

EDIT: corrected BGTZ

  • \$\begingroup\$ BGTZ stands for Branch on Greater Than Zero, and applies to a single register. You are apparently thinking of BEQ. \$\endgroup\$ Oct 15, 2016 at 18:05
  • \$\begingroup\$ @WhatRoughBeast oh shoot you're right! So I can compare the register value to 0 and if it's greater have the branch trigger? \$\endgroup\$
    – Raviga
    Oct 15, 2016 at 19:38
  • \$\begingroup\$ Sure. As long as you can find a command which does that. \$\endgroup\$ Oct 16, 2016 at 0:04

1 Answer 1


Here's what I did to add BGTZ to the circuit: enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.