• Welcome to Dark Bit Factory & Gravity.
 

Logic Gates

Started by combatking0, June 22, 2012

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

combatking0

With recent changes to the way computing is going to be taught to pupils in the UK, I've been asked to produce various resources for the new curriculum.

Here's one I've just finished - it's a logic gate simulator of sorts, including interactive inputs, truth tables and simplified CMOS circuit diagrams.

The XOR and XNOR gates were a pain in the ass, but I think they're accurate now.

(edit)

I've just noticed an error on the XOR gate when the inputs are both high - I'll fix it tonight.

(edit 2) Fixed - it should be fully accurate now.

(edit 3) Changed "Output O" to "Output Q" to avoid confusion between "0" and "O" after user feedback.

(edit 4) Changed "O" to "Q" in the truth tables too - that should fix it.
You are our 9001st visitor.
Challenge Trophies Won:

Kirl

That's awesome, well done!  :clap:

The output remained zero though, also when the visuals showed on.
www.kirl.nl
Challenge Trophies Won:

combatking0

Oh no, which gate?
You are our 9001st visitor.
Challenge Trophies Won:

Kirl

Actually I just noticed it's my mistake, sorry.  :-\

I assumed the text ùnder the output node would change from 0 to 1 when it lighted up, but it's the letter O instead of a decimal. If this isn't some kind of naming convention in elctro or something meaby change it to something else?

Anyway the program looks good and the obvious similarity between electro circuits and programming logic wasn't so obvious to me when I first started programming. It was something of an enlightenment.  ^-^
www.kirl.nl
Challenge Trophies Won:

combatking0

I see how that would cause confusion now - I'll see if there's a standard output letter...

...there's no official standard, but "Q" seems to have been widely adopted. Thanks for the feedback K++, I'll change it to "Q".

Hopefully something like this will be useful for beginners who are learning logic in both programming and in electronics.
You are our 9001st visitor.
Challenge Trophies Won:

Raizor

Handy little learning app CK, nice one. K++
raizor

Challenge Trophies Won:

Hotshot


combatking0

#7
I've just noticed the Truth Tables still use "O" instead of "Q" - fixing...

I ran this program past my 8-year-old son, and he seems to understand it. Why they don't teach this sort of thing in primary schools, I'll never know.
You are our 9001st visitor.
Challenge Trophies Won: