Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Verilog
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Operators== Note: These operators are ''not'' shown in order of precedence. {| class=wikitable |- ! Operator type || Operator symbols || Operation performed |- | rowspan=5|Bitwise || ~ || Bitwise NOT (1's complement) |- | & || Bitwise AND |- | <nowiki>|</nowiki> || Bitwise OR |- | ^ || Bitwise XOR |- | ~^ or ^~ || Bitwise XNOR |- | rowspan=3|Logical || ! || NOT |- | && || AND |- | <nowiki>||</nowiki> || OR |- | rowspan=6|Reduction || & || Reduction AND |- | ~& || Reduction NAND |- | <nowiki>|</nowiki> || Reduction OR |- | <nowiki>~|</nowiki> || Reduction NOR |- | ^ || Reduction XOR |- | ~^ or ^~ || Reduction XNOR |- | rowspan=6|Arithmetic || + || Addition |- | - || Subtraction |- | - || 2's complement |- | * || Multiplication |- | / || Division |- | ** || Exponentiation (*Verilog-2001) |- | rowspan=8| Relational || > || Greater than |- | < || Less than |- | >= || Greater than or equal to |- | <= || Less than or equal to |- | == || Logical equality (bit-value 1'bX is removed from comparison) |- | != || Logical inequality (bit-value 1'bX is removed from comparison) |- | === || 4-state logical equality (bit-value 1'bX is taken as literal) |- | !== || 4-state logical inequality (bit-value 1'bX is taken as literal) |- | rowspan=4| Shift || >> || [[Logical shift|Logical right shift]] |- | << || [[Logical shift|Logical left shift]] |- | >>> || [[Arithmetic shift|Arithmetic right shift]] (*Verilog-2001) |- | <<< || [[Arithmetic shift|Arithmetic left shift]] (*Verilog-2001) |- | Concatenation || <nowiki>{, }</nowiki> || Concatenation |- | Replication || <nowiki>{n{m}}</nowiki> || Replicate value m for n times |- | Conditional || ? : || Conditional |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)