Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What does a bitwise AND do with no value infront of it?

I am using Verilog. Say you have the term:

& A

or

~& A

What does this do? Does it just compare it to an all empty array?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It performs a bitwise operation on all bits of the operand

e.g.:

//let x = 4’b1010
&x //equivalent to 1 & 0 & 1 & 0. Results in 1’b0
|x //equivalent to 1 | 0 | 1 | 0. Results in 1’b1
^x //equivalent to 1 ^ 0 ^ 1 ^ 0. Results in 1’b0

More about verilog operators: https://web.engr.oregonstate.edu/~traylor/ece474/beamer_lectures/verilog_operators.pdf

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading