How to understand this boolean function notation?

62 Views Asked by At

I came across the following definition of a particular boolean function: $$ f(x_3, x_2, x_1, x_0) = (1101\phantom{a} 0001\phantom{a} 1101\phantom{a} 0001) $$ I am not sure how to interpret this notation. At first I thought that the list contains those variable assignments which produce 1, but then I noted that the values in the list repeat themselves. Also, oddly the variables are indexed in reverse order.

2

There are 2 best solutions below

0
On BEST ANSWER

Are $x_i\in\{0,1\}$?

Is it that when representing the input $x_3,\ldots,x_0$ in binary and call the value $n$, the $n$th bit on the right hand side represents the $0$ or $1$ result?

$$f(x_3,x_2,x_1,x_0) = \left(\sum_{i=0}^3 2^ix_i\right)\text{th bit on the }RHS$$

e.g.

$f(0,0,0,0) = 0000_2\text {th bit on the } RHS = 1$

$f(1,0,1,0) = 1010_2\text {th bit on the } RHS = 0$

Or expanded as a grid:

$$ f(x_3,x_2,x_1,x_0) = \begin{array}{r|cccc} x_3x_2\backslash x_1x_0&11&10&01&00\\\hline 11&1&1&0&1\\ 10&0&0&0&1\\ 01&1&1&0&1\\ 00&0&0&0&1\\ \end{array}$$

1
On

Well, I guess that in the case of $1101$, i.e., $x_3=1,x_2=1,x_1=0,x_0=1$, the function $f$ has the value $1$. So the function has four input combinations in which it is $1$; otherwise, $0$.