Is there a way to convert binary with Don't care to corresponding decimal values in MATLAB?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Is there a way to express don't care binary in MATLAB and get the decimal value? For example, 011x can be either 6 or 7 since the LSB is a don't care.
An Example Application: Suppose, I have a truth table of 5 variables [ABCDE]. It has 2^5 = 32 states. Now, if I say that I only care about states [ABE] and the rest are don't cares. Then there will be 2^3= 8 states that I care. How do I group those 32 states into 8 states? If I had the don't care decimals I would be done.
3 comentarios
Stephen23
el 8 de Mzo. de 2022
"Is there a way to convert binary ... to corresponding decimal values in MATLAB?"
"...there can be as many as 250 binary digits"
There is no inbuilt numeric class that will be able to hold such an integer with its full precision.
Respuestas (1)
Jan
el 8 de Mzo. de 2022
You can ectract the wanted bits by bitget such that the ignored bits simply vanish.
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!