Firekhan Posted September 27, 2004 Posted September 27, 2004 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!
YT2095 Posted September 27, 2004 Posted September 27, 2004 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:)
Firekhan Posted September 27, 2004 Author Posted September 27, 2004 Heh, you're right, thats what I had in my C++ written out, but I forgot to put it on that or. thanks for reminding me
YT2095 Posted September 27, 2004 Posted September 27, 2004 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
Firekhan Posted September 27, 2004 Author Posted September 27, 2004 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!
YT2095 Posted September 27, 2004 Posted September 27, 2004 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
Firekhan Posted September 27, 2004 Author Posted September 27, 2004 Yep, try refreshing the gif, I re-uploaded after editing it in photoshop. it's a ))> now
YT2095 Posted September 27, 2004 Posted September 27, 2004 nice 1 if you don`t mind me asking, what course are you studying?
Firekhan Posted September 27, 2004 Author Posted September 27, 2004 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
YT2095 Posted September 27, 2004 Posted September 27, 2004 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
RICHARDBATTY Posted September 27, 2004 Posted September 27, 2004 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.
RICHARDBATTY Posted September 27, 2004 Posted September 27, 2004 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.
pulkit Posted September 27, 2004 Posted September 27, 2004 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.
RICHARDBATTY Posted September 27, 2004 Posted September 27, 2004 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.
pulkit Posted September 27, 2004 Posted September 27, 2004 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.
YT2095 Posted September 27, 2004 Posted September 27, 2004 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.
Firekhan Posted September 28, 2004 Author Posted September 28, 2004 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!
pulkit Posted September 28, 2004 Posted September 28, 2004 Is there a simple way to create such beautiful gif images of logical circuits ? I'd surely like to know.
Firekhan Posted September 28, 2004 Author Posted September 28, 2004 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.
RICHARDBATTY Posted September 28, 2004 Posted September 28, 2004 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.
iq71bd Posted August 2, 2005 Posted August 2, 2005 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now