designing a circuit with 3 3-bit inputs and 4 1-bit outputs

44 views Asked by At

The inputs are A[2:0], B[2:0] and C[2:0] respectively. The outputs are E,RA,RB,RC. If at least at one of the inputs (A,B,C) none of the bits are equal to 1 or if at least at one input the bits that are VALUED at 1 are more than 1, then E=1 and RA=RB=RC=0. If at each input(A,B,C) ONLY one bit is equal to 1, then E = 0 and; if the bits that are equal to one are at different positions(0,1 or 2) at every input, then RA=RB=RC=1. if the bit of one input that is valued at 1 is at a different position than the other bits of the other inputs that are valued at 1, then only the output of the different one is set to 1,while the others are set to 0 in any other case, RA=RB=RC=0.

i am 1st semester ECE student, i have tried for hours to split this problem into sub problems but i cant, how can this be solved??

1

There are 1 answers

0
Axel Kemper On

Separate the conditions from the outputs

In the following, I am using cardinality expressions:

[lb, ub](X, Y, Z) is true, if the number of true X, Y, Z is between lower bound lb and upper bound ub.
Examples:
[1,1](true, false, false) is true while [2,3](false, true, false) is false.

Condition X1: At least at one of the inputs (A,B,C) none of the bits are equal to 1.

X1 := not (A0 or A1 or A2) or not (B0 or B1 or B2) or not (C0 or C1 or C2)

Condition X2: At least at one input the bits that are VALUED at 1 are more than 1.

X2 := [2, 3](A0, A1, A2) or [2, 3](B0, B1, B2) or [2, 3](C0, C1, C2)

Condition X3: At each input (A,B,C) ONLY one bit is equal to 1,

X3 := [1, 1](A0, A1, A2) and [1, 1](B0, B1, B2) and [1, 1](C0, C1, C2)

Condition X4: Condition X3 and the bits that are equal to one are at different positions (0,1 or 2) at every input,

X4 := X3 and not ((A0 and B0) or (A1 and B1) or (A2 and B2) or 
                  (A0 and C0) or (A1 and C1) or (A2 and C2) or 
                  (B0 and C0) or (B1 and C1) or (B2 and C2))

Condition X5A: The bit of input A that is valued at 1 is at a different position than the other bits of the other inputs that are valued at 1.

X5A := (A0 and not (B0 or C0)) or (A1 and not (B1 or C1)) or (A2 and not (B2 or C2))

Condition X5B: The bit of input B that is valued at 1 is at a different position than the other bits of the other inputs that are valued at 1.

X5B := (B0 and not (A0 or C0)) or (B1 and not (A1 or C1)) or (B2 and not (A2 or C2))

Condition X5C: The bit of input C that is valued at 1 is at a different position than the other bits of the other inputs that are valued at 1.

X5C := (C0 and not (A0 or B0)) or (C1 and not (A1 or B1)) or (C2 and not (A2 or B2))

Cardinality implementations:

[1, 1](X, Y, Z) := (X and not(Y or Z)) or (Y and not(X or Z)) or (Z and not(X or Y))

[2, 3](X, Y, Z) := (X and Y) or (X and Z) or (Y and Z)

Outputs follow from conditions:

E := (X1 or X2) and not X3

What happens if (X1 or X2) is true and X3 is true as well?

RA := not (X1 and X2) and (X4 or X5A)

RB := not (X1 and X2) and (X4 or X5B)

RC := not (X1 and X2) and (X4 or X5C)

What happens if (X1 and X2) is true and (X4 or X5A) is true as well?

Disclaimer:
This solution does require some rework and checking.
The conditions and consequences in the question are not 100% clear to me.