View unanswered posts | View active topics It is currently Sat Apr 19, 2014 9:10 pm






Reply to topic  [ 5 posts ] 
NOR gate for RobotC 
Author Message
Rookie

Joined: Wed Aug 14, 2013 8:49 pm
Posts: 2
Post NOR gate for RobotC
Does robotc have an implementation of the NOR or NAND or NOT logic gates?

Thanks!

-JTech452


Wed Aug 14, 2013 9:02 pm
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: NOR gate for RobotC
How so? As in an if(){} statement?

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Wed Aug 14, 2013 9:08 pm
Profile WWW
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: NOR gate for RobotC
!= 8)

Edit: See what I did there?

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Wed Aug 14, 2013 9:19 pm
Profile
Expert

Joined: Thu Sep 29, 2011 11:09 pm
Posts: 184
Location: Michigan USA
Post Re: NOR gate for RobotC
Code:
z = (!(x || y)) // z = x NOR y
z = (!(x && y)) // z = x NAND y
z = (!(x)) // z = NOT x

_________________
Matt


Wed Aug 14, 2013 10:18 pm
Profile WWW
Rookie

Joined: Wed Aug 14, 2013 8:49 pm
Posts: 2
Post Re: NOR gate for RobotC
@mattalelen37 Thanks! That answers it.

@NeXT Generation Yes, in an if statement. Specifically referring to detecting if neither of two buttons are pressed on the joypad controller)

@Ernest3.14 No, I have no Idea what you did there.


Mon Aug 19, 2013 4:14 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.