New answers tagged

4

I think this is what you are looking for: BooleanTable[Xor[p, p || q], {p}, {q}] // TableForm


5

Instead of using the list of digits as suggested by Karsten, you could also explicitly use BaseForm or its infix notation base^^digits: 2^^11000 ~ BitAnd ~ (2^^01011 ~ BitOr ~ 2^^11011) ~ BaseForm ~ 2 which returns $11000_2$ as you expected.


5

BitOr[{0, 1, 0, 1, 1}, {1, 1, 0, 1, 1}] $\ ${1, 1, 0, 1, 1} BitAnd[{1, 1, 0, 0, 0}, {1, 1, 0, 1, 1}] $\ ${1, 1, 0, 0, 0} {1, 1, 0, 0, 0} ~BitAnd~ ({0, 1, 0, 1, 1} ~BitOr~ {1, 1, 0, 1, 1}) $\ ${1, 1, 0, 0, 0}



Top 50 recent answers are included