Discussion in 'Electronics Homework Help' started by power13, Nov 22, 2018.

1. ### power13

10
0
Oct 26, 2018
Hello everyone,

I have a problem. I have an expression F(a,b,c) with 2 cases.
if a=0,2,5,7,8.. then F= ab +c
else F=a+c

a,c are 4bit binary numbers, b: 2bit number

I have to use full adders, multiplexers 2 by 1 and logic gates.

How I will check if a is that numbers? using multiplexers? I want a direction to this check..

Thank you.

2. ### Harald KappModeratorModerator

10,025
2,138
Nov 17, 2011
The straightforward approach is a logic function using logic gates. The function can be created by several methods, e.g. using a Karnaugh map.

power13 likes this.
3. ### power13

10
0
Oct 26, 2018
a: 4 bits
b: 2 bits

f1= ab (if a=0,2,5,7,8)
f1= b (if a ≠0,2,5,7,8)
So, f1: 6 bits

Karnaugh map for 6 bits... I think maybe there is easier way.

4. ### power13

10
0
Oct 26, 2018
After some thought, you're right. Karnaugh map for x (4 bits). 1 if condition is true (x is one of these numbers)
But, except logic gates, I have to use multiplexers, too.

5. ### Harald KappModeratorModerator

10,025
2,138
Nov 17, 2011
If x then y else z
That is exactly what a multiplexer does: generate output y or z depending on control input x.
Now apply this to your problem. That should be easy as pie.

power13 likes this.  