Computers lived in a world of 1s and 0s, but Humans like Decimal (0-9) or Hexadecimal (0-F). Verilog lets you speak "Human" while telling the hardware exactly how many "bits" (wires) to use.
When you write 8'hFF, you are telling the computer: "Take 8 wires and set them all to high (1)."
The Mystery of X and Z
In the real world, a wire isn't always just 1 or 0. Sometimes things go wrong:
- X (Unknown): This usually means something is broken. Maybe two different things are trying to drive the same wire at once, or you forgot to give a wire a starting value.
- Z (High Impedance): This is like disconnecting a wire completely. It's used when you want a wire to "float" so another part of the chip can take control of it (common in data buses).