'What is the difference between BZ and BNZ in instruction pipeline?

I am confused between branching instructions BZ and BNZ.
Can anybody, please, explain the concept and working of BZ and BNZ with an example?



Solution 1:[1]

BZ means Branch on Zero , it means the loop will continue if the status/flag register tells the CPU that the previous result (determined by ALU) is zero.

BNZ means Branch on Not Zero ( I think u can figure this out :) yeah? ).

It'd be better if someone verifies my answer , I'm not an expert in this field.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Suyash Rahatekar