2

I'm trying to create a truth table, but I don't understand what that phrase means? "Two ouputs must equal to the binary number that represents number of inputs that are equal to one"

miiworld2
  • 296
  • 1
  • 2
  • 11

1 Answers1

1

The sentence is obscure, so let's think of the exercise as trying to create a truth table that somehow matches what we are told. In doing that we have to interprete each piece of information included in the phrase.

Two outputs must equal to the binary number that represents the number of inputs that are equal to one.

Two outputs

Given that every output in a truth table is one bit, I will interpret this as a truth table with two output columns. Let's call them b1 and b2 (b meaning bit)

binary number

Bits b1 and b2 will form a 2-digit binary number. So, possible results for the combined output are: 00, 01, 10 and 11. These in turn respectively correspond to their decimal values 0, 1, 2 and 3.

inputs

These are the first columns of our truth table. We don't know yet how many are they. But...

number of inputs equal to one

Given that the largest output value is 3 (see above), we can have at most 3 Boolean inputs. Lets call them i1, i2 and i3.

Combining all together

i1  i2  i3  (sum) (binary) b1  b2
0   0   0     0      00     0   0
0   0   1     1      01     0   1
0   1   0     1      01     0   1
0   1   1     2      10     1   0
1   0   0     1      01     0   1
1   0   1     2      10     1   0
1   1   0     2      10     1   0
1   1   1     3      11     1   1
Leandro Caniglia
  • 14,495
  • 4
  • 29
  • 51