Electrical – How to find out if a binary number is zero or not using logic gates

alubinarydigital-logiclogic-gates

I'm trying to put some logic gates together which would perform a task of finding out whether a number is zero or not. I came across a thread like this on here already (How to find out if a binary number is zero) and it says to "or every bit in the bus and then apply a not gate" but i'm not quite sure how this works.

I've tried drawing out the logic gates and their inputs/outputs, and what I've got is 4 OR gates which have inputs going from in[0] to in[7], so the first and second OR gates are:

Or(a=in[0], b=in[1], out=out0);
Or(a=in[2], b=in[3], out=out1);

And so on for the next two gates. I then get 4 outputs and i'm not entirely sure what to do with them now. I was thinking of somehow combining them into one input and then applying a single NOT gate to it, but i'm not sure if that would work, as well as applying 4 NOT gates to each of the outputs, but then i'd end up with 4 outputs after the NOT gate anyway, just inverted.

Anyone got any advice/tips on how I could do this?

Best Answer

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. The wordless answer.