# What does the square brackets mean?

In this diagram: What does the S[2:0] mean? I think it is the state but why is the state in 3 bits? What does the 2 and 0 mean?

Cheers!

• "2 and 0" (as in [2:0]) means "from the bit numbered 2 downto the bit numbered 0." So it means three bits that are numbered sequentially from 0 to 2 (or 2 to 0.) S[2:0] means S2, S1, and S0. S'[2:0] means S'2, S'1, and S'0. It is short-hand notation. – jonk Jan 24 '18 at 7:35
• It means three bits ordered like $S_2S_1S_0$ where $S_2$ is the MSB and $S_0$ the LSB. – dirac16 Jan 24 '18 at 7:38

## 2 Answers

It means the signal is a 3-bit-wide bus.

[2:0] is a notation borrowed from Verilog. It means that the signal is a bus containing multiple bits, numbered from 2 down to 0 -- three bits in total.

S[2:0] refers to three signal lines (S2, S1, S0) that are used together to determine the state.

There can be eight states, depending on the states of those three bits.

More context (where this drawing came from, and what is around it) would be required to say what really happens here, and what those eight states do or mean.