Operators¶
Verilisp includes a wide range of mathematical and logical operators. In general these are the same as those in Lisp, and behave identically.
Lisp operators¶
Operator |
Example |
Notes |
|---|---|---|
|
|
|
|
|
Unary or n-ary |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Verilisp-specific operators¶
Bitwise shifts in Lisp use the ash (“arithmetic shift”) function
which shifts left or right depending on the sign of its second
argument. We replace this with two explicit operators, left and right
shifts, that take exactly two arguments.
Operator |
Example |
Lisp equivalent |
|---|---|---|
|
|
|
|
|
|