### Author Topic: Logic Gates  (Read 914 times)

0 Members and 1 Guest are viewing this topic.

#### combatking0

• JavaScript lives!
• Senior Member
• Posts: 4192
• Karma: 183
• Retroman!
##### Logic Gates
« on: June 22, 2012 »

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.
« Last Edit: June 24, 2012 by combatking0 »
You are our 9001st visitor.
Challenge Trophies Won:

#### Kirl

• Senior Member
• Pentium
• Posts: 986
• Karma: 219
##### Re: Logic Gates
« Reply #1 on: June 22, 2012 »
That's awesome, well done!

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

#### combatking0

• JavaScript lives!
• Senior Member
• Posts: 4192
• Karma: 183
• Retroman!
##### Re: Logic Gates
« Reply #2 on: June 23, 2012 »
Oh no, which gate?
You are our 9001st visitor.
Challenge Trophies Won:

#### Kirl

• Senior Member
• Pentium
• Posts: 986
• Karma: 219
##### Re: Logic Gates
« Reply #3 on: June 23, 2012 »
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

• JavaScript lives!
• Senior Member
• Posts: 4192
• Karma: 183
• Retroman!
##### Re: Logic Gates
« Reply #4 on: June 23, 2012 »
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

• Founder Member
• Pentium
• Posts: 1090
• Karma: 155
##### Re: Logic Gates
« Reply #5 on: June 23, 2012 »
Handy little learning app CK, nice one. K++
raizor

Challenge Trophies Won:

#### Hotshot

• Pentium
• Posts: 1898
• Karma: 80
##### Re: Logic Gates
« Reply #6 on: June 24, 2012 »
Good App

#### combatking0

• JavaScript lives!
• Senior Member