Is there a way to convert binary with Don't care to corresponding decimal values in MATLAB?
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
Stephen23
2022-3-8
"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.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!