Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
can you clarify what you mean by " "x" bit"? If you mean checking whether a specific bit of a byte size register is some state "x" (1 or 0 ) simply use
if (reg_name[n] = x)
or to check if any bits in the byte are some state "x"
if ((reg_name[7] = x) | (reg_name[6] = x) ....etc)
There's many other ways it can be done, but that's the most obvious I can think of.
If you mean to check for the indeterminate state "x" which can be seen in some simulation software that is not 1 or 0, you won't find it. In terms of applying to hardware, registers initialise to 0, and even noise on a floating input pin is only ever seen as 1 or 0.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.