# What is the purpose of this statement in Verilog?

I see syntax quit similar to this very frequently:

4'd0

Sometimes it is associated with an assign statement:

assign S0 = 2'b00;

I tried searching online however I could not find any sources.

• It is very hard for me to believe that the answer to this question was at all difficult to locate online. – Elliot Alderson Mar 2 '19 at 2:03
• Actually, it would be hard to search for if you didn't know what is was called. But any basic tutorial would show this. – dave_59 Mar 2 '19 at 5:36

This is simply how a value is given. 4'd0 is a 4-bit value, given in base 10 (decimal), with value 0. 2'b00 is a 2-bit value, given in binary, with value 0.

The following four values are equivalent and all equal to fifteen:

4'b1111 (binary)
4'd15 (decimal)