{"id":1428,"date":"2012-08-20T15:03:50","date_gmt":"2012-08-20T19:03:50","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/lianaleahy\/?p=1428"},"modified":"2012-08-20T15:03:50","modified_gmt":"2012-08-20T19:03:50","slug":"xor","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/2012\/08\/20\/xor\/","title":{"rendered":"XOR"},"content":{"rendered":"<p><code>if a ^ b<\/code><\/p>\n<p>What the hell is that carrot doing there?  &#8230;.It&#8217;s an &#8220;exclusive or&#8221;.<\/p>\n<p>It&#8217;s the same as saying:<\/p>\n<p><code>(a &amp;&amp; !b) || (!a &amp;&amp; b)<\/code><\/p>\n<p>which also means&#8230;<\/p>\n<p><code><br \/>\na | b |<br \/>\n0 | 0 | f<br \/>\n0 | 1 | t<br \/>\n1 | 0 | t<br \/>\n1 | 1 | f<br \/>\n<\/code><\/p>\n<p>Damn, useful\u2026 sometimes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>if a ^ b What the hell is that carrot doing there? &#8230;.It&#8217;s an &#8220;exclusive or&#8221;. It&#8217;s the same as saying: (a &amp;&amp; !b) || (!a &amp;&amp; b) which also means&#8230; a | b | 0 | 0 | f 0 | 1 | t 1 | 0 | t 1 | 1 | f [&hellip;]<\/p>\n","protected":false},"author":1911,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2850,2403],"tags":[],"class_list":["post-1428","post","type-post","status-publish","format-standard","hentry","category-professional","category-ruby-on-rails"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/wp-json\/wp\/v2\/posts\/1428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/wp-json\/wp\/v2\/users\/1911"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/wp-json\/wp\/v2\/comments?post=1428"}],"version-history":[{"count":5,"href":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/wp-json\/wp\/v2\/posts\/1428\/revisions"}],"predecessor-version":[{"id":1433,"href":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/wp-json\/wp\/v2\/posts\/1428\/revisions\/1433"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/wp-json\/wp\/v2\/media?parent=1428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/wp-json\/wp\/v2\/categories?post=1428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/lianaleahy\/wp-json\/wp\/v2\/tags?post=1428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}