Jump to content

Recommended Posts

Posted

Hey all... new to the board here with a question. Posted below is a logic gate setup I have created to solve the problem of having 4 inputs, and one output. The requirements are that the output will be true only when exactly 2 of the 4 inputs are true. Pretty sure I did this right, but I just wanted to double check, and see if there was any simpler method. Thanks! :)

 

4in_and_1out.gif

Posted

yup, it reads true, but make the last gate an XOR, as with using an ordinary OR gate, any 2 true inputs will read true, but so will pressing A,B,C and D give a true result :(

with an XOR as the final though, A,B,C and D when true will give a False at Q:)

Posted

not a problem :)

 

I read your question as: ANY 2 True inputs AND NOT (nand) 3 OR 4 for Q to read 1 (or true).

 

XOR the last gate and you`re there :)

Posted

There we go, updated the gif. Yes, any 2 inputs to read true. 2 inputs and ONLY 2 inputs true to read true, so 2 must be false. I double checked my logic in c++. Thanks for your help!

Posted

my pleasure :))

 

btw, I don`t know if the GIF`s been updated yet, but it`s just like an OR gate with a ) in front where the inputs join. ))> type of thing.

 

 

but you prolly already know that :)

Posted

Right now I'm in the book "Computer organization: A topdown approach" by Greg W. Scragg.

 

Working on my BS degree in computer science... I'll get it done someday lol ;)

Posted

Cool :)

 

I thought you may have been doing second year electronics or something. I did`nt think they went as basic as Gates nowadays in Comp Science, I actualy used to Teach Computer Architecture in the mid to late 80`s :)

Posted

There is a way to do this with seven two input gates but I don't know if it would be right to say more than that. Another clue is two quad chips. As I don't know if it would be cheating for you I daren't give you any more.

Posted
Cool :)

 

I thought you may have been doing second year electronics or something. I did`nt think they went as basic as Gates nowadays in Comp Science' date=' I actualy used to Teach Computer Architecture in the mid to late 80`s :)[/quote'] Is there anything you can't do besides but not excluding leaping tall buildings with a single bound.

Posted

I am in my second year doing a BS in comp science as well.

We are doing similar stuff. A pretty bad function I must say, no real simplification is possible.

 

As far as implementing using two input gates, that is always possible, but your drawing would then become too complicated. There is an easy way to go from n input to 2 input.

 

 

PS : By this time I realise there is absolutely nothing that YT has not done.

Posted
I am in my second year doing a BS in comp science as well.

We are doing similar stuff. A pretty bad function I must say' date=' no real simplification is possible.

 

As far as implementing using two input gates, that is always possible, but your drawing would then become too complicated. There is an easy way to go from n input to 2 input.

 

 

PS : By this time I realise there is absolutely nothing that YT has not done.[/quote'] Was this for me it seems like it is but it may be a general response. I just ask as I don't want to be ignorant and I had an experience where I was asked questions in a board I forgot I posted on.

Posted
Was this for me it seems like it is but it may be a general response. I just ask as I don't want to be ignorant and I had an experience where I was asked questions in a board I forgot I posted on.

 

Partially yes.

I meant to say that you could reduce it two input simple gates like AND,OR and XOR.

No fancy stuff.

Posted

the whole lot can be done with a single PIC or EPROM chip really, but the idea behind the task is getting you to think a little and demonstrate understanding of simple logic :)

 

 

edit: as an afterthought, you may also enjoy doing a little research on John Venn, Claude shannon and George Boole. these were great guys, and hold alot of admiration from me.

Posted
Partially yes.

I meant to say that you could reduce it two input simple gates like AND' date='OR and XOR.

No fancy stuff.[/quote']

 

I see what you're saying, but the problem requires there to be a total of four inputs ;). Thanks for everyone's input on this! :)

Posted

I used photoshop for that, but there is a company called Xilinx which makes a program in which you can setup and program logic circuits and test them real time. :)

Posted
I see what you're saying, but the problem requires there to be a total of four inputs ;). Thanks for everyone's input on this! :)

Have you done combination and sequential logic. You have used it in your design but from what you said it seems like you may not have got it. Thats if I'm getting it in context.

  • 10 months later...
Posted

Nice work Firekhan. it works.

Can you make the same logic gate setup for 10 inputs and one output. The requirements are that the output will be true only when exactly 5 of the 10 inputs are true. Please help me.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.