0
\$\begingroup\$

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

\$\endgroup\$
3
  • \$\begingroup\$ BGTZ stands for Branch on Greater Than Zero, and applies to a single register. You are apparently thinking of BEQ. \$\endgroup\$ Oct 15 '16 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 '16 at 19:38
  • \$\begingroup\$ Sure. As long as you can find a command which does that. \$\endgroup\$ Oct 16 '16 at 0:04
0
\$\begingroup\$

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

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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