Flash Website Builder- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites. Check Out Custom Custom Logo Design by LogoBee. Website Design and Free Logo Templates available.
 CodingForums.com ^ operator

Before you post, read our: Rules & Posting Guidelines

Enjoy an ad free experience by logging in. Not a member yet? Register.
 08-25-2010, 08:56 PM PM User | #1 gizmo1650 Regular Coder   Join Date: Apr 2010 Posts: 163 Thanks: 3 Thanked 25 Times in 25 Posts ^ operator i was using my JavaScript console as a calculator, and i accidentally used "^" for exponents. the statement did not return a syntax error, but a number, after doing some more ^ operations i can't see the relation between the numbers i use and the answer it gives me.
 08-25-2010, 09:10 PM PM User | #2 qwertyuiop Regular Coder   Join Date: Jan 2004 Location: USA Posts: 364 Thanks: 12 Thanked 6 Times in 6 Posts Googling "javascript caret operator" returns this. __________________ Running Windows 7 x64
 08-25-2010, 09:28 PM PM User | #3 Fou-Lu God Emperor     Join Date: Sep 2002 Location: Saskatoon, Saskatchewan Posts: 16,592 Thanks: 4 Thanked 2,597 Times in 2,566 Posts Its simply a bit XOR. It returns a result where each bit in the left side that matches on the right side is inverted. Just on a nibble calculation since I don't want to type all the 0's. 5 = 0101 4 = 0100 5 ^ 4 = 1 The 'leftmost' bit in the above (2^(3-1), where this one is actually the exponent) is 1 in both the 5 and the 4, so its inverted to 0. The rightmost one (2^(1-1)) is 1 only in the 5 and not in the 4, so it remains untouched. Simple as that. Edit: Dang, beaten. That's a good link too, all its missing is the not (since I don't think derivatives like NAND exist in most languages), which is simply a unary ~. __________________ PHP Code: ``` header('HTTP/1.1 420 Enhance Your Calm');  ``` Last edited by Fou-Lu; 08-25-2010 at 09:30 PM..
 Users who have thanked Fou-Lu for this post: gizmo1650 (08-25-2010)

 Bookmarks

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home :: Client side development     JavaScript programming         DOM and JSON scripting         Ajax and Design         JavaScript frameworks         Post a JavaScript     HTML & CSS     XML     Flash & ActionScript         Adobe Flex     Graphics and Multimedia discussions     General web building         Site reviews         Building for mobile devices :: Server side development     Apache configuration     Perl/ CGI     PHP         Post a PHP snippet     MySQL         Other Databases     Ruby & Ruby On Rails     ASP     ASP.NET     Java and JSP     Other server side languages/ issues         ColdFusion         Python :: Computing & Sciences     Computer Programming     Computer/PC discussions     Geek News and Humour Web Projects and Services Marketplace     Web Projects         Small projects (quick fixes and changes)         Medium projects (new script, new features, etc)         Large Projects (new web application, complex features etc)         Unknown sized projects (request quote)         Vacant job positions         Looking for work/ for hire         Project collaboration/ partnership         Paid work offers and requests (Now CLOSED)     Career, job, and business ideas or advice     Domains, Sites, and Designs for sale         Domains for sale         Websites for sale         Design templates and graphics for sale :: Other forums     Member Offers     Forum feedback and announcements

All times are GMT +1. The time now is 08:02 PM.